RMT Peripharel how to set duration using rmt_write_sample

mogplus8
Posts: 7
Joined: Thu Jun 11, 2020 1:20 am

RMT Peripharel how to set duration using rmt_write_sample

Postby mogplus8 » Tue Jun 23, 2020 1:29 pm

Hi All,
In my continuing attempts to use the RMT peripheral I have now struck another problem. It seems the source array (src) passed to the function must be of type uint8_t, otherwise an error "incompatible pointer type" is raised. Since the duration of each pulse (high and low) can be up to 32767 (2^15 - 1) as defined in rmt_item32_t type why is the source size restricted to uint8_t? This only allows for values up to 255 to be passed to the sample manipulation function. For my application I want to pass values between 1,000 and 15,000, and I need more than 255 resolution (so I can't just multiply by 4 or something).

So my question is, how can a pass an array defined as uint16_t to the sample_to_rmt function?

All advice gratefully received.

Who is online

Users browsing this forum: Applebot, Bing [Bot], ChatGPT-User, PerplexityBot and 4 guests