1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

12 Commits

Author SHA1 Message Date
Benjamin Valentin
67417ce5a9 drivers/mtd_spi_nor: drop addr_width from mtd_spi_nor_params_t
This is now always determined at run-time.
2022-02-04 12:17:17 +01:00
Benjamin Valentin
4c282a3a41 drivers/mtd_spi_nor: set address width at run-time 2022-02-04 12:17:17 +01:00
Benjamin Valentin
53ca0dd1d0 drivers/mtd_spi_nor: define WP and HOLD pin
Hold and WP are not used by the driver, but if they are connected
to the flash they must be driven HIGH to enable writes and not stop
any flash operation.
2020-11-02 21:17:36 +01:00
Benjamin Valentin
fde3026312 drivers/mtd_spi_nor: prevent data corruption on 'sector erase'
There is no difference between 4k erase and sector erase.
But sector erase would previously do `.block_erase` which would not
erase a sector (4k) but a whole block (64k).

Fortunately all boards declare `SPI_NOR_F_SECT_4K` and all file systems
don't try to erase anything smaller, so this was never triggered.

Add an `assert(0)` to crash instead of corrupting data.
2020-10-26 13:48:26 +01:00
Benjamin Valentin
0425325260 drivers/mtd_spi_nor: use single transfer to read JEDEC ID
Just read the JEDEC ID with a single SPI transfer, there can only
be 10 banks.

This makes adaption to QSPI much simpler because now flash functions
don't call the SPI API directly anymore.
2020-10-26 13:02:09 +01:00
Francisco Molina
61eecf6fe0
drivers/mtd_spi_nor: power up MTD on init 2020-04-21 11:09:40 +02:00
dc04b86d1b
mtd_spi_nor: Add wait timings to parameters 2020-03-03 09:49:00 +01:00
e5fa8921b3
mtd_spi_nor: Move const params to separate struct 2020-02-11 15:55:41 +01:00
Vincent Dupont
53b3d1af78 mtd_spi_nor: add 4-byte address flash support 2018-05-14 15:05:24 +02:00
94c753c07a drivers: doxygen cleanup 2017-09-01 15:12:20 +02:00
0fcc7d3834 cleanup: apply headerguard script output 2017-05-24 17:54:02 +02:00
Joakim Nohlgård
9313d8ec67 mtd_spi_nor: MTD interface driver for SPI NOR flash memory
This is a generic SPI NOR flash driver which can be used with many
different flash chips.
2017-03-29 16:52:07 +02:00