GithubHelp home page GithubHelp logo

bikashjana93 / winbond-w25q32jv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mhollands/winbond-w25q32jv

0.0 0.0 0.0 13 KB

Basic mbed library for peeking and poking a Winbond W25Q32JV

C++ 71.78% Python 28.22%

winbond-w25q32jv's Introduction

Winbond-W25Q32JV

Basic mbed library for peeking and poking a Winbond W25Q32JV over serial bus. Implemented on MBED L031K6 however should be easy enough to convert to other MBED devices or even any other microcontroller with a SPI bus.

MBED Code

The MBED code opens a serial connection to your PC over USB. Use a program like RealTerm (Windows) or Minicom (Linux) to interact with it. Baud rate is 115200 baud. A python script is provided to copy files from your PC onto the chip.

Code will ask for a 4 character command. The first character indicates the command to execute and the next 3 characters are the arguments. Not all commands use all 3 arguments (some use no arguments).

c - reset chip, no arguments
h - toggle hex mode, no arguments d - erase chip, no arguments
i - read manufacturer and device ID, no arguments
r - read page, arguments are the three bytes which make up the address of the location to read
R - read 32 pages, arguments are the three bytes which make up the address of the location to read
q - enable writing, no arguments
b - load buffer page
w - write contexts of buffer to memory location, arguments are the three bytes which make up the address of the location to write
e - erase page, arguments are the three bytes which make up the address of the location to erase
x - quit program, no arguments

Write enable must be performed before each write or erase command.

Debugging Minicom

Some tips for using Minicom on Linux to interact with the MBED code.

sudo minicom --device /dev/ttyACM* --baudrate 9600

Ensure 'Hardware Flow Control' is set to 'No' in 'Serial port setup' in configuration.

Python Code

Run the script file_to_flash.py with two arguments - the serial port and the file name.

E.g. python /dev/ttyACM1 myfile.txt would copy myfile.txt onto the chip via serial port ttyACM1.

winbond-w25q32jv's People

Contributors

mhollands 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.