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.

Compiler/CC2640: Need to Enable UART Debug

Part Number: CC2640

Tool/software: TI C/C++ Compiler

Not sure exactly what I am doing wrong. I enabled DebugP_LOG_ENABLED and also brought in what I thought was the correct UART C file from the tool chain

WHen I try and set a breakpoint in the UART code it cannot resolve the reference. I am trying to do something really simple but can't get it to work

  • This is relating to this prior question of mine. The issue has re-appeared

    on the transmit side, I am seeing stale data RE-APPEARING on the transmission

    Here is an example. I increment "PAUL REELASE" each time through my loop. As you can see Paul release 87 re-appears. I am sending and receiving data using the standard UART function provided by this SDK (simplelink_cc2640r2_sdk_2_40_00_32)

    urrent Loop Number 728
    {"optype": "call", "id": "bmap-write", "handle":0, "data": "1A05010400C03E20", "secure": 0}
    paul: Release 85.D@xe
    ProcessOpType{"optype": "call", "id": "bmap-write", "handle":0, "data": "1A05010400C03E20", "secure": 0}
    ProcessCallCommands{"optype": "call", "id": "bmap-write", "handle":0, "data": "1A05010400C03E20", "secure": 0}
    <{"optype":"status","id":"bmap-write","handle":0,"error":0}
    <{"optype":"event","id":"bmap","handle":73,"data":"1A0503202020112525252524252627000102035252525200000000000000140200000200"}
    {"optype": "call", "id": "bmap-write", "handle":1, "data": "1A05010400C03E20", "secure": 0}
    paul: Release 86.@xe
    ProcessOpType{"optype": "call", "id": "bmap-write", "handle":1, "data": "1A05010400C03E20", "secure": 0}
    ProcessCallCommands{"optype": "call", "id": "bmap-write", "handle":1, "data": "1A05010400C03E20", "secure": 0}
    <{"optype":"status","id":"bmap-write","handle":0,"error":0}
    <{"optype":"event","id":"bmap","handle":74,"data":"1A0503202020112525252524252627000102035252525200000000000000140200000200"}
    {"optype": "call", "id": "bmap-write", "handle":2, "data": "1A05010400C03E20", "secure": 0}
    paul: Release 87.xe
    ProcessOpType{"optype": "call", "id": "bmap-write", "handle":2, "data": "1A05010400C03E20", "secure": 0}
    ProcessCallCommands{"optype": "call", "id": "bmap-write", "handle":2, "data": "1A05010400C03E20", "secure": 0}
    <{"optype":"status","id":"bmap-write","handle":0,"error":0}
    <{"optype":"event","id":"bmap","handle":75,"data":"1A050320202011252525252425262700010203525252520000000000000014020000020paul: Release 87.xe
    ProcessOpType{"optype": "call", "id": "bmap-write", "handle":2, "data": "1A05010400C03E20", "secure": 0}
    ProcessCallCommands{"optype": "call", "id": "bmap-write","}

  • Hi,

    We will look into it and get back to you ASAP. Please bear with us.

    Thanks,

    PM

  • Hello, just checking in for any updates. Please advise

  • Hi Paul,

    Could you elaborate on which files you pull in when trying the debug? I would expect you to pull in the UARTCC26XX.c source file into the project (<SDK>/source/ti/drivers/uart/UARTCC26XX.c), is this the file you use?

    Also, enabling "DebugP_LOG_ENABLED" would require the setup of the TI-RTOS kernel Log module, have you done this? 

    Would it be possible to share some of the code showing how you setup and use the UART driver, If not here on the forum, in private over PM?

  • M-W

    here is the basic UART setup. We are running at 921600 BAUD

      /* Create a UART with data processing off. */
      UART_Params_init(&uartParams);
    
      uartParams.writeDataMode = UART_DATA_TEXT ;
      uartParams.readDataMode = UART_DATA_TEXT;
      uartParams.readMode = UART_MODE_BLOCKING; ;
    
      uartParams.readReturnMode = UART_RETURN_FULL;
      uartParams.readEcho = UART_ECHO_OFF;
      uartParams.baudRate = DEFAULT_BAUDRATE;


    We are not pulling in any additional files when debugging. We are using the library routines of UART_read and UART_write. I have not been able to able to effectively setup DebugP_LOG_ENABLED and I had created a TI ticket asking for help on that but never saw any replies.

    We (us and TI) believe this is tools issue as we can toggle between 2 tool sets and make the issue occur or not depending on which pkg we use.
    Also to rehash. We send JSON string to the Launchpad. The launchpad takes these message and sends a BLE request to a DUT. The DUT responds and the launchpad sends the data back over the serial port.

  • M-W I apologize I thought I was answering this issue below

    e2e.ti.com/.../3228274

    I believe Edward and I have determined this is a tools issue. If you believe that enabling this UART DEBUG mode would be helpful in solving the issue for TI's benefit we can proceed with this ticket. If you believe Edward doesn't need this data (DEBUG LOG) then I am ok closing this ticket.

    Let me know what your thoughts are. We want to be good corporate partners so we can help you, if you want, to solve this issue. However we did find a tool set which works for us and one which doesnt

  • Hi Paul,

    I honestly don't think putting in the effort of enabling this will help either you or Edward solve the issue. As for debugging the UART, if this would not be a tools issue, I think pulling in the source file to put down breakpoints would be the best approach. You would also need to pull in this file if you would put in the effort of getting "Debug LOG" to work as they are not compiled into the libraries. 

  • M-W

    for the purpose of updating this ticket for everyone else and for my own education how would one go about enabling "DEBUG LOG"

    Would it be possible at all to provide step by step instructions?

  • Hi Paul,

    There is unfortunately no "step-by-step" guide available but as the "DebugP" statements in the driver use the kernel "Log" module with the diagnostic mask "USER1" you would in theory only need to follow the API documentation to enable it:

    http://dev.ti.com/tirex/explore/node?node=ABCeS-j7lCHi4VDZqij7Kw__pTTHBmu__LATEST

    You would also need to include the actual source files of the drivers.