Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

New Contributor II

When I run my project with the .hex that gets generated with the build setting set to "Debug" everything works great.  However, when I run with the .hex generated with the build setting set to "Release" it does not work so well.  I've seen this sort of thing before.  It's usually related to the debugger slowing things down a bit.  In this case, I am not running in the debugger.  That is, I simply program the PSoC with either version and let it run. 


The problem manifests itself as a "FAIL: CAN Srvc Mode" error (see attached project).  It seems that while running with release code the very first CAN message fails.  I put a long delay in prior to sending it but that didn't work.


I know this kind of thing is hard to troubleshoot without actually having hardware but any help would be much appreciated! 

1 Reply
Expert II

Check your COMM_ISR interrupt handler (and others if there are:


Every global variable that is changed in an interrupt handler MUST be declared as volatile


See here for a brief explanation.