bsp/p-nucleo-wb55: Fill hal_bsp_deinit function
De-initialization (disabling of all peripherals that may be used by bootloader
to avoid confusion in application.
@@ -100,6 +100,25 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
+ RCC->AHB1ENR = 0;
+ RCC->AHB2ENR = 0;
+ RCC->AHB3ENR = RCC_AHB3ENR_FLASHEN | RCC_AHB3ENR_HSEMEN;
+ RCC->APB1ENR1 = RCC_APB1ENR1_RTCAPBEN;
+ RCC->APB1ENR2 = 0;
+ RCC->APB2ENR = 0;
+ RCC->AHB1RSTR = 0x00011007;
+ RCC->AHB2RSTR = 0x0001209F;
+ RCC->AHB3RSTR = 0x021F1000;
+ RCC->APB1RSTR1 = 0x85A04201;
+ RCC->APB1RSTR2 = 0x00000021;
+ RCC->APB2RSTR = 0x00265800;
+
+ RCC->AHB1RSTR = 0;
+ RCC->AHB2RSTR = 0;
+ RCC->AHB3RSTR = 0;
+ RCC->APB1RSTR1 = 0;
+ RCC->APB1RSTR2 = 0;
+ RCC->APB2RSTR = 0;
}
/**
