1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

CTS/RTS on ARM UART

Discussion in 'Microcontrollers' started by dknguyen, Dec 29, 2017.

  1. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,864
    Likes:
    80
    Is the CTS/RTS function on microcontrollers something that must be driven through software via RTS/CTS interrupts? Or is it implemented in hardware? I'm working on an STM32F303K8 right now and though the manual seems to weakly imply that it is hardware driven, I am seeing no evidence of flow control.
     
  2. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,372
    Likes:
    663
    Location:
    Derbyshire, UK
    ONLINE
    As far as I'm aware it's usually done purely in software, and probably no need for interrupts.
     
  3. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,864
    Likes:
    80
    Okie dokie. The datasheet describes how RTS and CTS function in such detail that I was unsure if it was describing what the hardware does, or if it was describing what the programmer should do since it makes no indication that anything additional needs to be done by the programmer.

    Probably will need interupts in my case though since the DMA is the one feeding data to the UART. Would have been nice if it was hardware based and the UART just held off transmision on it's own which would automatically hold back the DMA. It's a bit of a PITA to disable the DMA mid-transfer because it doesn't pick up from where it left off when re-enabled, so you have to configure it to pick up from where it left off each time before re-enabling it.

    EDIT: Or maybe...I could just disable the transmitter...yeah that's probably better. Then no need to fiddle with the DMA.
     
    Last edited: Dec 29, 2017
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,864
    Likes:
    80

    UPDATE: Looks like the RTS/CTS is completely hardware controlled with no need for interrupts. I was just stupid and forgot to set up the I/O lines for RTS/CTS after I enabled the functionality in the UART peripheral.
     

Share This Page