All Projects → lixpaulian → stm32f7-qspi

lixpaulian / stm32f7-qspi

Licence: MIT license
QSPI serial flash driver for the STM32F7xx family of controllers

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to stm32f7-qspi

FakeGPS
[NOT MAINTAINED] FakeGPS driver for Windows
Stars: ✭ 85 (+507.14%)
Mutual labels:  driver
lr1110 driver
Driver for LR1110 radio
Stars: ✭ 23 (+64.29%)
Mutual labels:  driver
Driver-Collider
Blocks drivers from loading by using a name collision technique. #nsacyber
Stars: ✭ 40 (+185.71%)
Mutual labels:  driver
logisim-7-segment-display-driver
➿ TTL-7447-like implementation for logisim
Stars: ✭ 28 (+100%)
Mutual labels:  driver
grabbitmq
A high-level RabbitMQ driver for Golang.
Stars: ✭ 16 (+14.29%)
Mutual labels:  driver
iomemory-vsl4
Updated Fusion-io iomemory VSL4 Linux (version 4.3.7) driver for recent kernels.
Stars: ✭ 42 (+200%)
Mutual labels:  driver
vmwmouse
VMware mouse driver for Windows 3.1
Stars: ✭ 315 (+2150%)
Mutual labels:  driver
windows-camera-class-filter-driver
An example of a camera class (upper) filter driver for Windows.
Stars: ✭ 27 (+92.86%)
Mutual labels:  driver
dragon
A host-based framework that transparently extends the GPU addressable global memory space beyond the host memory using NVM-backed data pointers
Stars: ✭ 49 (+250%)
Mutual labels:  driver
laravel-sybase
Connection and Laravel Eloquent driver for Sybase
Stars: ✭ 29 (+107.14%)
Mutual labels:  driver
faunadb-ruby
Ruby driver for FaunaDB
Stars: ✭ 37 (+164.29%)
Mutual labels:  driver
mongosh
The MongoDB Shell
Stars: ✭ 215 (+1435.71%)
Mutual labels:  driver
uchroma
An advanced driver for Razer Chroma hardware in Linux
Stars: ✭ 45 (+221.43%)
Mutual labels:  driver
mongodb-jdbc-driver
MongoDB JDBC Driver | DbSchema MongoDB Designer
Stars: ✭ 47 (+235.71%)
Mutual labels:  driver
MacchinaM2-J2534-Rust
Cross platform J2534 API for Macchinas M2 UTD module
Stars: ✭ 17 (+21.43%)
Mutual labels:  driver
hid-fanatecff
Driver to support ForceFeedback of the FANATEC CSL Elite Wheel Base
Stars: ✭ 81 (+478.57%)
Mutual labels:  driver
athenadriver
A fully-featured AWS Athena database driver (+ athenareader https://github.com/uber/athenadriver/tree/master/athenareader)
Stars: ✭ 116 (+728.57%)
Mutual labels:  driver
sx126x driver
Driver for SX126x radio
Stars: ✭ 41 (+192.86%)
Mutual labels:  driver
embedded-sht
Embedded SHT Drivers for Sensirion Temperature and Humidity Sensors - Download the Zip Package from the Release Page
Stars: ✭ 53 (+278.57%)
Mutual labels:  driver
mongodb-php-lib
MongoDB driver library for PHP
Stars: ✭ 16 (+14.29%)
Mutual labels:  driver

stm32f7-qspi

This is a QSPI serial flash driver for the STM32F7xx family of controllers.

Version

  • 2.2.4 (July 25, 2021)

License

  • MIT

Package

The driver is provided as an xPack and can be installed in an Eclipse based project using the attached script (however, the include and source paths must be manually added to the project in Eclipse). For more details on xPacks see https://github.com/xpacks. The installation script requires the helper scripts that can be found at https://github.com/xpacks/scripts.

Dependencies

The driver depends on the following software packages:

Alternatively, the CMSIS and HAL Library xPacks can be provided by ST's CubeMX code generator (recommened, as the STM32xxx xPacks will probably be discontinued).

The hardware initialisations (µController clock, peripherals clocks, etc.) must be separately performed, normaly in, or called from the initialize_hardware.c file of a GNU MCU Eclipse project. You can do this using the CubeMX code generator from ST. You may find helpful to check the following projects as references:

Since version 2.0 of the driver, the API has been changed for a better integration with the POSIX layer of µOS++. It is an implementation of an µOS++ block device. Although the driver is now more tightly coupled to the µOS++ ecosystem, it can be however ported to other RTOSes. It has been tested on the Winbond W25Q128FV and Micrel/ST MT25QL128ABA flash chips, but support for other devices will be added in the future.

An optional plain C API is also provided. Note that in the case of the C interface the qspi object is generated dynamically. However, this API may be discontinued in the future, as a better approach is to use the native C Posix interface offered through µOS++.

Short theory of operation

Most QSPI flash devices operate in two basic modes:

  • Extended SPI mode: instruction, address and data can be sent/received to/from the chip both in single and quad (or dual) mode (e.g. instruction and address in single line mode and data in quad mode).
  • Quad (or QPI) mode: the communication to/from the chip is done exclusively in quad mode.

A device cannot operate in both modes at the same time. There are provisions to switch the chip from one mode to the other, however there are differences on how the switch is done from chip to chip. There is also the danger that the flash chip and the controller get out of sync, e.g. if the controller is reset but the flash chip is not.

The philosophy behind the driver is that there is only one command executed in standard mode: read ID. This is done right after the system comes up and is initialized. If the chip is identified and known for the driver, it is immediately switched to quad mode. From now on, all commands are implemented in quad mode. If for any unforeseen reasons there is a need to switch back to standard mode, you can use the reset function call. For an example on how to use the driver, check out the "test" directory.

Tests

There is a test that must be run on a real target. Note that the test is distructive, the whole content of the flash will be lost! Test files are provided for both C++ and C APIs. To select what API to use, you have to set the proper value for the TEST_CPLUSPLUS_API symbol in the test-qspi-config.h file.

The test performs the following flash operations:

  • Switches the power-on
  • Reads-out the chip ID and initializes the internal driver structures (manufacturer, flash type, sector count and size)
  • Switches the flash to memory-mapped mode; the flash is mapped at the address 0x90000000
  • Checks if the flash is erased (all FFs); if it is not, the flash will be erased
  • Generates a stream of random bytes and writes them to the flash, one sector (4 KBytes at a time).
  • Compares the values written to the original values in RAM.
  • Switches the flash in deep sleep mode, then switches the power off.

The C++ version includes timings for most of the operations, whereas the C version does not.

In addition, a test is provided to assess compatibility with the ChaN FAT file system, offered through µOS++; for running this test, you need to install the ChaN FAT file system xPack at https://github.com/xpacks/chan-fatfs.git. This xPack contains among other things, a C++ diskio wrapper.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].