crash on rmt_driver_install using non-GPIO pin

smeedy
Posts: 15
Joined: Sun Jan 22, 2017 10:35 pm

crash on rmt_driver_install using non-GPIO pin

Postby smeedy » Sun Apr 23, 2017 1:57 pm

Hi there,

Trying to use an SK8612 mini RGB LED using the nice lib from @Kolban. I have a custom board made so I'm stuck on GPIO_NUM_6 which I should be able to re-map being a GPIO output pin. Problem is that I keep on crashing and I'm not being able to use the gpio_matrix_out properly I think. I'm not grasping the concept here I think

Code: Select all

	gpio_set_direction(GPIO_NUM_6, GPIO_MODE_OUTPUT);
	gpio_matrix_out(GPIO_NUM_6, SIG_GPIO_OUT_IDX, 0, 0);
	ESP_LOGD(TAG, "GPIO remapped"); #
	
	WS2812 ws2812 = WS2812(GPIO_NUM_6, 1, RMT_CHANNEL_0); // crashes
Looking at the dump I see

Code: Select all

==================== CURRENT THREAD STACK =====================
#0  0x400f1fa3 in WS2812::WS2812 (this=0x3ffafc20, dinPin=<optimized out>, pixelCount=<optimized out>, channel=<optimized out>) at /Users/smeedy/code/esp/neopixel2/main/./WS2812.cpp:138
which leads to

Code: Select all

	ESP_ERROR_CHECK(rmt_config(&config));
	ESP_ERROR_CHECK(rmt_driver_install(this->channel, 0, 0)); # this is L138
} // WS2812
If I pick some other pre-designated GPIO on a different developer board have no problem and can light the pixel.

Been chasing some hint from this forum, and I think it boils down to the re-mux of the matrix. See https://esp32.com/viewtopic.php?f=13&t=1371 for example. Still I'm doing this wrong I think.

Thanks,
Martijn

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: crash on rmt_driver_install using non-GPIO pin

Postby ESP_igrr » Sun Apr 23, 2017 2:02 pm

GPIO6 is one of the GPIOs which are used to connect the flash chip on most boards. Using it for some other purpose will not work, as it will interfere with communication between the ESP32 and the flash chip.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: crash on rmt_driver_install using non-GPIO pin

Postby WiFive » Sun Apr 23, 2017 2:06 pm

ESP_igrr wrote:GPIO6 is one of the GPIOs which are used to connect the flash chip on most boards. Using it for some other purpose will not work, as it will interfere with communication between the ESP32 and the flash chip.
FAQ needed

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: crash on rmt_driver_install using non-GPIO pin

Postby kolban » Sun Apr 23, 2017 11:12 pm

That's a good idea. Espressif, any chance you can enable a Wiki from ESP32.COM?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: crash on rmt_driver_install using non-GPIO pin

Postby ESP_igrr » Mon Apr 24, 2017 4:26 am

Would it make more sense to add a FAQ/troubleshooting section to the ESP-IDF documentation? Or you would prefer to have a wiki so that changes wouldn't need to go through the lengthy PR process on Github?

smeedy
Posts: 15
Joined: Sun Jan 22, 2017 10:35 pm

Re: crash on rmt_driver_install using non-GPIO pin

Postby smeedy » Mon Apr 24, 2017 8:05 am

Good morning,

This is somewhat of a bummer. Neither one of use ever came across this one as we thought all pins could be reassigned using the matrix. This is indeed mentioned in section 3.2 on the wroom32 datasheet. We just missed it completely. There's information available if you know what to search for.

So a hands-on with best practices and caveats would be a welcome addition I think. A Wiki community-driven platform could work as we've seen in a lot of OS projects.

But alas, this means that we will have to do some hardwired patches on the prototypes. First batch, we only assembled 10, but still a lot of work. We also hooked up IO33 on a Max RS485 Tx. So this would also require some scraping & scratching on the PCB?

Thanks for your time,
Martijn
--
discusion on GPIOs: viewtopic.php?t=936
WROOM32 datasheet section 3.2 Flash: https://www.espressif.com/sites/default ... eet_en.pdf

Who is online

Users browsing this forum: Majestic-12 [Bot], Venky555 and 86 guests