cancel
Showing results for 
Search instead for 
Did you mean: 

Manchester Encoder/Decoder and STM32F7 USART

memet dolatshahi
Associate II
Posted on May 23, 2017 at 16:16

Hi,

Some of USART Peripherals support The Manchester Encoding/Decoding on a serial bit-stream that send or received.

some MCUs such as ATMEL SAM3x or some families of Microchip's PIC or Cypress ARM's MCUs have this capability in USART peripherals.

Is there such an ability for STM32F7 USART to apply the Manchester encoding for transmitting data and decoding the Manchester from received data?

there are no directions about USART peripheral Manchester coding capability In STM32F7's TRM !!!

Also I have an Idea for Implementing the Manchester by STM32F7 USART!

If I select the synchronous mode of USART operation, we simply can XOR the clock output of USART and Tx serial Data and transmit it as a Manchester encoded bit-stream.

for receiving the data I need the decoder for recover the clock and the data from received bit-stream. probably instead of using the external decoder circuits and USART Rx pin, I going to use the Manchester input channel of DFSDM peripheral.

Manchester data consist of clock and serial data and the receiver does not need to know the bit rate of serial bit-stream. receiver just need high sampling clock to recover the data clock from bit-stream and read the actual data. for this purpose just need to set up the high sampling clock for DFSDM peripheral.

So What Do you Think experts?

I highly Appreciated to have your thoughts and recommendations about this Issue!

3 REPLIES 3
AvaTar
Lead
Posted on May 24, 2017 at 07:28

A former company of mine implemented low-bitrate Biphase (1200bps effectively), which is quite similar to Manchester code. Neither there was a MCU with proper peripheral, so we implemented it using GPIO and timers. Quite doable for low baud rates, and with the advantage of easy temperature compensation.

For appropriate sales figures, many vendors will offer you to implement a special peripheral for you ...

philipweiss
Associate II
Posted on April 03, 2018 at 20:52

I am in the same boat.  I've looked at using the output compare feature of timers and bit-banging the manchester code.  My version works, but it has some jitter because my bit rate is high enough the code is at the limit of the hardware's ability to git the interrupts serviced in time.  I'm very interested in a hardware approach.  Did you implement your Manchester by STM32F7 Usart?  Does XORing the clock and the TX serial work?

Posted on April 03, 2018 at 21:07

Rather than using interrupts consider driving the TIM (or GPIO) from a pattern buffer serviced via DMA

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..