2019-07-02 08:56 PM
Hi All,
Calling HAL_DeInit() causes the STM32H7 micro to reset when it executes __HAL_RCC_AHB3_FORCE_RESET();
#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR=0xFFFFFFFFU)
HAL_StatusTypeDef HAL_DeInit(void)
{
/* Reset of all peripherals */
__HAL_RCC_AHB3_FORCE_RESET(); // <-- Causes CPU reset
__HAL_RCC_AHB3_RELEASE_RESET();
.
.
.
}
I assume it is because it is writing 1's to reserved bits. Replacing the macro with the following fixes the issue:
#define __HAL_RCC_AHB3_FORCE_RESET() RCC->AHB3RSTR |= (RCC_AHB3RSTR_MDMARST \
| RCC_AHB3RSTR_DMA2DRST \
| RCC_AHB3RSTR_JPGDECRST \
| RCC_AHB3RSTR_FMCRST \
| RCC_AHB3RSTR_QSPIRST \
| RCC_AHB3RSTR_SDMMC1RST)
I hope this gets fixed in the next HAL release. It caused me a lot of headaches :)
Cheers,
David
Solved! Go to Solution.
2021-07-14 12:29 AM
Sorry. As i see, it is fixed.
2019-07-03 02:19 AM
Hello @DOsbo ,
We raised this issue internally for check and we will come back to you soon with update.
Thanks for your contribution.
Best Regards,
Imen
2019-12-26 04:39 AM
Hello @DOsbo ,
Thanks for your proposal.
This issue will be fixed in the coming release.
Best Regards,
Imen
2021-07-14 12:29 AM
Sorry. As i see, it is fixed.