AnsweredAssumed Answered

STM32F746 Firmware and Debugger Lockup

Question asked by jdbk on Aug 3, 2017
Latest reply on Apr 21, 2018 by Andrew Berry

We are seeing a lockup issue with a STM32F746 design.  On the surface it appears like a normal firmware lockup, then the watchdog triggers a reset and it recovers.  But if I disable the watchdog and try to use the debugger to see what has happened, I cannot get the debugger to connect.  Every time it hangs, the debug port is also inoperable until the processor is reset.  From my testing, it appears that the code is completely stopped.  Using GPIO toggles, I cannot detect any interrupt activity, but the LCD controller keeps refreshing the LCD and is reading the display data from SDRAM.


The issue can be quite infrequent.  The device uses a CAN connection, and I was not able to see it lockup until we had several other CAN devices on the network.  It also seems to be worse in the end application where there is much more CAN traffic, but if I generate CAN traffic using a USB-CAN adapter, I cannot get it to fail more frequently.  It sometimes will lockup a few times within an hour, or sometimes takes more than a day to occur.  Yet it does not seem dependent on the actual CAN traffic, since if I have two of the boards connected on the same CAN network, they do not lockup at the same time.


I have tried using the debugger ITM interface to output various debug info, but it seems to prevent or at least make the lockup much less frequent.  Most recently I created a trace buffer that gets dumped over ITM following a watchdog reset, but it has now run for 2 days without lockup.


Has anyone else seen something like this?  Does anyone know if there is anything firmware can do that could cause the debugger to fail to connect?  I did use the GPIO lock register to lock the configuration for the SWD pins, but the debugger still fails to connect once the board locks up.  I did not see any other registers that looked like they could prevent the debugger from working.  The product is already being produced installed in the end application, so any assistance would be appreciated.