Page 1 of 1

EFL Flash Sectors on STM32G0

Posted: Tue Apr 21, 2020 9:08 pm
by aport
Hi there,

I've been trying to use the EFL driver on an stm32g071 and I was running into some problems. I think the number of pages is incorrectly assigned which leads to sectors_size being 512 bytes instead of 2k.

As the datasheet specifies 32 or 64 pages of 2k, I changed the lines:

#define STM32_FLASH_SECTORS_TOTAL_64K 128
#define STM32_FLASH_SECTORS_TOTAL_128K 256

to

#define STM32_FLASH_SECTORS_TOTAL_64K 32
#define STM32_FLASH_SECTORS_TOTAL_128K 64

And everything started working as I expected.

Re: EFL Flash Sectors on STM32G0

Posted: Tue Apr 21, 2020 9:15 pm
by Giovanni
Hi,

Moving this topic to bug reports.

Giovanni

Re: EFL Flash Sectors on STM32G0

Posted: Wed Apr 22, 2020 7:55 am
by FXCoder
Fixed in trunk as bug #1085
Back ported to 20.3.x

Re: EFL Flash Sectors on STM32G0

Posted: Thu Apr 23, 2020 5:39 am
by aport
Awesome, thank you so much!