Microchip Technology Power Debugger Manual page 37

Table of Contents

Advertisement

The blue graph is the A channel, and represents the current drawn by the target MCU only. It appears to draw about
4.5 mA continuously, with pulses of up to 10 mA, also at 1-second intervals.
Tip:  Of interest: disabling the USB 'disk' in the Windows device manager will stop this pulse from
occurring, indicating that this is probably triggered by an event from Windows.
To do:  Open the Windows explorer and perform a format of the Mass Storage Device.
Take care to format the right disk!
CAUTION
On the plot you should now see periods of much higher current consumption on both board and MCU channels, as
shown here:
3.2.10
GPIO Instrumentation
Pin toggling is often a simple and useful mechanism for debugging applications. We will now add some simple
instrumentation to profile the read and write cycles of the Mass Storage device.
To do:  Find the implementation of the ui_start_read () function in the file ui.c. This can be easily done by
opening ui.h, selecting the function, and using the Goto Implementation option on the context menu.
Add instrumentation as shown here, which toggles GPIO0 for read accesses and GPIO1 for write accesses:
void
ui_start_read(void)
{
// GPIO0 high
©
2020 Microchip Technology Inc.
User Guide
Power Debugger
Detailed Use Cases
DS40002201A-page 37

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