I tried to request some service from System Firmware through a TISCI call. I received a NACK response or no response at all. How can I debug this?
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.
SYSFW implements a Trace layer to enable its various subsytems to output debug messages. Trace provides options for users to configure message sources and desinations; that is, users may select which of the subsystems will emit a trace message and through which transport the message will be sent. A common, compact trace format is used to minimize the data memory footprint and provide an easily machine-readable output which can be decoded offline for further analysis.
1. Trace configuration
At system boot, traces are enabled for all subsystem sources on all destination transports. All of the Trace source and destination options can subsequently be enabled or disabled through the SYSFW Board Configuration. Please see http://software-dl.ti.com/tisci/esd/latest/3_boardcfg/BOARDCFG.html#pub-boardcfg-debug-console for more details.
2. Collect the logs
The most straightforward way to collect trace logs is through WAKEUP UART0. On the DRA829V/TDA4VM common processor board, connect to J43 - MCU/UART. Using your favorite terminal program, attach to port 0, enable logging, and run your application. When you get to the point you are stuck and wish to debug further, save the log to a text file, sysfw.log.
Note: SYSFW Trace message strings are terminated with newline '\n' character only. The terminal program can be configured to add a carriage return automatically for print cleanliness and human readability. This does not affect the data contents in any way.
For instance, with standard terminal configuration settings, you may see the following:
Most terminal programs have options to handle this. For example, in popular programs like Tera Term and Minicom:
This will allow each trace message to begin in column 0 of your terminal
Alternatively, Trace messages can collected through a dump to SYSFW memory. Using your favorite memory dump method, you can access the trace log from the SoC memory and save to sysfw.log. The memory log is a circular buffer, so the amount of data stored will be limited to the size of the buffer. Details on memory location and size can be found http://software-dl.ti.com/tisci/esd/latest/4_trace/trace.html#trace-memory-buffer-location.
Advanced users can use JTAG Instrumentation and Trace Macrocell (ITM) to collect trace logs. The ITM channels are dedicated for each subsystem and are described in the same document.
3. Parse the logs
Trace logs are in 32-bit hexadecimal data format which describe various system events. The formats are described fully here: http://software-dl.ti.com/tisci/esd/latest/4_trace/trace.html#trace-debug-data-format
A python script is provided in Sciclient component for convenience:
you can find the script in the below directory, there is one for each sdk release. This applies to rtos sdk versions 07.01.xx to the latest below is the correct directory.
python3 ti-processor-sdk-rtos-j721e-evm-xx_xx_xx_xx/pdk_jacinto_xx_xx_xx_xx/packages/ti/drv/sciclient/soc/sysfw/binaries/scripts/sysfw_trace_parser.py -l sysfw.log -O
if using rtos sdk 07.0.0.11 then the below applies but for all other rtos sdk's version use the above command.
$ python3 pdk/packages/ti/drv/sciclient/tools/sysfw_trace_parser/sysfw_trace_parser.py -l sysfw.log -O 0x0040000B: BasePort: SEC_MSG_RECEIVED(Message from secure host received): MSG:0x00000B 0x00800004: BasePort: USER_MSG_RECEIVED(Message from secure host received): MSG:0x000004 0x04001003: BasePort: Unknown Action: 0x10 MSG:0x001003 0x044013A1: BasePort: Unknown Action: 0x11 MSG:0x0013A1 0x0040000E: BasePort: SEC_MSG_RECEIVED(Message from secure host received): MSG:0x00000E 0x00800004: BasePort: USER_MSG_RECEIVED(Message from secure host received): MSG:0x000004 0x60800017: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 23 0x60800018: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 24 0x6080019C: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 412 0x6080019D: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 413 0x6080002E: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 46 0x6080021E: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 542 0x6080002F: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 47 0x60800220: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 544 0x60800031: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 49 0x60800222: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 546 0x60800032: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 50 0x60800223: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 547 0x60800033: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 51 0x6080002A: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 42 0x60800224: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 548 0x60800034: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 52 0x60800225: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 549 0x60800035: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 53 0x60800226: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 550 0x60800036: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 54 0x60800227: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 551 0x60800037: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 55 0x60800228: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 552 0x60800038: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 56 0x60800229: Power Management: CLOCK_ENABLE(Clock has been Turned ON): Clock ID: 553 ...