Microchip Technology Power Debugger Manual page 44

Table of Contents

Advertisement

Important:  Declaring variables you are interested in polling as volatile will ensure that they are placed in
SRAM and that their values will not be cached in registers by the compiler. Registers cannot be polled,
only SRAM locations.
Tip:  Data polling operates on absolute SRAM locations. It is thus advised to use global variables for this
purpose so that they are always available at the same location in SRAM. Polling locations in the stack can
yield unpredictable results based on the stack context at the time of polling.
To do:  Modify the two ̔ s tartʼ functions in ui.c to increment read and write counters on each access started.
void
ui_start_read(void)
{
port_pin_set_output_level(EXT1_PIN_GPIO_0, true);
read_count++;
}
void
ui_start_write(void)
{
port_pin_set_output_level(EXT1_PIN_GPIO_1, true);
write_count++;
}
To do: 
Build the project/solution (F7)
Open Data Visualizer
Connect
For data polling functionality, enable the Code Profiling interface.
To do: 
Start the Data Visualizer session
Launch the debug session using Start Debugging and Break (Alt + F5)
Data polling operates on SRAM locations, so to find out where variables are located in SRAM we need to use the
Atmel Studio Watch window.
©
2020 Microchip Technology Inc.
User Guide
Power Debugger
Detailed Use Cases
DS40002201A-page 44

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Power Debugger and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents