has finished sending the 100 pulses as ordered by the previous command. So far I have been unable to stop the remote peripheral from sending pulses once it has started.
Today I simply tried to issue a stop command one second after starting a long series of pulses. As far as I can tell, the stop command does not work. In order to demonstrate this, here is a portion of the rmt_example_nec_task from the rmt_nec_tx_rx example project. The code below contains the only modifications to the example project.
Code: Select all
// Portion of rmt_example_nec_task
//To send data according to the waveform items.
ESP_LOGI(NEC_TAG, "Before rmt_write_items");
rmt_write_items(channel, item, item_num, false);
ESP_LOGI(NEC_TAG, "After rmt_write_items");
vTaskDelay(1000 / portTICK_PERIOD_MS);
rmt_tx_stop(channel); // should stop, but it doesn't
vTaskDelay(1000 / portTICK_PERIOD_MS);
rmt_tx_start(channel, true); // if it stopped, should restart
// and send 100 more NEC waveforms
//Wait until sending is done.
rmt_wait_tx_done(channel, portMAX_DELAY);
//before we free the data, make sure sending is already done.
free(item);
vTaskDelay(2000 / portTICK_PERIOD_MS);
}
1. Change the rmt_write_items wait_tx_done flag from true to false
2. Add code after the rmt_write_items command to delay 1 second, stop transmission, delay 1 second, and then restart transmission at the beginning. This step does not work at all.
Am I misusing the stop command? Or have I found something that needs to be fixed?
Can anyone give me any advise how to accommodate my use case?