rmt_set_tx_carrier causes RMT error

keckert
Posts: 8
Joined: Tue Apr 03, 2018 8:44 pm

rmt_set_tx_carrier causes RMT error

Postby keckert » Tue Apr 03, 2018 9:11 pm

I am initializing the RMT transmit channel and successfully transmitting IR signals. When I try to change the carrier frequency using rmt_set_tx_carrier, the channel no longer transmits. This is true even when I write the same values that I used at initialization. I am not sure what units the high-level and low_level are defined in the rmt_set_tx_carrier driver code. The latest ESP_IDF driver documentation states:
Set different values for carrier_high and carrier_low to set different frequency of carrier. The unit of carrier_high/low is the source clock tick, not the divided channel counter clock.
but the TRM states for the registers:
RMT_CARRIER_HIGH_CHn This field is used to configure the carrier wave’s high-level duration (in channel clock periods) for channel n. (R/W)
RMT_CARRIER_LOW_CHn This field is used to configure the carrier wave’s low-level duration (in channel clock periods) for channel n. (R/W)

Can you confirm that the driver requires units in source clock (80-MHz) and not channel clocks? Both the driver and the actual registers are 16-bit.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: rmt_set_tx_carrier causes RMT error

Postby ESP_Sprite » Wed Apr 04, 2018 1:34 am

Hm, I'll ask the docs team to fix this. I'm 99% certain that it's indeed in source clock units, however.

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 151 guests