Skip to main content
Graduate
March 10, 2024
Question

Transmitting and receiving custom serial bitstream

  • March 10, 2024
  • 2 replies
  • 1387 views

Hi Community,

 

1) I have to demodulated a continuous bitstream of 201bit (1ms per bit) sent by a host to my stm32F401RE. Which peripheral would you suggest to use?

2) If I have to transmitt and receive custom serial data  in half duplex with clock in Tx and Rx clock for sampling, which peripheral you suggest to use? In this case datarate is 1Mbps.

Thanks 

 

 

 

    This topic has been closed for replies.

    2 replies

    Super User
    March 10, 2024

    Hi,

    without more info about bit format or frame sync/start , i can say:

    1. Timer input capture (as i use for IR remote signal, which is (also) 1ms bit time )

    2. Usart in sync mode

    FAJOL.1Author
    Graduate
    March 10, 2024

    Thanks,

     

    Regarding 2, I forgot to say that the serial data is custom lenght bitstream of 200bit ( no pause in the bitstream, no stop bit between words etc..).

    Thanks

    Super User
    March 10, 2024

    So... for

    1. Timer input capture (-> interrupt )

    2. SPI (16bit mode) -> circular DMA ( and you analyse in half/full callbacks the received stream in int16_t arrays)

    Graduate II
    March 10, 2024

    Such a low bit rate? I would probably use TIM Input Capture or EXTI