Page 1 of 1

Dynamic Flash Size for STM32L4

Posted: Tue Mar 15, 2022 10:47 am
by JSStabl
Hi everyone,

we're trying to make our efl_lld descriptor automatically get adjusted to the MCU we are using, since the L4 has different flash sizes.

Due to the struct being const, we had to define a couple and then use an if/else to return the correct one:

https://github.com/Stabl-Energy/ChibiOS/pull/4/files (our chibiOS fork).

Is there a more elegant way to do this? Or was there a fix upstream we don't know about?

Regards
Julian

Re: Dynamic Flash Size for STM32L4

Posted: Tue Mar 15, 2022 11:15 am
by FXCoder
Hi,
Have a look at the L4+ EFL driver which does have differing sizes and dual bank support.

--
Bob