mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 15:25:36 +03:00
16Mbyte SPI flash memory support
Add Winbond W25Q128 Add Micron N25Q128 Fix datatype for flash gemometry Blackbox documentation update
This commit is contained in:
parent
4f860dd6f1
commit
033e47ebc9
3 changed files with 12 additions and 2 deletions
|
@ -146,6 +146,8 @@ These chips are also supported:
|
||||||
* Micron/ST M25P16 - 16 Mbit
|
* Micron/ST M25P16 - 16 Mbit
|
||||||
* Micron N25Q064 - 64 Mbit
|
* Micron N25Q064 - 64 Mbit
|
||||||
* Winbond W25Q64 - 64 Mbit
|
* Winbond W25Q64 - 64 Mbit
|
||||||
|
* Micron N25Q0128 - 128 Mbit
|
||||||
|
* Winbond W25Q128 - 128 Mbit
|
||||||
|
|
||||||
## Enabling the Blackbox (CLI)
|
## Enabling the Blackbox (CLI)
|
||||||
In the [Cleanflight Configurator][] , enter the CLI tab. Enable the Blackbox feature by typing in `feature BLACKBOX` and
|
In the [Cleanflight Configurator][] , enter the CLI tab. Enable the Blackbox feature by typing in `feature BLACKBOX` and
|
||||||
|
@ -242,4 +244,4 @@ tool:
|
||||||
|
|
||||||
https://github.com/cleanflight/blackbox-log-viewer
|
https://github.com/cleanflight/blackbox-log-viewer
|
||||||
|
|
||||||
This allows you to scroll around a graphed version of your log and examine your log in detail.
|
This allows you to scroll around a graphed version of your log and examine your log in detail.
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef struct flashGeometry_t {
|
typedef struct flashGeometry_t {
|
||||||
uint8_t sectors; // Count of the number of erasable blocks on the device
|
uint16_t sectors; // Count of the number of erasable blocks on the device
|
||||||
|
|
||||||
uint16_t pagesPerSector;
|
uint16_t pagesPerSector;
|
||||||
uint16_t pageSize; // In bytes
|
uint16_t pageSize; // In bytes
|
||||||
|
|
|
@ -42,6 +42,8 @@
|
||||||
#define JEDEC_ID_MICRON_M25P16 0x202015
|
#define JEDEC_ID_MICRON_M25P16 0x202015
|
||||||
#define JEDEC_ID_MICRON_N25Q064 0x20BA17
|
#define JEDEC_ID_MICRON_N25Q064 0x20BA17
|
||||||
#define JEDEC_ID_WINBOND_W25Q64 0xEF4017
|
#define JEDEC_ID_WINBOND_W25Q64 0xEF4017
|
||||||
|
#define JEDEC_ID_MICRON_N25Q128 0x20ba18
|
||||||
|
#define JEDEC_ID_WINBOND_W25Q128 0xEF4018
|
||||||
|
|
||||||
#define DISABLE_M25P16 GPIO_SetBits(M25P16_CS_GPIO, M25P16_CS_PIN)
|
#define DISABLE_M25P16 GPIO_SetBits(M25P16_CS_GPIO, M25P16_CS_PIN)
|
||||||
#define ENABLE_M25P16 GPIO_ResetBits(M25P16_CS_GPIO, M25P16_CS_PIN)
|
#define ENABLE_M25P16 GPIO_ResetBits(M25P16_CS_GPIO, M25P16_CS_PIN)
|
||||||
|
@ -160,6 +162,12 @@ static bool m25p16_readIdentification()
|
||||||
geometry.pagesPerSector = 256;
|
geometry.pagesPerSector = 256;
|
||||||
geometry.pageSize = 256;
|
geometry.pageSize = 256;
|
||||||
break;
|
break;
|
||||||
|
case JEDEC_ID_MICRON_N25Q128:
|
||||||
|
case JEDEC_ID_WINBOND_W25Q128:
|
||||||
|
geometry.sectors = 256;
|
||||||
|
geometry.pagesPerSector = 256;
|
||||||
|
geometry.pageSize = 256;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// Unsupported chip or not an SPI NOR flash
|
// Unsupported chip or not an SPI NOR flash
|
||||||
geometry.sectors = 0;
|
geometry.sectors = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue