Difference between revisions of "Circular buffer on flash"

From Stm32World Wiki
Jump to navigation Jump to search
Line 5: Line 5:
 
This naturally leads to the question if this extra flash could be used to store for example sensor data, and well, the answer to that question is: of course it can.
 
This naturally leads to the question if this extra flash could be used to store for example sensor data, and well, the answer to that question is: of course it can.
  
Before we dive into this in more detail, let me stress a big fat warning.  Just because something ''can'' be done that does not necessarily translate into that being a good idea.  In the STM32F103x8 datasheet, we find the following table:
+
Before we dive into this in more detail, let me stress a '''big fat warning'''.  Just because something ''can'' be done that does not necessarily translate into that being a good idea.  In the STM32F103x8 datasheet, we find the following table:
  
 
[[File:STM32F103 Data Retention.png|600px]]
 
[[File:STM32F103 Data Retention.png|600px]]

Revision as of 04:32, 21 July 2021

Green Pill rev. c

As is commonly known, many STM32 MCUs, including the STM32F103 used on the Blue Pill boards, contains more non-volatile flash storage than is advertised by ST. On my own Green Pill board a STM32F103C8 MCU is used. This MCU has got - according to ST, 64kB of flash, but in reality it is identical to the STM32F103CB and it does have 128kB of flash. This is documented in quite some detail here.

This naturally leads to the question if this extra flash could be used to store for example sensor data, and well, the answer to that question is: of course it can.

Before we dive into this in more detail, let me stress a big fat warning. Just because something can be done that does not necessarily translate into that being a good idea. In the STM32F103x8 datasheet, we find the following table:

STM32F103 Data Retention.png


STM32 Read internal temperature and voltage reference

STM32F103xx Flash Page Layout.png