Page 1 of 1

RMT Peripheral - Sending RMT symbols directly

Posted: Wed Jan 25, 2023 6:26 am
by BlackSmith40
I'm using IDF 5.0 and I can receive IR frames correctly with RMT peripheral. I want to send what I receive but as far as I see rmt_transmit function in IDF 5.0 allows users to manually set command and data. Then it uses encoder to convert this data to RMT symbols. In my case, I already have RMT symbols since I've received them. How can I send these symbols directly without using any IR encoder?

Thanks in advance

Re: RMT Peripheral - Sending RMT symbols directly

Posted: Fri Jan 27, 2023 4:15 am
by BlackSmith40
I solved this problem as follows.
I’ve installed tx channel following guide on esp offical site IDF5.0. Instead of

Code: Select all

 rmt_transmit
I’ve used

Code: Select all

 
 /* Reset channel memory */
 rmt_ll_tx_reset_pointer(txHandle->group->hal.regs, txHandle->channel_id);

 /* Copy IR frame to Tx channel’s memory */
 memcpy((void*) txHandle->hw_mem_base, &p.data[0], sizeof(p.data));
            
 /* Start transmission */
 rmt_ll_tx_start(txHandle->group->hal.regs, txHandle->channel_id);
Where txHandle is handle for transmit channel and p.data is my own IR packet implementation. It must point to beginning of rmt symbols array.