Coder Social home page Coder Social logo

stm32-qspi-fat-usb's Introduction

stm32-qspi-fat-usb

STM32 Cube and System Workbench project for STM32L476 Discovery Board

description

A microcontroller in this projects functions as a USB flash drive. This drive contains the CONFIG.TXT file with a single decimal number in it between 1 and 999. This number can be altered by user after connecting the board into PC and modifying the file as usual.

After board startup this file is read by MCU and the number is assigned to the LED blinking half-period in milliseconds. The value 500 means that LED blinks every second.

The data is stored in the QSPI chip located on the board. This chip contains FAT file system which is accessed in read-write mode by PC and in read-only mode by MCU. The size of this flash is 16 MBit.

Code is mostly based on ST examples for USB Mass storage, QSPI devce and FAT file system.

start guide

Use the .ioc file to create SW ARM project for the Discovery board. Use the .bin image file to program QSPI flash on the Discovery board via STM32 St-Link utility (add external memory loader for the N25Q128A QSPI chip on the STM32L476 board). Make sure the files in /inc and /src directories are added to project. Compile the project and download the binary into MCU.

Working on Windows 10 and Linux (Ubuntu 16.04) as a usual flash drive without any additional operations.

Creating FAT image

This image was created in Ubuntu (VirtualBox VM) using the loop device. The file system was created with mkfs.fat with block size 4096. The subsector in QSPI chip has the same size, which simplifies write operations (subsector erase is required before any write operation).

stm32-qspi-fat-usb's People

Contributors

amvasil avatar amvasil-v avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.