I am working on a PID controller that sends 100ns pulses to a TRIAC. Transmitting a
rmt_item_t from an interrupt causes a reboot if another item is still transmitted:
Code: Select all
void IRAM_ATTR zerocross_isr_handler() {
firing_pulse.duration0 = 7400;
esp_err_t ret = rmt_wait_tx_done(firing_conf.channel, 0);
if (ret==ESP_OK) {
rmt_write_items(firing_conf.channel, &firing_pulse, 1, 0);
}
}
If I reduce the duration to make sure that there is no previous transmission in progress, reboots stop. Note that only this interrupt sends items to the RMT. I tried to fix the issue using
rmt_wait_tx_done(). However this seems to return ESP_OK anyway as the ESP keeps crashing.
I made a minimal example to demonstrate the issue:
https://gist.github.com/DurandA/88cb4be ... 463bbc95ce