11 Commits

Author SHA1 Message Date
Karl Palsson
ce787c0f40 stm32l1: flash: extract common code
Extracted all code that will be common with l0.  Compared with ref mans
for l0 and l4.  No functional change, just moving things getting ready.
2017-06-08 23:01:45 +00:00
Karl Palsson
950e064885 stm32l1: flash: avoid duplicate calls to unlock_pecr
Attempts to helpfully unlock PECR when required in unlock_progmem and
unlock_option_bytes actually cause a bus error due to repeated unlocks,
as per ref manual and tedious experience.  The better tested eeprom helper
routines unlock/lock in chunks, but that's not applicable for flash
writing.

Fixes: cf5fb002f6016242fb23b81fcbe98ee022bb84e9
2016-12-19 11:36:20 +00:00
Piotr Esden-Tempski
b1049f9a6f [Style] Stylefix sweep over the whole codebase. 2015-12-14 22:57:15 +01:00
Karl Palsson
8f06818f03 doc: flash: syntax check parameters
Mostly just cleans up warnings in doxygen, for most purposes the output is
similar enough to have not been noticed.
2015-10-15 00:54:04 +00:00
Karl Palsson
cf5fb002f6 [l1-flash/eeprom] Add lock/unlock/eeprom helper routines 2014-07-14 17:54:20 +00:00
Ken Sarkies
0af6d06eda Deduplication of flash code for STM32F0 and F1.
Extension of code for STM32F1 to allow for dual bank series XL.
Small changes to documentation for F2, F4 and L1 to add a parameter reference.

Tested with STM32F103RBT6
(note: tests show that the PG bit must be cleared after programming, otherwise
a subsequent erase attempt fails. This has been added to flash_program_half_word
for F0 and F1 only. A fix for the other families is not included in this PR.)
2014-02-06 00:52:42 +01:00
Ken Sarkies
a54a12e1c9 Documentation added to flash modules for all STM32 families. 2014-01-15 22:09:36 +01:00
Piotr Esden-Tempski
34de1e776e Changed to use stdint types. 2013-06-12 19:11:22 -07:00
Piotr Esden-Tempski
7df63fcae0 First coarse run to fix coding style in locm3.
Added --terse and --mailback options to the make stylecheck target. It
also does continue even if it enounters a possible error.

We decided on two exceptions from the linux kernel coding standard:
- Empty wait while loops may end with ; on the same line.
- All blocks after while, if, for have to be in brackets even if they
  only contain one statement. Otherwise it is easy to introduce an
  error.

Checkpatch needs to be adapted to reflect those changes.
2013-06-12 18:22:56 -07:00
Karl Palsson
c0ea749452 [flash] l1: use "proper" bit definition naming.
Part 1 of 4: updated l1 to use flash_<reg>_bit instead of just flash_bit
2013-01-23 13:58:06 +00:00
Karl Palsson
72666a5b93 [l1] Add Flash Memory Controller Register defns for L1.
Also, some of the most basic essential helper functions.
2012-11-14 00:16:46 +00:00