Skip to content

Generate a trace

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

This is especially useful to debug and 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
#define DEBUG_WIRE 0 ///< Trace Wire, 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.

Wire

///
/// @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 0 ///< Trace power management, 0 = no, 1 = yes; recommended = 0
#define DEBUG_WIRE 1 ///< Trace Wire, 0 = no, 1 = yes; recommended = 0

On the hV_Board.h header file of the hV_Board_EXT3 library, set DEBUG_WIRE 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
#define DEBUG_WIRE 0 ///< Trace Wire, 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
#define DEBUG_WIRE 0 ///< Trace Wire, 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

Wire

hV = Begin

hV - ePaper_EXT3_Advanced_Library.ino
hV - Aug 31 2024 15:15:11

hV - Screen iTC 2.71"-Fast+Touch iH
hV - Size 176x264
hV - Number 271-PS-09
hV - PDLS Touch v8.0.4

hV . OTP check passed - Bank 0, first 0xa5 as expected
hV = SPI at 16 MHz
hV -        hV_HAL_Wire_begin
hV -        hV_HAL_Wire write [41] 20 
hV -         hV_HAL_Wire read [41] b0 00 08 01 05 07 02 00 ... (10)

hV - DISPLAY_GUI_BUTTON... 
hV -        hV_HAL_Wire write [41] 10 
hV -         hV_HAL_Wire read [41] 00 
hV -        hV_HAL_Wire write [41] 10 
hV -         hV_HAL_Wire read [41] 00 
hV -        hV_HAL_Wire write [41] 10 
hV -         hV_HAL_Wire read [41] 01 
hV -        hV_HAL_Wire write [41] 11 
hV -         hV_HAL_Wire read [41] 81 00 64 00 b0 
hV -        hV_HAL_Wire write [41] 10 
hV -         hV_HAL_Wire read [41] 00 
hV -        hV_HAL_Wire write [41] 10 
hV -         hV_HAL_Wire read [41] 01 
hV -        hV_HAL_Wire write [41] 11 
hV -         hV_HAL_Wire read [41] 81 00 0c 00 12 
hV -        hV_HAL_Wire write [41] 10 
hV -         hV_HAL_Wire read [41] 01 
hV -        hV_HAL_Wire write [41] 11 
hV -         hV_HAL_Wire read [41] 81 00 0c 00 12 
hV -        hV_HAL_Wire write [41] 10 
hV -         hV_HAL_Wire read [41] 00 
hV -        hV_HAL_Wire write [41] 10 
hV -         hV_HAL_Wire read [41] 00 

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

hV . OTP check passed - Bank 0, first 0xa5 as expected

hV - const uint8_t COG_data[2] =
hV - {
hV -    0xcf, 0x8d  
hV - } // 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