I think it is caused by the bug in rmt_set_tx_thr_intr_en function (esp-idf/components/driver/rmt.c)
Here is the short analysis of the problem:
mem_block_num config option sets the number of the memory blocks (64*32 bits) to be usesd for the RMT channel.
If we use 8 memory blocks for the channel 0, it passes the check in rmt_config() (rmt.c, line 393):Channel0 can use at most 8 blocks of memory, accordingly channel7 can only use one memory block.
Code: Select all
RMT_CHECK((mem_cnt + channel <= 8 && mem_cnt > 0), RMT_MEM_CNT_ERROR_STR, ESP_ERR_INVALID_ARG);
Code: Select all
int block_num = RMT.conf_ch[channel].conf0.mem_size;
int item_block_len = block_num * RMT_MEM_ITEM_NUM;
int item_sub_len = block_num * RMT_MEM_ITEM_NUM / 2;
Code: Select all
RMT_CHECK(evt_thresh < 256, "RMT EVT THRESH ERR", ESP_ERR_INVALID_ARG);
RMT_CHECK(evt_thresh <= 256, "RMT EVT THRESH ERR", ESP_ERR_INVALID_ARG);
everything works as expected.
I know it is probably the rare case that only the cnannel 0 is used with 8 memory blocks, but it should work...