Skip to content

Generate a trace

This application note details how to generate a trace for SPI, OTP memory and power management.

This is especially useful to debug or to create a ticket for the help-desk .

Configure

On the hV_Board.h header file of the hV_Board_EXT3 library, set the corresponding options for SPI, OTP memory and power management.

Always proceed with a clean build of the project.

SPI

///
/// @brief 12- Debug options
///
#define DEBUG_SPI_SCREEN 1 ///< SPI debugging for screen, 1 = activated, otherwise 0; recommended = 0
#define DEBUG_OTP 0 ///< Print OTP content, 0 = no, 1 = yes; recommended = 0
#define DEBUG_POWER 0 ///< Trace power management, 0 = no, 1 = yes; recommended = 0

On the hV_Board.h header file of the hV_Board_EXT3 library, set DEBUG_SPI_SCREEN to 1.

The option is activated by default on the Evaluation edition.

OTP memory

///
/// @brief 12- Debug options
///
#define DEBUG_SPI_SCREEN 0 ///< SPI debugging for screen, 1 = activated, otherwise 0; recommended = 0
#define DEBUG_OTP 1 ///< Print OTP content, 0 = no, 1 = yes; recommended = 0
#define DEBUG_POWER 0 ///< Trace power management, 0 = no, 1 = yes; recommended = 0

On the hV_Board.h header file of the hV_Board_EXT3 library, set DEBUG_OTP to 1.

The option is activated by default on the Evaluation edition.

Power

///
/// @brief 12- Debug options
///
#define DEBUG_SPI_SCREEN 0 ///< SPI debugging for screen, 1 = activated, otherwise 0; recommended = 0
#define DEBUG_OTP 0 ///< Print OTP content, 0 = no, 1 = yes; recommended = 0
#define DEBUG_POWER 1 ///< Trace power management, 0 = no, 1 = yes; recommended = 0

On the hV_Board.h header file of the hV_Board_EXT3 library, set DEBUG_POWER to 1.

The option is activated by default on the Evaluation edition.

Use

The trace is sent to the default serial UART port.

Open a terminal to display the serial port.

The trace is generated by the log system.

Examples

Below are examples of the output for the different options.

SPI

hV = Begin
hV = SPI at 8 MHz

hV - ePaper_EXT3_Advanced_Library.ino
hV - Nov  3 2023 16:18:16

hV -                  b_reset
hV = SPI at 8 MHz
hV - Screen iTC 2.66"-F -iH 152x296
hV - PDLS Fast v7.0.2

hV -          b_sendIndexData [00] 0e 
hV -               b_waitBusy      HIGH
hV -          b_sendIndexData [e5] 59 
hV -          b_sendIndexData [e0] 02 
hV -          b_sendIndexData [00] df 02 
hV -          b_sendIndexData [50] 07 
hV -          b_sendIndexData [50] 27 
hV -          b_sendIndexData [10] 00 00 00 00 00 00 00 00 ... (5624)
hV -          b_sendIndexData [13] 00 00 00 00 00 00 00 00 ... (5624)
hV -          b_sendIndexData [50] 07 
hV -           b_sendCommand8 [04] 
hV -               b_waitBusy      HIGH
hV -           b_sendCommand8 [12] 
hV -               b_waitBusy      HIGH
hV -           b_sendCommand8 [02] 
hV -               b_waitBusy      HIGH

hV = End
hV = Exit with code 0
hV = Loop

OTP memory

hV = Begin

hV - ePaper_EXT3_Advanced_Library.ino
hV - Jun 16 2024 17:06:50

hV - Screen iTC 2.66"-BWR iH 152x296
hV - Number 266-JS-0C
hV - PDLS Global v8.0.3

const uint8_t COG_data[2] =
{
   0xcf, 0x8d  
} // 2
hV = SPI at 16 MHz

hV = End
hV = Exit with code 0
hV = Loop

Power

hV = Begin

hV - ePaper_EXT3_Advanced_Library.ino
hV - Jun 16 2024 17:12:37

hV - Screen iTC 2.66"-BWR iH 152x296
hV - Number 266-JS-0C
hV - PDLS Global v8.0.3

hV -          setPowerProfile MODE SPI.GPIO 01
hV -                 b_resume GPIO SPI.GPIO 00 -> 01
hV -                   resume GPIO SPI.GPIO 01 -> 01
hV -             s_getDataOTP  SPI SPI.GPIO 01 -> 01
hV = SPI at 16 MHz
hV -                   resume  SPI SPI.GPIO 01 -> 11
hV . DISPLAY_WHOAMI... 
hV -          setPowerProfile MODE SPI.GPIO 11
hV -                  suspend  SPI SPI.GPIO 11 -> 01
hV -                b_suspend GPIO SPI.GPIO 01 -> 00
hV . Done

hV . Regenerate... 
hV -                 b_resume GPIO SPI.GPIO 00 -> 01
hV -                   resume GPIO SPI.GPIO 01 -> 01
hV = SPI at 16 MHz
hV -                   resume  SPI SPI.GPIO 01 -> 11
hV -                  suspend  SPI SPI.GPIO 11 -> 01
hV -                b_suspend GPIO SPI.GPIO 01 -> 00

hV = End
hV = Exit with code 0
hV = Loop