Good evening,
The device under test is MicroChip USB Starter Kit 2.
The problem began appearing after adding some SPI initialization code to HID - Custom Demo program from 10-15-2012 microchip solutions framework.
Before the code was added everything in the demo worked perfectly
Code added was the following: right after
int main(void)
{
<pre>
int rData;
SPI1CON = 0;
rData=SPI1BUF;
IFS0CLR=0x03800000;
IPC5CLR=0x1f000000;
IPC5SET=0x0d000000;
IEC0SET=0x03800000;
SPI1BRG=30;
SPI1STATCLR=0x40;
SPI1CON=0x8260;
Immediately, after this was added, MPLabX began reporting
No source code lines were found at current PC 0x9d006474
the hex number changed depending on where I put the initialization code, but it never got past USBDeviceAttach();
Why is it that SPI is interfering with USB functionaly?
Notice that I commented out the line suggested by the FRM, assuming that this is the cause of those issues, but it was not.
//IEC0CLR=0x03800000; // disable all interrupts
Please let me know how this problem may be resolved.
Thank you,