Hi,
are there any intentions to implement an internal flash driver which is able to write to the internal flash ROM and erase sectors at runtime?
The toolchain has to ensure that the memory area is reserved at compilation time so that the application does not try to erase itself, maybe via a kept section in the linker script. The flash ROM layout is very specific to the microcontroller so the lld had to define a memory layout definition or table. The write command could be a memory to memory dma transfer or?
The usecase is everywhere you need a non volatile memory without the need of an external storage device. For example to store configuration or calibration data.
To realize my application i wrote a simple specific iflash lld for the stm32f4 but in this initial version there is no dma tranfer and no layout table. There are just application blocking functions till now. There is a function to erase and write data. So there is no high level driver. But i think that it is possible because all controllers provide such a internal flash functionality.
If somebody needs the files look for the attachments.
Internal Flash Driver
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Internal Flash Driver
Hi,
In trunk code there is a generic flash class that could be used also for this.
Giovanni
In trunk code there is a generic flash class that could be used also for this.
Giovanni
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Internal Flash Driver
Hi,
Flash drivers could be located into device directories /hal/ports/STM32/STM32F4xx, in this case just hal_flash_lld.c/h.
If multiple devices can use the same flash driver then we could handle them as FLASHv1, FLASHv2 etc under /hal/ports/STM32/LLD/...
Such drivers do not exist yet, just a base class, so we can decide the conventions here.
Giovanni
Flash drivers could be located into device directories /hal/ports/STM32/STM32F4xx, in this case just hal_flash_lld.c/h.
If multiple devices can use the same flash driver then we could handle them as FLASHv1, FLASHv2 etc under /hal/ports/STM32/LLD/...
Such drivers do not exist yet, just a base class, so we can decide the conventions here.
Giovanni
-
- Posts: 137
- Joined: Fri May 08, 2015 1:09 pm
- Location: Dresden, Germany
- Has thanked: 10 times
- Been thanked: 5 times
Re: Internal Flash Driver
That sounds good.
When the generic flash contents will move to stable?
Shall the hal_flash.c and hal_flash.h also be the plattform independent high level part of the flash driver?
For data transfer we should use a DMA memory to memory transfer instead of a blocking software driven variant or?
When the generic flash contents will move to stable?
Shall the hal_flash.c and hal_flash.h also be the plattform independent high level part of the flash driver?
For data transfer we should use a DMA memory to memory transfer instead of a blocking software driven variant or?
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Internal Flash Driver
Hi,
It will be in next stable release.
The files you mentioned are the abstract interface and some common routines.
I think DMA is not required, the driver is synchronous with a "polled" option for erase operations. An example implementation is here \os\ex\Micron, it is for an external flash however, you don't need the JEST216 subclass.
Giovanni
It will be in next stable release.
The files you mentioned are the abstract interface and some common routines.
I think DMA is not required, the driver is synchronous with a "polled" option for erase operations. An example implementation is here \os\ex\Micron, it is for an external flash however, you don't need the JEST216 subclass.
Giovanni
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Internal Flash Driver
Hi,
The flash infrastructure changed in last release, probably that contributed code has to be adapted.
Giovanni
The flash infrastructure changed in last release, probably that contributed code has to be adapted.
Giovanni
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Return to “Development and Feedback”
Who is online
Users browsing this forum: No registered users and 20 guests