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.

LAUNCHXL-CC1312R1: CC1312R1 UART IRQ

Part Number: LAUNCHXL-CC1312R1

Hello,

In the syscfg file for UART2 settings, under "RX PIN Configuration While Pin is Not In Use" section, there is option 'IRQ'.

 - How can I use this IRQ to receive data? (instead of calling the UART_read function in call back mode).

Best regards,

Dani

  •  "RX PIN Configuration While Pin is Not In Use" means when the UART driver is not in use. Hence the IRQ can not be used to receive data since the chip will use some time to turn the UART on and hence you will miss the incoming data. 

  • Hi,

    How can I use the UART to receive data (a single byte every time) without using the  TI Driver UART_read function?

    My system require a very low-power mode.

    Thanks for the help and guidance,

    Dani

  • You can look into the UART emulator in the Sensor Controller and see if that solves your problem.

  • Hi,

    Thanks for your help, using the SCIF driver helped.

    How can we change the UART emulator code to use UART2 (using DIO1 and DIO11 pins) instead of UART (that uses DIO2 DIO3)?

    We used the ex_common.syscfg to remove UART and add UART2 (connected to DIO1 and DIO11).

    Changing pin number in scif.h defines didn't seem to help:

    /// UART Emulator I/O mapping: UART RX
    #define SCIF_UART_EMULATOR_DIO_UART_RX 1
    /// UART Emulator I/O mapping: UART TX
    #define SCIF_UART_EMULATOR_DIO_UART_TX 11

    Best Regards,

    Dani

  • If you just want to use the UART emulator in the sensor controller you should not define UART in syscfg. 

  • I want to port the scif files to another project and change it to use UART2 with DIO1 and DIO11 pins.

  • Not following you. The CM4 has access to two UARTs, UART2 normally is just the name of the driver. The UART emulator on the sensor controller side is not related to the UARTs available to the CM4.  

  • The UART emulator sample is mapped to use UART RX-DIO2 and TX-DIO3, as written in file scif.h lines 55-66:

    * The System CPU application implements simple loop-back of received data. The UART RX (DIO2) and TX
    * (DIO3) pins are mapped to the LaunchPad's XDS110 Application/User USB serial port.
    *
    * See the header in the application source file ("main.c" or similar) for further details and
    * instructions. This file is located in the source code output directory.
    *
    *
    * \subsection section_io_mapping I/O Mapping
    * Task I/O functions are mapped to the following pins:
    * - UART Emulator:
    * - <b>UART RX</b>: DIO2
    * - <b>UART TX</b>: DIO3

    What updates in the sample code are required in order to change current mapping to DIO1 and DIO11 instead of DIO2 and DIO3?

    (Changing lines 123,125 in scif.h file, didn't result in changing the mapping of the uart I/O maping).

  • You have to change the pin mapping in the "I/O mapping" in Sensor Controller Studio and generate a new image. Just changing the defines are not enough. I tested this with the "UART Emulator for Launchpad" example and that works.