CC2340R5: The log of the sample program cannot be used.

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

I used the log program in the driver routine and found that Log_printf couldn't print data via the serial port, but it could be observed through ROV. I only changed the TX pin and the baud rate(115200), and left everything else unchanged.
SDK:8_40_02_01

  • Hi,

    After selecting "Enable Logging" in the Zigbee module of SysConfig, the "Log Modules" automatically sets each "Sink" to "/ti/log/LogSinkBuf" which shows up in the ROV as you've observed.  You will need to select and change each Log Module's Sink (this includes LogModule_Zigbee_App, LogModule_Zigbee_OSIF, and LogModule_Zigbee_Low_Level_MAC) to "/ti/log/LogSinkUART" to observe the Log data over the UART peripheral.

    Regards,
    Ryan

  • Hi,
    After I selected "Enable Logging" for the Zigbee module in sysconfig, the compilation failed. I was using the log example program in the driver. I have changed the sinks for LogModule_App1, LogModule_App2, and LogModule_App3 in syscfg to /ti/log/LogSinkUART, but I still cannot observe the log data on the UART.

  • After I selected "Enable Logging" for the Zigbee module in sysconfig, the compilation failed

    You probably need to revert the existing Log changes in SysConfig first.  Most build errors causes by SysConfig can be resolved through simple changes to the file using the editor.  I'm successfully building an example project from the F3 SDK v9.14 with Zigbee UART Logging enabled in Sysconfig.

    but I still cannot observe the log data on the UART

    You will need to confirm your UART TX line, COM port, etc.  Consider monitoring with a logic analyzer and reviewing the TI log tool README.  Keep in mind that the baud rate is atypical (i.e. 3 Mbaud) and the LogSinkUART is a sink/transport layer that asynchronously outputs encoded log statements over UART, meaning the host side must be prepared for additional processing outside of a typical terminal.  If this is not desired then you can consider using the Display or UART2 drivers for your application instead.

    Regards,
    Ryan

  • I can print using Display.