Need help with obscure Hard Fault on reset!!
We've got a bizarre Hard Fault on STM32L452. It happens immediately after reset, and ONLY after programming our bootloader with the CubeProgrammer after doing a full chip erase. If one subsequently programs the bootloader again using the same hex file but not performing the full chip erase, the problem will vanish and never return until the full chip erase sequence and programming sequence is repeated. And it doesn't always happen. It's plaguing us. It feels like a tool issue, but until we understand, it is very worrying.
I've instrumented the state of a number of relevant registers in the hard fault handler, using code found on the internet. But I'm having trouble understanding what the state of the registers implies. Any help by folks here who really understand this part of the architecture would be appreciate, particularly the fact that the hard fault seems to triggered by a debug event. It makes little sense to us, as does the fact that the PC is seemingly set to the beginning of data memory.

