RMT Peripheral - Sending RMT symbols directly

BlackSmith40
Posts: 6
Joined: Wed Jan 25, 2023 6:19 am

RMT Peripheral - Sending RMT symbols directly

Postby BlackSmith40 » Wed Jan 25, 2023 6:26 am

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

BlackSmith40
Posts: 6
Joined: Wed Jan 25, 2023 6:19 am

Re: RMT Peripheral - Sending RMT symbols directly

Postby BlackSmith40 » Fri Jan 27, 2023 4:15 am

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.

Who is online

Users browsing this forum: Bing [Bot], Gaston1980 and 112 guests