I'm debugging an issue on an STM32G431 (32bit M4 core) where when I start a motor the debugger crashes. By crashing I mean all windows turn to garbage and I no longer have debugger control of the MCU. Before I start the motor the JTAG runs fine and displays and updates windows as I would expect.
My question is do the five JTAG lines need any special configuring? I read in ref manual that after reset they come up in a mode to operate as JTAG pins so I am not doing anything with them in the code. Also, I do not have any external pull-ups or pull downs, as the reference manual says this is done in the MCU.
Do these pins need to be 'locked' so that other code cannot accidently change the configuration or write to them?
I am using Keil MDK5 latest version and the Segger J-Link EDU with latest drivers.
Thanks for your help,
Brian
Ronan Synnott said:You may wish to post your question to the STM32 forum if you have not already
+1
If specific configuration of the pins is required/possible, that would be manufacturer-specific - so not an ARM question.
In many cases it is possible to disable the debug access; eg, for low power, for security, or just to gain a few extra pins - but, again, this is manufacturer specific.
You also mention a motor - so there could also be hardware issues with noise, interference, supply spikes, droops , etc ...
ST's motor control forum:
https://community.st.com/s/topic/0TO0X000000BSqZWAW/power-management-and-motor-control