julianoes opened a new pull request, #17552:
URL: https://github.com/apache/nuttx/pull/17552
## Summary
Add MTD driver for Winbond W25N series SPI NAND flash.
Currently supports W25N01GV (1Gbit/128MB).
**Features**:
- Standard SPI interface with configurable frequency (up to 104 MHz)
- Hardware ECC enabled by default
- Block erase with sleep-based wait (releases SPI bus)
- Page read/write with busy-wait for fast operations
**Limitations**:
- No bad block management (BBM). Factory bad blocks and runtime bad blocks
are not tracked.
- No bad block table (BBT) scanning at initialization.
- No Quad SPI support (standard SPI only).
- No access to spare area (64 bytes/page) or OTP region.
## Impact
- Adds driver, should not affect anything existing.
## Testing
Tested using:
- Board with STM32H743
- W25N01GV on SPI at 96 MHz with DMA enabled
- Flash mounted using littlefs
- Tested using sdbench
```
W25N: SPI freq: requested=104000000, actual=96000000 Hz
W25N: MTD registered at /dev/mtd0
LittleFS mounted at /mnt
NuttShell (NSH) NuttX-12.11.0
nsh>
nsh>
nsh> sdbench -b 2048 -r 5 -d 5000
Using block size = 2048 bytes, sync = false
Testing Sequential Write Speed...
Run 1: 1750.5 KB/s, max write time: 48.000 ms (41.7 KB/s), fsync: 2.000
ms
Run 2: 1739.8 KB/s, max write time: 84.000 ms (23.8 KB/s), fsync: 3.000
ms
Run 3: 1733.0 KB/s, max write time: 85.000 ms (23.5 KB/s), fsync: 3.000
ms
Run 4: 1763.7 KB/s, max write time: 32.000 ms (62.5 KB/s), fsync: 2.000
ms
Run 5: 1763.7 KB/s, max write time: 19.000 ms (105.3 KB/s), fsync:
2.000 ms
Avg : 1750.1 KB/s, 42.748 MB written.
Testing Sequential Read Speed...
Run 1: 4842.0 KB/s, max read/verify time: 4.0000 ms (500.0 KB/s)
Run 2: 4976.9 KB/s, max read/verify time: 4.0000 ms (500.0 KB/s)
Avg : 4901.4 KB/s, 42.748 MB and verified
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]