EFL driver for H7 devices

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
dflogeras
Posts: 232
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 8 times
Been thanked: 22 times

EFL driver for H7 devices

Post by dflogeras »

I know I asked recently about EFL on STM32L0 (and I still plan to contribute that when my project gets going).

Now, a different project means looking at the (quite) different H7 flash. My brief looking at the H742/3/53 group that my chip is within, yields:
  • These devices are all dual bank.
  • There doesn't seem to be an analog of running in single bank mode, like in the F7 series.
  • The registers in the FLASH peripheral that concern erasing and programming are all split into two (one for each bank).
So I guess I'm trying to implement what I need, but in a way I can contribute back to ChibiOS. I am tempted to just implement two drivers, EFL1, and EFL2 (one for each bank), since they seem to operate independently. The downside would be if someone wants to use the flash in a manner than spans both banks, it would push the complexity up. That's acceptable for my project, as I'll only be using it to program executable code. However the complexity might get out of hand on a filesystem that spans the banks.

The other approach would be to hide the two banks behind the API, and make it so that the driver figured out which registers to use, based on what sector an operation was performing on.

Any thoughts?
Has anyone took a stab at any of these more complex devices yet?
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: EFL driver for H7 devices

Post by Giovanni »

Hi,

Ideally all the complexity should be hidden behind the API (preferred solution) or making multiple .mk files (alternate solution) including the right one.

Giovanni
Post Reply