1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00
Commit graph

29 commits

Author SHA1 Message Date
Michael Keller
8ca4fdc586
Merge pull request #10865 from mikeller/change_spi_dma_owner_naming 2021-08-11 00:00:29 +12:00
Steve Evans
f226fe7c5c Fix chipID decode 2021-07-28 18:04:22 +01:00
Michael Keller
f4d840f5f8 Changed naming of SPI DMA resources to reflect the SPI bus number. 2021-07-28 00:55:55 +12:00
Steve Evans
432b80167f Added non-blocking SPI DMA support for access to FLASH for BB 2021-07-25 23:58:46 +01:00
Steve Evans
87c8847c13 New SPI API supporting DMA
Call targetConfiguration() once before config is loaded and again afterwards in case the config needs to be changed to load from SD card etc

Drop SPI clock during binding

Remove debug

Add per device SPI DMA enable

Fix sdioPinConfigure() declaration warning

Reduce clock speed during SPI RX initialisation
2021-07-25 12:40:25 +12:00
Dominic Clifton
c8e741bd18 Add W25Q128FV driver (QSPI only)
* Enable QSPI flash chip drivers on NUCLEOH743 for some CI visibility.
* Rework QSPI flash detection.
* Supports chips that are in QSPI mode by default (factory).
* Supports chips that are in QSPI mode due to configuration (e.g. Quad
Enable in Non-Volatile on W25Q128FV)
* Supports chips that need 8 dummy bytes (e.g. W25Q128JV) and ones that
don't (e.g. W25N01G)
2021-04-28 05:30:08 +02:00
Steve Evans
31b06cd7d2 Add USB MSC support for H7 2020-10-30 19:30:38 +00:00
Steve Evans
41a0ca43d1 Run SPI FLASH at full speed 2020-10-27 00:17:34 +00:00
jflyper
ff16686893 White space tidy 2020-02-17 23:54:57 +13:00
jflyper
ce8e6b2947 [FLASH] Include W25M02G in QuadSPI detection 2020-01-20 21:24:19 +09:00
mikeller
882000ddc6 Changed 'EEPROM_IN_...' to 'CONFIG_IN_...' for clarity. 2019-08-04 16:23:24 +12:00
Dominic Clifton
6189d6bdc5 Fix Flash API timeout issues.
Flash operations can specify how long to wait before the next operation
is issued.

Prior to this the amount of time waited, and when, was wrong.

e.g.
m25p16_eraseCompletely - possibly waits ages TO START, starts, exit.
m25p16_pageProgramContinue - waits DEFAULT_TIMEOUT_MILLIS to START,
starts, exits.

m25p16_pageProgramContinue would fail to write to the flash as the
device was still busy erasing and didn't wait long enough.


what happens now is:
m25p16_eraseCompletely - waits using the current timeout, starts, sets
timeout to be `now + BULK_ERASE_TIMEOUT_MILLIS`, exits.
m25p16_pageProgramContinue - waits using the current
`BULK_ERASE_TIMEOUT_MILLIS`, starts, exists, sets timeout to be `now +
DEFAULT_TIMEOUT_MILLIS`.

Since the timeout is stored in the flashDevice_t the solution also works
for multi-die devices which use an instance of flashDevice_t for each
die.
2019-06-09 20:31:24 +02:00
Bruce Luckcuck
aaa2f9682d Use full erase when possible for FLASHFS erase
If there is only a single partition, its type is FLASHFS, and it uses the entire geometry, then perform a full rather than a sector-based erase.

The full erase is significantly faster than erasing by individual sectors.
2019-05-25 12:23:59 -04:00
jflyper
f5084a59bd Partitions are now accessed by types rather than indices 2019-05-19 20:32:52 +09:00
Dominic Clifton
92999681e3 Add flash partitioning system 2019-05-18 21:39:08 +09:00
Dominic Clifton
dcd138ae20 Update flash drivers to support QuadSPI
- Update flash w25n01g driver to support QuadSPI.

- flash_m25p16 update for QuadSPI support

- w25m driver update for QuadSPI support

- Use 100Mhz (ULTRAFAST) clock for QuadSPI w25n01

- Conditionalize QUADSPI code in w25n01g driver

- Use handle instead of handle_u
2019-05-17 07:35:25 +09:00
jflyper
ee9022de1e Add Winbond W25N01G support 2019-05-14 22:42:47 +09:00
jflyper
4ab7ab03ef Protect flashInit from NULL SPI instance 2019-01-27 00:37:19 +09:00
jflyper
343e9b3a67 Allow mixed speed and mode on a SPI bus by CR1 caching 2019-01-14 03:34:27 +09:00
jflyper
9ea1428d11 Introduce per device pin pre-init 2018-12-13 11:15:26 +09:00
mikeller
c8e484df94 Renamed USE_FLASH to USE_FLASH_CHIP for clarity. 2018-11-25 13:47:31 +13:00
jflyper
f9a43099db SPI CS preinit for configurability 2018-05-24 22:00:26 +09:00
jflyper
36fb439d45 Change M25P16 to FLASH where appropriate 2018-05-02 21:26:47 +09:00
jflyper
7720e57d5c
Merge pull request #5776 from jflyper/bfdev-handle-overloaded-cs-pin
FLASH: Handle overloaded SPI CS pin
2018-05-01 10:55:13 +09:00
jflyper
ddd0dd14c8 Check if a CS pin is already owned by somebody else 2018-04-28 23:02:35 +09:00
blckmn
a9f74cd6df Removed excess trailing spaces before new lines on licenses. 2018-04-25 20:58:00 +10:00
blckmn
2be282e2d7 Some stragglers 2018-04-22 09:42:09 +10:00
jflyper
0306accf6e FLASH Add W25M homogeneous stack driver and W25M512 support (#5722)
* Winbond W25M homogeneous mode driver

* W25M512 support on OMNIBUSF4 variants
2018-04-20 16:37:48 +12:00
jflyper
864dba98c1 Prepare flash code for multiple device type support (#5683)
* Prepare flash drivers for multiple device type support

* Add static assertions on device page and flashfs alloc sizes.
2018-04-19 21:05:42 +12:00