USB Library
Using breakpoints in USB host applications

This section describes how to use breakpoints when running a USB host application without causing communication issues. 

USB has a periodic packet that is sent on the bus once every millisecond, called the start of frame (SOF) packet, that is used to keep the bus from going into an idle/suspended state. When a the microcontroller hits a breakpoint, both the CPU and the modules on the device stop operation. This will cause the attached USB device to enter the suspend mode. Some programmers implement a method that allows specified peripherals to continue to run even after a breakpoint occurs. This section describes how to enable this feature for the USB peripheral on PIC24F and PIC32 devices. 

 

MPLAB v8.x

1) Select the desired debugger from the debugger menu 

2) Go to the “Debugger->Settings” menu option 

 

3) Go to the Freeze on Halt tab. For PIC24F devices, uncheck the UCNFG1 box. For PIC32 devices, uncheck the “All other peripherals” box located below the scrolling menu. 

PIC24F 

PIC24F 

PIC32 

PIC32 

MPLAB X

1) In the projects window, right click on the project you are working on and select properties from the menu that appears. 

 

2) In the properties window, select the debugger that you are currently using from the Categories navigation pane. 

3) In the resulting form, select "Freeze Peripherals" in the "Option Categories" drop down box. 

 

4) In the resulting list uncheck the box corresponding to the USB peripheral. If there is not one on the list, uncheck "All other peripherals". Please note that on PIC24F the USB module may be named UCNFG1. 

 

 

MLA - USB Library Help Version : 2.16
http://www.microchip.com/mla