Infra red communication

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Is there a way to create a 38kHz signal from WICED platform for infrared packet transmission? I would normally prefer to do this sort of programming on a separate MCU which is not running any OS/framework so that I can have control over timings. Is there any specific way time-accurate functions can be implemented in such environments?


The idea is that there are two states for the output:

ON = toggled at 38kHz (freq changeable by the program)

OFF = Not toggled.


The communication will take place based on the lengths of ON and OFF. The timings need to be accurate to nearest microsecond.

The problem is that WICED has a thread-based OS, which may not be able to deliver exact timings. I thought of two ways this can be approached.

1) Using native MCU timers to achieve the above mentioned requirements (devboard based on STM32F2xx MCU)

2) Using SPI to transmit required data as a stream.

The problem with SPI is that I cannot define clock rate below 234kHz due to some prescalar limitation. And even if I use >235kHz clock speed, there is no guarantee that clock will always be at this speed (thus affecting the timings)

As for using Timer functionality of the MCU, I am not sure how to approach it. There is a STM32F2xx peripheral library which provides functions for output compare using TIM1 and TIM8. My approach in this case will be to use these Timers with DMA to output required waveform with accurate timings. Now the question is, are these timers being used by some other functions? Will defining them cause any problem on the system, and how to use them under WICED environment?

Also, has anyone been able to successfully use the Timers or implemented IR control on WICED platform? It would be quite helpful you can share your experience.

Message was edited by: Omair Suria

0 Likes
6 Replies