1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00
Commit graph

19 commits

Author SHA1 Message Date
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