rmt: Fix LoadProhibited on RX END
authorIng. Jaroslav Šafka <devel@safka.org>
Fri, 2 Mar 2018 21:56:41 +0000 (22:56 +0100)
committerAngus Gratton <gus@projectgus.com>
Mon, 9 Apr 2018 02:29:05 +0000 (12:29 +1000)
commit3d89c8ba749db2643040ffac9291ef96dbedda5d
treee6512242656fd17cf0d14f9d4e5cd6dc4ed4d43b
parent9f39411e80bb1b2e331b25b382ebe55561bccf87
rmt: Fix LoadProhibited on RX END

Fixes exceptions LoadProhibited, when rmt tries read variable p_rmt on RX END which can be 0.
It happens after esp_reset()  (OTA) and the rmt is not probably stopped by it.
In other words the routine rmt_driver_isr_default was called before second rx channel was registered.

scenario:
register tx channel
register rx channel
reboot
register tx channel
-> exception (because rx channel is accessed)

Merges https://github.com/espressif/esp-idf/pull/1671
components/driver/rmt.c