2012-05-22 12:21 AM
Would anybody have an example how to do manchester decoding using timer or usart(if possible) on a stm32 �controller
#manchester-stm322012-05-22 07:26 AM
At what kind of rates?
You could presumably measure the high and low times, the upper limit would be where the CPU saturates with interrupts. If you can recover the clock externally, you could presumably put the STM32 in SPI slave mode and drive the data bits in that way.2012-05-23 02:07 AM
I know of two methods.
Either use a timer with capture&compare unit to measure the time between the edges, or simply GPIO pins with an interrupt on change. Or, you can configure an USART to synchonious mode and sample permanently, and evaluate the buffer bitwise. The second method has the disadvantage of a higher average load, but is less prone to performance overload in high-noise environment.