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 ̔startʼ 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);
rea+;
}
void
ui_start_write(
void
)
{
port_pin_set_output_level(EXT1_PIN_GPIO_1, true);
writ+;
}
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.
Power Debugger
Detailed Use Cases
©
2020 Microchip Technology Inc.
User Guide
DS40002201A-page 44