2020-11-13 04:51 AM
I'm using the X-CUBE-SBSFU bootloader on a ST STM32G474VE.
Sometimes NVIC_SystemReset is not resetting the controller, only a power reset helps. Any ideas? The string "Image correctly downloaded" i can see everytime!
/* System Reboot*/
printf(" -- Image correctly downloaded - reboot\r\n\n");
HAL_Delay(1000U);
NVIC_SystemReset();
Solved! Go to Solution.
2020-11-13 06:18 AM
@Community member I think the Option bytes was the solution, I changed them with the STM32 Cube Programmer the NRST Mode to 2, now its working and I can use PG10 as Push/Pull output
2020-11-13 05:00 AM
What you describe sounds like a latch-up issue.
If you drive NRST externally, with a push-pull driver, this can prevent the core from resetting.
ST, in more recent parts, has decided to have NRST not completely reset them. Several of the protection methods require a power-on-reset actually occur, otherwise system loader code will run, rather than your code in FLASH
2020-11-13 05:02 AM
Hi Clive
But it works like 70-80% of the updates...
Is there a precompiler setting or something to check? I'm using IAR.
Thaks
2020-11-13 05:03 AM
printf(" -- Image correctly downloaded - reboot\r\n\n");
HAL_Delay(1000U);
NVIC_SystemReset();
printf(" -- I'm not dead!!\r\n\n"); // If something is output, the mechanics of the pin are being interfered with
2020-11-13 05:04 AM
PG10I'm using as an output
2020-11-13 05:20 AM
Well I suppose that could complicate things. Not sufficiently read into the G4's to know the potential consequences of doing that.
You'd perhaps want to find a FAE to talk too, or file a Online Support Request to see if there is any gotchas. @Amel NASRI @Imen DAHMEN
Check also errata
You might try configuring the pin as an INPUT + PULL-UP prior to the NVIC_SystemReset()
>>But it works like 70-80% of the updates... Is there a precompiler setting or something to check? I'm using IAR.
Not sure it is something resolvable with a compiler setting
2020-11-13 05:51 AM
@Amel NASRI @Imen DAHMEN @Tilen MAJERLE
Do you have an idea about this topic? Can I use the NRST PG10 PIN as Output or not? In cubeMX I can set it as push-pull, hope this is no bug in the MX?
2020-11-13 05:55 AM
Try reconfiguring the pin right before use here, it will indicate if it is a HW level issue, or something else.
Probing via USART1 might tell you if it is in the System Loader ROM.
2020-11-13 06:03 AM
I saw this entry, Its not working correctly but I saw when I connect with multi meter to measure the voltage level on this PIN the Core is getting resetted even if the impedance is really high...
2020-11-13 06:18 AM
@Community member I think the Option bytes was the solution, I changed them with the STM32 Cube Programmer the NRST Mode to 2, now its working and I can use PG10 as Push/Pull output