2016-04-22 01:40 AM
I am using the STM32F091RC with the HAL libraries.
I am trying to gain access to the backup registers and I am trying:PWR->CR |= 0x100;to set bit 8. However it will not change the bit as though I am blocked out and it remains 0. I have tried calling HAL_PWR_EnableBkUpAccess(); but the bit still remains off. Any help would be really appreciated!thank you!2016-04-22 02:14 AM
Hi evans.mark.001,
Make sure that you have already enabled the PWR peripheral using __PWT_CLK_ENABLE(); before allowing access to backup domain./* Enable Power Clock */
__PWR_CLK_ENABLE();
/* Allow Access to RTC Backup domaine */
HAL_PWR_EnableBkUpAccess();
You can refer to examples in
http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/LN1897/PF260612
at this path :stm32cubef0\STM32Cube_FW_F0_V1.2.0\Projects\STM32091C_EVAL\Examples\PWR -Hannibal-