Skip to main content
tim239955_stm1_st
Visitor II
May 22, 2012
Question

Manchester decoding using STM32

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
    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    May 22, 2012
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    frankmeyer9
    Associate III
    May 23, 2012
    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.