2023-05-28 11:48 PM
I have a very odd problem. I am using the STM32G473 and have configured the clock to 170MHz. When the code runs it drops to default_handler every time after setting up the clock. Not unusual if there is no ISR or call back set up. However if i set the clock to 150MHz it works perfectly. To run at 170MHz the R1MODE needs to be cleared in the PWR register i have done this. Is there another register that needs to be set up to operate at the full 170MHz.
2023-05-29 09:36 PM
Try 130 MHz. If same as 170, probably a sw bug where there are some #define for the core frequency....
2023-05-30 12:57 AM
Isn't there simply a software bug, as S.Ma said above? Try to debug the hardfault as usually, i.e. looking at the stacked PC and walking back in that code.
JW
2023-05-30 06:21 PM
Hi JW that is a great idea, i had not thought of doing that. Will try and post back after i try it.