Skip to main content
Visitor II
May 28, 2024
Solved

Feel confused about "USART with SPI" in datasheet of STM32G0B1RE

  • May 28, 2024
  • 3 replies
  • 1920 views

See DS13560 Rev 4 (Datasheet of STM32G0B1RE)please. On the right side, it said "Six USARTs with master/slave synchronous SPI; three supporting ISO7816 interface, LIN, IrDA capability, auto baud rate detection and wakeup feature". I'm now writing courseware for my students and i cannot explain what is "USART with SPI", seems to not be "Serial peripheral interface".

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    Well that's a bit scary..

    With the U(S)ART, the S means Synchronous, ie with a clock. ST's implementation, unlike some from yore, has a single clock output (input in Slave mode), so both TX and RX come via the same clock, isn't that adequate to meet the definition of a serial peripheral interface, in the broad definition of the concept? An SPI EEPROM, probably not, but the world of choices is somewhat larger than that.

    Here signalling and framing is used, rather than a chip select.

    Not going to work well where the interface expects independent clocks, or probably SDLC / HDLC either.

    And not as remotely helpful as Atmel/Microchip's SERCOM model.

    ST's model is more "Imagine the possibilities", and perhaps the ability to disabuse the peripheral to achieve what you need, especially with legacy or non-conforming hardware.

    https://www.st.com/resource/en/reference_manual/rm0444-stm32g0x1-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

    3 replies

    Technical Moderator
    May 28, 2024

    Hi @AlanCui4080 

    USART can be configured to mimic SPI's behavior, allowing it to communicate with SPI devices or other USARTs in synchronous mode. This feature provides flexibility for designers to use the USART for SPI communication when SPI interfaces are limited or already in use.

    Super User
    May 28, 2024

    @AlanCui4080 wrote:

     "USART with SPI", seems to not be "Serial peripheral interface".


    What makes you say that?

     

    Note that the ST datasheets focus on physical/electrical specifications - for full details on the operation of peripherals, see the Reference Manual; eg,

    AndrewNeil_0-1716911256548.png

     

    Probably also worth checking for any Application Notes on the subject

     

    https://www.st.com/en/microcontrollers-microprocessors/stm32g0b1re.html#documentation

     

    Graduate II
    May 28, 2024

    Well that's a bit scary..

    With the U(S)ART, the S means Synchronous, ie with a clock. ST's implementation, unlike some from yore, has a single clock output (input in Slave mode), so both TX and RX come via the same clock, isn't that adequate to meet the definition of a serial peripheral interface, in the broad definition of the concept? An SPI EEPROM, probably not, but the world of choices is somewhat larger than that.

    Here signalling and framing is used, rather than a chip select.

    Not going to work well where the interface expects independent clocks, or probably SDLC / HDLC either.

    And not as remotely helpful as Atmel/Microchip's SERCOM model.

    ST's model is more "Imagine the possibilities", and perhaps the ability to disabuse the peripheral to achieve what you need, especially with legacy or non-conforming hardware.

    https://www.st.com/resource/en/reference_manual/rm0444-stm32g0x1-advanced-armbased-32bit-mcus-stmicroelectronics.pdf