This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3235SF: How can I send the 'Break' condition on a UART?

Part Number: CC3235SF


The UART2 API in the software dev kit does not appear to have a way to send the Break condition - which I need to do.

Is there a way of achieving this?

  • At least the implementation of sending a UART break exists in the lower layers of the UART devices.

    See UARTBreakCtl() under /source/ti/devices/cc32xx/driverlib/.

    However, I do not see a direct call to it from upper layer so maybe it is broken.

    Does it work on UART0?

  • Thanks - I hadn't spotted that.  Its quite hard to see the wood for the trees, sometimes!

    I will see if I can get that to work for me, once I've figured out how to discover the base address (which I'm guessing I can ferret out from the UART object).

    Much appreciate your swift response.

  • basically, we have the ti drivers layer that serves as an adaptation to the platform specific drivers. What I mentioned is under the device specific.

    you can also see the entire mapping and more insight of any peripheral on the TRM https://www.ti.com/lit/ug/swru543a/swru543a.pdf?ts=1709798574255&ref_url=https%253A%252F%252Fwww.google.com%252F

    Specifically, table 6-8 would show BRK bit at 0x0001 location.

    This UARTLCRH register offset is 2Ch (in the code it is under the define UART_O_LCRH).

    The line that construct the full address is 'HWREG(ulBase + UART_O_LCRH)'.

    Shlomi

  • Thank you.  I've determined by inspection that the handle returned by UART2_open is a pointer to a structure, one element of which is another structure called hwAttrs, and that the first element of hwAttrs is 'baseAdd', giving me an easy way of getting that.

    In my use case, I was trying to use 'break' to wake up an attached AVR microcontroller, but in the end I found I could do this equally well by programming the AVR to go to sleep, with its UART disabled, but with an input sense change interrrupt set up on its Rx line (the CC3235's Tx line), and just sending a single NUL character, then 'usleep()'ing for enough time for the AVR to wake up (about 2ms)

    When the AVR receives this interrupt, it disables that interrupt, and reconfigures the UART - and off we go.  Somewhat easier than sending a timed break for me, at least, and avoids vulnerability to possible future changes of the C3235 SDK architecture.