1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00
Commit graph

20 commits

Author SHA1 Message Date
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
jflyper
9ea1428d11 Introduce per device pin pre-init 2018-12-13 11:15:26 +09:00
blckmn
a9f74cd6df Removed excess trailing spaces before new lines on licenses. 2018-04-25 20:58:00 +10:00
blckmn
46fe22b4bd Direct license replacement 2018-04-22 09:22:46 +10: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
mikeller
09d396c05c Cleaned up parameter group handling.
Fixed missing include.
2017-12-31 10:51:01 +13:00
mikeller
429c6cecda Moved parameter group for flash into pg/. 2017-12-24 02:21:02 +13:00
jflyper
94e3273415 Merge pull request #3590 from martinbudden/bf_flash_config
Configurable FLASH
2017-07-30 19:01:26 +09:00
Martin Budden
0ddc4540cd Improved structure alignments 2017-07-29 15:16:01 +01:00
Martin Budden
9fe0e9eb2a Configurable FLASH 2017-07-21 17:18:51 +01:00
Martin Budden
8e79e8092e Fixed up whitespace 2017-01-22 22:42:45 +00:00
blckmn
f7518203aa Initial rework - removing target specific code from main.c
Moved FLASH to masterConfig
Moved LED (named statusLeds) to masterConfig
Fixed up some targets to remove defines from main.c
2016-12-10 10:35:17 +11:00
Petr Ledvina
8f3d9fae9a unify typedef struct name_s {} name_t; naming convention 2015-10-12 19:58:12 +01:00
Nicholas Sherlock
8a06849657 Improve flashfs codegen by fixing pagesize at a constant 256 bytes 2015-07-05 14:10:12 +12:00
Michael Jakob
033e47ebc9 16Mbyte SPI flash memory support
Add Winbond W25Q128
Add Micron N25Q128
Fix datatype for flash gemometry
Blackbox documentation update
2015-06-30 10:09:20 +02:00
Nicholas Sherlock
01b811cd8c Add support for Winbond 64Mbit SPI flash chip 2015-03-30 12:04:41 +13:00
Nicholas Sherlock
3eb28f16ea Basic read/write/erase flash functionality works from the CLI
Very little code coverage tested yet, only writes of small sizes
2015-01-28 17:45:36 +13:00