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.

CCS/CC2650MODA: How to program DIOxx pins to use UART

Part Number: CC2650MODA
Other Parts Discussed in Thread: SEGGER, CC2640, TM4C129ENCPDT, CC2650

Tool/software: Code Composer Studio

Hi all

I am trying to program a CC2650MODA module so that it can send the data received via UART over the air and vice versa.
I am using a custom board, and so far I have been able to program, using CCS v10 and the SEGGER JTAG, the module following the steps of the CC26x0 SimpleLink™Bluetooth® low energy Software Stack 2.2.x Developer's Guide.

1- import-compile-debug of the simple_np_cc2650bp_stack
2-import-compile-debug of the simple_np_cc2650bp_app

I'm using the simple_np because it was written:
"The simple_np project builds the Simple Network Processor (SNP) software for the CC2640. The SNP is the easiest way to add BLE connectivity to an existing host processor or MCU." that's crresponds to my situation.

So far everything is ok.
I noticed that my module is automatically recognized as if it were the BOOSTXL_CC2650MA_BOARD (why? Is this the default?)
Now, I would like to set the pins of the CC2650 to use the uart that I will use to communicate with the micro (a TM4C129ENCPDT). These pins are:
UART_TX: DIO0
UART_RX: DIO1
In addition, I have also preset the use of flow control, with RTS and CTS on the DIO13 and DIO14 respectively.
I report what is written in the "board.c" file ($ MY_PROJECT_PATH / simple_np_cc2650bp_app / Startup / board.c):
"If a project needs to change the board defined for a particular target, they can modify the board.h located in the corresponding board subdirectory.

NOTE: THIS FILE SHOULD ONLY BE CHANGED TO ADD A NEW BOARD / TARGET! "

I found that the board.h file is located in the directory:
C: \ ti \ symplelink \ ble_sdk_2_02_05_02 \ src \ boards \ BOOSTXL_CC2650MA \ board.h
Starting from this file and the BOOSTXL_CC2650MA_BOARD.c and .h file (same path) how can I set the pins for the uart?
Since in my project I only use uart pins, is it possible to set something like a "Default_pinout.h / c" file? If yes, how?

Hope you can help me!

Best regards
Federico

  • Federico,

    Thanks for your inquiry. I am checking a few additional details but at this time I think that you are on the right track. I am not very familiar with this module, but looking at its description I can say it would behave similarly to a booster pack described by the BOOSTXL_CC2650MA that is covered by this project - i.e., it is a BLE adapter (or bridge) that communicates to a host processor.

    Specific to the UART pin assigned, if you look at the BOOSTXL_CC2650MA_BOARD.c file, the struct uartCC26XXHWAttrs has the pin assignments for the UART structure. Can you change its settings and see if it works for you? 

    Hope this helps,

    Rafael

  • Hi Rafael, thanks for your reply.

    I tried changing the pin in the struct but there is something wrong.
    Maybe, I need to change the define in the file BOOSTXL_CC2650MA_BOARD.h  as follow

    from:

    /* UART Board */
    #define Board_UART_TX Board_BP_UART_Rx /* RXD */ 
    #define Board_UART_RX Board_BP_UART_Tx /* TXD */

    to

    /* UART Board */
    #define Board_UART_TX DIO0 /* RXD */
    #define Board_UART_RX DIO1 /* TXD */

    (same things for CTS and RTS).

    Also, in the same file, I think that it is possible to set to "IOID_UNUSED" or "PIN_UNASSIGNED" the other pins.
    I'll try it in the next few days (momentarily, I don't have the ability to use the hardware) and let you know if it works.

    thanks