TTGO Micro-32

eshkrab
Posts: 6
Joined: Thu Apr 05, 2018 1:38 am

TTGO Micro-32

Postby eshkrab » Thu Jan 17, 2019 5:56 pm

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?

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: TTGO Micro-32

Postby ESP_Sprite » Sat Jan 19, 2019 4:08 am

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?

eshkrab
Posts: 6
Joined: Thu Apr 05, 2018 1:38 am

Re: TTGO Micro-32

Postby eshkrab » Sat Jan 19, 2019 4:31 pm

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

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: TTGO Micro-32

Postby ESP_Sprite » Sun Jan 20, 2019 9:08 am

...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...

eshkrab
Posts: 6
Joined: Thu Apr 05, 2018 1:38 am

Re: TTGO Micro-32

Postby eshkrab » Tue Jan 22, 2019 3:44 am

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.

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: TTGO Micro-32

Postby ESP_Sprite » Tue Jan 22, 2019 9:47 am

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.

Snipeye
Posts: 5
Joined: Fri Mar 08, 2019 4:30 am

Re: TTGO Micro-32

Postby Snipeye » Fri Mar 08, 2019 4:32 am

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?

eshkrab
Posts: 6
Joined: Thu Apr 05, 2018 1:38 am

Re: TTGO Micro-32

Postby eshkrab » Tue Apr 02, 2019 7:08 pm

Definitely don't use pins 16&17 and everything else is mostly fine, although my board yield is very low right now

Who is online

Users browsing this forum: No registered users and 126 guests