- Erase last page of flash memory if once there is no more space available to log new error entries, the save entry to the first double word
- HAL_FLASHEx_Erase
- Used FLASH_BANK_1 for FLASH_ErasteInitTypeDef.bank value
- Learned that if you press CTR + <Space Bar> allows for "auto-complete"
- Figured out why the STM32G030F6Px microcontroller has 32 pages of 2kB Flash memory as opposed to 16 pages when the official FLASH size is 32Kbytes
- Due to how STMicroelectronics manufactures and markets its chips
- 32 KB (Total Flash Size) / 2 KB (Page Size) = 16 pages, so this expecation is that there would only be 16 pages, 0 to 15
- Discrepency due to "die harvesting" or "untamed flash":
- 1. Common Silicon Die
- company often uses the same physical silicon chip (die) for an entire series of microcontrollers, such as the STM32G0 line, which can have max Flash sizes up to 64KB or 128KB
- 2. Marketing and Testing Limits
- STM32G030F6Px is officially specified in the datasheet to have only 32KB of Flash memory
- ** This means that the company only guarantees that the first 32KB (Page 0 to Page 15) will work perfectly across all operating conditions
- They may disable or not guarantee the use of the rest of Flash memory
- 3. Untested/Unused Flash
- Since the physcial chip is often a larger die (like the one used for teh 64KB or 128KB version), it physically contains more Flash memory thatn 32KB specified
- Page 31 is a physically present but officially unsupported section of the chip's Flash memory
- The fact that it worked is a very common experience
- 1. Common Silicon Die
- #2 STM32 HAL (Flash Memory (read and erase data))
Ghani Lawal
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.