1 Reply Latest reply on Feb 25, 2018 9:31 PM by HimaM_31

    PSoC4 CAN behavior changes with debugger attached




      I'm using a CY8C4247 for a CANBus based motor controller. Occasionally the system hangs completely and become unresponsive to any CAN messages, it seems like a firmware bug somewhere but I cannot get it to behave this way while debugging which is what is confusing me. Not every device on the bus hangs all the time, but occasionally they will (only tested it with 2 devices so far). I put an LED toggle in the CAN_ISR and it when it hangs it doesn't appear to be hitting the ISR.


      I'm working through to see if there is a sequence of commands that cause my firmware to lock up, but I'm curious what could change in debug mode? FWIW with the debugger hardware attached but not debugging it still hangs (so it doesn't appear to be a power or ground issue). Could the presence of the SWDCLK possibly be helping the HFCLK accuracy? I only ask as the only known hardware issue on the design right now is a missing WCO so I'm running the CAN at it's slowest speed and hoping for the best, so far it appears to be working ok (next hardware Rev will have WCO).