Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/P-NUCLEO-WB55.Nucleo/Applications/CKS/CKS_Crypt/Core/Src/main.c')
-rw-r--r--Projects/P-NUCLEO-WB55.Nucleo/Applications/CKS/CKS_Crypt/Core/Src/main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/Projects/P-NUCLEO-WB55.Nucleo/Applications/CKS/CKS_Crypt/Core/Src/main.c b/Projects/P-NUCLEO-WB55.Nucleo/Applications/CKS/CKS_Crypt/Core/Src/main.c
index 32536dbd6..6f45902af 100644
--- a/Projects/P-NUCLEO-WB55.Nucleo/Applications/CKS/CKS_Crypt/Core/Src/main.c
+++ b/Projects/P-NUCLEO-WB55.Nucleo/Applications/CKS/CKS_Crypt/Core/Src/main.c
@@ -45,6 +45,11 @@ static void Error_Handler(void);
int main(void)
{
+ /**
+ * The OPTVERR flag is wrongly set at power on
+ * It shall be cleared before using any HAL_FLASH_xxx() api
+ */
+ __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR);
/* MCU Configuration--------------------------------------------------------*/
@@ -140,11 +145,10 @@ static void SystemClock_Config(void)
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
- /** Configure the main internal regulator output voltage
+ /** Configure the main internal regulator output voltage
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
- /** Initializes the RCC Oscillators according to the specified parameters
- * in the RCC_OscInitTypeDef structure.
+ /** Initializes the CPU, AHB and APB busses clocks
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_LSI1
|RCC_OSCILLATORTYPE_HSE|RCC_OSCILLATORTYPE_LSE|RCC_OSCILLATORTYPE_HSI48;
@@ -159,7 +163,7 @@ static void SystemClock_Config(void)
{
Error_Handler();
}
- /** Configure the SYSCLKSource, HCLK, PCLK1 and PCLK2 clocks dividers
+ /** Configure the SYSCLKSource, HCLK, PCLK1 and PCLK2 clocks dividers
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK4|RCC_CLOCKTYPE_HCLK2
|RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK