openocd/src/flash/nor
Andreas Bolsch e44539d66c Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface
- write speed up to 150 kByte/s on STM32F469I-disco (due to
  SWD clock and USB connection), up to 1 MByte/s on Nucleo-F767ZI
  with external STLink-V3 or Nucleo-G474RE with two W25Q256FV in
  dual 4-line mode or STM32H73BI-Disco in octal mode
- tested with STM32L476G-disco (64MBit flash, 3-byte addr),
  STM32F412G-Disco, STM32F469I-Disco, STM32F746G-Disco, and
  STM32L476G-Disco (all 128Mbit flash, 3-byte addr),
  STM32F723E-Disco, STM32F769I-Disco (512Mbit flash, 4-byte addr)
  STM32L4R9I-Disco, STM32L4P5G-Disco (512MBit octo-flash, DTR, 4-byte addr)
  STM32H745I-Disco, STM32H747I-Disco (two 512MBit flash, 4-byte addr)
  STM32H73BI-Disco, STM32H735G-Disco (512MBit octo-flash, DTR, 4-byte addr)
- suitable cfg for Discovery boards included
- limited parsing of SFDP data if flash device not hardcoded
  (tested only in single/quad mode as most devices either don't
  support SFDP at all or have empty(!) SFDP memory)
- 'set' command for auto detection override (e. g. for EEPROMs)
- 'cmd' command for arbitrary SPI commands (reconfiguration, testing etc.)
- makefile for creation of binary loader files
- tcl/board/stm32f469discovery.cfg superseded by stm32f469i-disco.cfg
- tcl/board/stm32f7discovery.cfg removed as name is ambiguous
  (superseded by stm32f746g-disco.cfg vs. stm32f769i-disco.cfg)
- dual 4-line mode tested on Nucleo-F767ZI, Nucleo-H743ZI and Nucleo-H7A3ZI-Q
  with two W25Q256FV, and on Nucleo-L496ZP-P and Nucleo-L4R5ZI
  with two W25Q128FV, sample cfg files included and on STM32H745I-Disco,
  STM32H747I-Disco, STM32H750B-Disco
- read/verify/erase_check uses indirect read mode to work around silicon bug in
  H7, L4+ and MP1 memory mapped mode (last bytes not readable, accessing last
  bytes causes debug interface to hang)
- octospi supported only in single/dual 1-line, 2-line, 4-line
  and single 8-line modes, (not in hyper flash mode)

Requirements:
GPIOs must be initialized appropriately, and SPI flash chip be configured
appropriately (1-line ..., QPI, 4-byte addresses ...). This is board/chip
specific, cf. included cfg files. The driver infers most parameters from
current setting in CR, CCR, ... registers.

Change-Id: I54858fbbe8758c3a5fe58812e93f5f39514704f8
Signed-off-by: Andreas Bolsch <hyphen0break@gmail.com>
Reviewed-on: http://openocd.zylin.com/4321
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Christopher Head <chead@zaber.com>
2020-11-08 22:46:00 +00:00
..
aduc702x.c flash/nor: Use proper data types in driver API 2020-07-07 05:23:54 +01:00
aducm360.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
ambiqmicro.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
at91sam3.c flash: declare local symbols as static 2020-11-04 17:39:05 +00:00
at91sam4.c flash/nor/at91sam4: ATSAMG55x19 Rev.B 2020-10-14 05:40:27 +01:00
at91sam4l.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
at91sam7.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
at91samd.c flash: avoid checking for non NULL pointer to free it 2020-09-05 17:11:34 +01:00
ath79.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
atsame5.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
atsamv.c flash/nor/atsamv: fix clang static analyzer warning 2020-11-04 17:35:09 +00:00
avrf.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
bluenrg-x.c flash: declare local symbols as static 2020-11-04 17:39:05 +00:00
bluenrg-x.h bluenrg-x: simplyfied the driver 2020-03-07 15:31:09 +00:00
cc26xx.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
cc26xx.h flash/nor: Add support for TI CC26xx/CC13xx flash 2018-06-15 20:06:25 +01:00
cc3220sf.c flash: avoid checking for non NULL pointer to free it 2020-09-05 17:11:34 +01:00
cc3220sf.h flash/nor: Add support for TI CC3220SF internal flash 2018-06-06 15:38:25 +01:00
cfi.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
cfi.h flash/nor/cfi: Use 'bool' data type 2020-07-08 22:05:52 +01:00
core.c Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface 2020-11-08 22:46:00 +00:00
core.h Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface 2020-11-08 22:46:00 +00:00
driver.h Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface 2020-11-08 22:46:00 +00:00
drivers.c Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface 2020-11-08 22:46:00 +00:00
dsp5680xx_flash.c flash: fix typos and duplicated words 2020-07-26 20:13:22 +01:00
efm32.c flash: avoid checking for non NULL pointer to free it 2020-09-05 17:11:34 +01:00
em357.c flash: avoid checking for non NULL pointer to free it 2020-09-05 17:11:34 +01:00
esirisc_flash.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
faux.c flash/nor: Use proper data types in driver API 2020-07-07 05:23:54 +01:00
fespi.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
fm3.c flash: fix typos and duplicated words 2020-07-26 20:13:22 +01:00
fm4.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
imp.h Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface 2020-11-08 22:46:00 +00:00
jtagspi.c flash/nor/jtagspi: Use 'bool' data type 2020-07-08 22:06:17 +01:00
kinetis_ke.c flash: declare local symbols as static 2020-11-04 17:39:05 +00:00
kinetis.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
lpc288x.c flash: fix typos and duplicated words 2020-07-26 20:13:22 +01:00
lpc2000.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
lpc2900.c target/image: Use proper data types 2020-11-07 20:52:00 +00:00
lpcspifi.c coding style: fix space separation 2020-07-08 22:08:08 +01:00
Makefile.am Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface 2020-11-08 22:46:00 +00:00
max32xxx.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
mdr.c flash: avoid checking for non NULL pointer to free it 2020-09-05 17:11:34 +01:00
mrvlqspi.c flash: declare local symbols as static 2020-11-04 17:39:05 +00:00
msp432.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
msp432.h flash/nor: update support for TI MSP432 devices 2020-03-07 15:32:24 +00:00
niietcm4.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
non_cfi.c flash: fix typos and duplicated words 2020-07-26 20:13:22 +01:00
non_cfi.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nrf5.c flash/nor/nrf5: unify size of HWID 2020-10-28 10:51:57 +00:00
numicro.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
ocl.c flash/nor: Use proper data types in driver API 2020-07-07 05:23:54 +01:00
ocl.h flash: fix typos and duplicated words 2020-07-26 20:13:22 +01:00
pic32mx.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
psoc4.c flash: declare local symbols as static 2020-11-04 17:39:05 +00:00
psoc5lp.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
psoc6.c flash: declare local symbols as static 2020-11-04 17:39:05 +00:00
renesas_rpchf.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
sfdp.c Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface 2020-11-08 22:46:00 +00:00
sfdp.h Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface 2020-11-08 22:46:00 +00:00
sh_qspi.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
sim3x.c flash: avoid checking for non NULL pointer to free it 2020-09-05 17:11:34 +01:00
spi.c nor/spi.c: add N25Q032A flash chip 2020-08-02 10:47:29 +01:00
spi.h Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface 2020-11-08 22:46:00 +00:00
stellaris.c flash: avoid checking for non NULL pointer to free it 2020-09-05 17:11:34 +01:00
stm32f1x.c flash: avoid checking for non NULL pointer to free it 2020-09-05 17:11:34 +01:00
stm32f2x.c flash: avoid checking for non NULL pointer to free it 2020-09-05 17:11:34 +01:00
stm32h7x.c Add support of STM32H72x/73x 1M (0x483) 2020-09-27 17:39:59 +01:00
stm32l4x.c flash/stm32l4: add support of STM32G4 category 4 devices (G491/G4A1) 2020-10-22 21:23:43 +01:00
stm32l4x.h Flash driver for STM32G0xx and STM32G4xx 2020-03-16 15:25:10 +00:00
stm32lx.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
stmqspi.c Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface 2020-11-08 22:46:00 +00:00
stmqspi.h Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface 2020-11-08 22:46:00 +00:00
stmsmi.c Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface 2020-11-08 22:46:00 +00:00
str7x.c flash: fix typos and duplicated words 2020-07-26 20:13:22 +01:00
str9x.c flash: fix typos and duplicated words 2020-07-26 20:13:22 +01:00
str9xpec.c flash/nor: Use proper data types in driver API 2020-07-07 05:23:54 +01:00
swm050.c flash: avoid checking for non NULL pointer to free it 2020-09-05 17:11:34 +01:00
tcl.c Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface 2020-11-08 22:46:00 +00:00
tms470.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
virtual.c src/flash/nor/virtual: handle null pointers 2020-08-09 15:30:23 +01:00
w600.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
xcf.c flash: declare local symbols as static 2020-11-04 17:39:05 +00:00
xmc1xxx.c flash: use proper format with uint32_t 2020-09-05 17:12:32 +01:00
xmc4xxx.c flash: fix typos and duplicated words 2020-07-26 20:13:22 +01:00