Release vs Debug Builds - One Works, One Doesn't

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by ajacks504 on Thu Apr 12 06:59:19 MST 2012
Hi All,

I have a very simple applications, it works like this:

Power on reset.
Send some TXT out of the SCI port.
Configure a SPI sensor (SSP0).
Send some more TXT out of the SCI port about the success or failure of configuring the the SPI sensor (SSP0).
Enter a infintite loop where I wait for a flag to be set by an interrupt with the "WFI" instruction.
If the flag gets set, I read the value of the SPI sensor (SSP0) and output it over the other SPI port (SSP1).

The flag is set in an interrupt routine on the falling edge of PIO1_0.

My code works great when I build the "debug" version and fails when I try the "release" version.  The way that it fails is this:

The SCI port output works, but it reports that configuring the SPI sensor fails, and I never hit my interrupt routine.  I know that I'm getting the interrupts in hardware, but my routine never gets hit.

So, right now, I'm guessing that somehow the SPI peripheral isn't being configured properly in the "release" version, but I have no clue as to why my interrupt routine isn't being hit.
Does anyone have any clues for me about the differences between "debug" and "release" builds that might cause such behavior?[/B]