Arduino Mega NOR Flash SPI + FatFs example in Microchip Studio 7

Опубликовано: 28 Апрель 2026
на канале: E-exp
558
10

In this video:
porting the NOR Flash io layer to the 8-bit platform,
using FatFs to write data to the NOR Flash,
basic UART setup,
basic SPI setup.

NOTICE
In project properties - toolchain - AVR/GNU C Compiler - Symbols add ACCESS_MEM_TO_RAM_ENABLED so the FatFs has access to the write/read functions in diskio.c.

If you are using a blank NOR Flash the f_open will return 0x0D = no filesystem, in this case you can use f_mkfs(0,0,512); to create a fat filesystem or you can use a board with USB Mass Storage(Arduino Due) to format the NOR Flash using a computer.

For the NOR Flash module you have to use a voltage level converter because the device operates at 3.3V, the Arduino Mega pins operate at 5V and over time this can damage the memory controller.

Link to the project:
https://github.com/E-exp/Arduino_ATMEGA