Page 1 of 1

TTGO Micro-32

Posted: Thu Jan 17, 2019 5:56 pm
by eshkrab
Hello lovely people!

After over a year of working with WROOM modules, I finally spun up a board for the TTGO micro esp module. I've been able to find next to no documentation for that specific module aside from the one-photo pinout and spec summary that's posted in several places.

My board seems to function as expected but I found the strangest thing - the esp-idf codebase I've had working on multiple other modules and dev boards crashes on the micro-32. Specifically, it crashes on rmt peripheral code that's being used to drive some addressable LEDs. There's not much info other than a core panic and crash, currently happens in the following snippet

Code: Select all

  
  for (int i = 0; i < NUM_STRIPS; i++) {
    //The line bellow was crashing and but works once I remove the static_cast
    // rmt_set_pin(static_cast<rmt_chanel_t>(i), RMT_MODE_TX, static_cast<gpio_num_t>(gpioNum[i]));
    rmt_set_pin((rmt_channel_t)i, RMT_MODE_TX, (gpio_num_t)gpioNum[i]);

    initRMTChannel(i);

    RMT.tx_lim_ch[i].limit = MAX_PULSES;
  }  

  RMT.int_ena.ch0_tx_thr_event = 1;
  //According to the register prints, this is the line that causes a core panic, Illegal instruction
  RMT.int_ena.ch7_tx_end = 1;
The code right now crashes on the last line in this snippet. I was wondering if anyone has any info on this module or has experienced something like that. I've ran example rmt peripheral code (which doesn't use this specific API) on this module and even FastLED in Arduino environment, no problem. Very confused since I can't find any differences between the Micro-32 and other modules and this code definitely runs on everywhere else I've thrown it

Any ideas?

Re: TTGO Micro-32

Posted: Sat Jan 19, 2019 4:08 am
by ESP_Sprite
That board uses a Pico-D4 module, which has internal flash which is connected to different GPIOs than it is on a normal ESP32; specifically GPIO16 and 17 are used where they're free on a non-Pico ESP32 setup. If you use one of these GPIOs in your code, it'd lead to a crash like this, perhaps that's your issue?

Re: TTGO Micro-32

Posted: Sat Jan 19, 2019 4:31 pm
by eshkrab
I discovered that, and while i did accidentally break out 16 and 17, not using those pins still leads to core panic in the middle of using the RMT peripheral

Re: TTGO Micro-32

Posted: Sun Jan 20, 2019 9:08 am
by ESP_Sprite
...so which pins _do_ you use? Also, are you sure those pins don't happen to be shorted to any of the flash pins? Ran into that myself once...

Re: TTGO Micro-32

Posted: Tue Jan 22, 2019 3:44 am
by eshkrab
I have a tri-state buffer ic tied to pins 15, 2, 4, 16, 17, 5, 18, 19, but I'm not initializing pins 16 and 17 in code. I just ported FastLED into esp-idf and that is able to drive a strip on pin 15 without crashes. But the library I've been using for about 2 years, along with 2-3 others I've been able to find for esp-idf, all cause a crash.

I'll be doing more investigation for sure.

Re: TTGO Micro-32

Posted: Tue Jan 22, 2019 9:47 am
by ESP_Sprite
Gotcha. I don't see anything wrong with your setup from what you posted, but I'd bet that whatever is wrong has something to do with the code somehow re-initializing the pins the flash is connected to, or otherwise stopping them from working to transfer flash data.

Re: TTGO Micro-32

Posted: Fri Mar 08, 2019 4:32 am
by Snipeye
Sorry, not trying to necro - I've got one of these boards now and I'm trying to find documentation. Did you ever have any luck?

Re: TTGO Micro-32

Posted: Tue Apr 02, 2019 7:08 pm
by eshkrab
Definitely don't use pins 16&17 and everything else is mostly fine, although my board yield is very low right now