Page 1 of 1

crash on rmt_driver_install using non-GPIO pin

Posted: Sun Apr 23, 2017 1:57 pm
by smeedy
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

Re: crash on rmt_driver_install using non-GPIO pin

Posted: Sun Apr 23, 2017 2:02 pm
by ESP_igrr
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.

Re: crash on rmt_driver_install using non-GPIO pin

Posted: Sun Apr 23, 2017 2:06 pm
by WiFive
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

Re: crash on rmt_driver_install using non-GPIO pin

Posted: Sun Apr 23, 2017 11:12 pm
by kolban
That's a good idea. Espressif, any chance you can enable a Wiki from ESP32.COM?

Re: crash on rmt_driver_install using non-GPIO pin

Posted: Mon Apr 24, 2017 4:26 am
by ESP_igrr
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?

Re: crash on rmt_driver_install using non-GPIO pin

Posted: Mon Apr 24, 2017 8:05 am
by smeedy
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