cancel
Showing results for 
Search instead for 
Did you mean: 

Manchester decoding using STM32

tim239955_stm1_st
Associate
Posted on May 22, 2012 at 09:21

Would anybody have an example how to do manchester decoding using timer or usart(if possible) on a stm32 �controller

#manchester-stm32
2 REPLIES 2
Posted on May 22, 2012 at 16:26

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
frankmeyer9
Associate II
Posted on May 23, 2012 at 11:07

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.