EasyManua.ls Logo

Espressif ESP32-S2 - Page 1412

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 4. API Guides
See Why stepping with nextdoes not bypass subroutine calls? for potential limitation of using next command.
Checking and setting memory To display or set contents of memory useMemorytab at the bottom ofDebug
perspective.
With the Memorytab, we will read from and write to the memory location 0x3FF44004 labeled as
GPIO_OUT_REG used to set and clear individual GPIOs.
For more information, see ESP32-S2 Technical Reference Manual > IO MUX and GPIO Matrix (GPIO, IO_MUX)
[PDF].
Being in the same blink.c project as before, set two breakpoints right after gpio_set_level instruction. Click
Memorytab and then Add Memory Monitorbutton. Enter 0x3FF44004 in provided dialog.
Now resume program by pressing F8 and observe Monitortab.
Fig. 34: Observing memory location 0x3FF44004 changing one bit to ON
You should see one bit being flipped over at memory location 0x3FF44004 (and LED changing the state) each time
F8 is pressed.
Fig. 35: Observing memory location 0x3FF44004 changing one bit to OFF
To set memory use the sameMonitortab and the same memory location. Type in alternate bit pattern as previously
observed. Immediately after pressing enter you will see LED changing the state.
Watching and setting program variables A common debugging tasks is checking the value of a program variable
as the program runs. To be able to demonstrate this functionality, update file blink.c by adding a declaration of
Espressif Systems 1401
Submit Document Feedback
Release v4.4

Table of Contents