cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0B0KET6 - Writing Flash Memory Problem (Pages 382 & 383)

erkanc
Associate III

Hi everyone.

I caught a problem on STM32G0B0KET6. I want to write a data to main flash memory. But I detected that I can not  write any data page 382 and page 383. I only can not write to this pages. There are no problem for other pages. 

For this pages, I always took error(warning) of FLASH->SR : CFGBSY after when I write first word that is 32 bits.

 

I spent to find for two day for this problem. If I did not test other pages, I would have lost time more. I used HAL library for this process. 

Do you have any information about this problem?

Note: I write as Type of DoubleWord.

Thank you.

Best regards,

https://www.st.com/resource/en/reference_manual/rm0454-stm32g0x0-advanced-armbased-32bit-mcus-stmicroelectronics.pdf 

Page number for following SS: 55

erkanc_0-1726059825220.png

 

3 REPLIES 3
Sarra.S
ST Employee

Hello @erkanc

Please check if the write protection error flag (WRPERR) of the FLASH_SR register is set. 

Read 3.5.2 FLASH write protection (WRP) section in RM 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

I already tested it. If I write any data to page 382 and page 383, CFGBSY bit is stucted as set. But there is no problem for other pages.

 

Hello again @erkanc

Could share with us the sequence to write double word in these 2 pages 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.