Coder Social home page Coder Social logo

crazy-geeks / stm32-w25q-qspi Goto Github PK

View Code? Open in Web Editor NEW
65.0 3.0 23.0 6.9 MB

STM32 Winbond W25Q memory Quad SPI Driver

Home Page: https://crazy-geeks.github.io/STM32-W25Q-QSPI/

License: MIT License

C 100.00%
c stm32 quadspi winbond w25q128 w25q256 hal crazy-geeks

stm32-w25q-qspi's People

Contributors

crazy-geeks avatar deividalfa avatar koynovstas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stm32-w25q-qspi's Issues

Fast Read QUAD IO error

Hey,

thank you very much for the amazing library. Everything is working fine, but when I try to read data using the Fast Read QUAD SPI 4IO I only receive the first few bytes. I am using a W25Q64JV. I tried using the single line read mode and it works fine.

In your read function you use 6 dummy cycles. The datasheet mentions that only 4 dummy cycles are needed. But also with changing that value I still receive wrong data. Do you have any idea what could cause this behavior? Is the fast read working for you?

Im using a Nucleo F767ZI discovery board running at 216 MHz with the QSPI clock prescaler set two 2 (should be 108 MHz on the QUAD SPI clock, which is fine).

W25Q_EraseBlock return W25Q_PARAM_ERR

size == 32 || size == 64 will return W25Q_PARAM_ERR.
I think Line 859 should be changed to
if (size != 32 && size != 64)
/**

  • @brief W25Q Block erase (32/64 KB)
  • Func to erase big block
  • @note Should be executed before writing
  • @param[in] BlockAddr Block start address
  • @param[in] size Size of block: 32KB or 64KB
  • @return W25Q_STATE enum
    */
    W25Q_STATE W25Q_EraseBlock(u32_t BlockAddr, u8_t size) {
    if (size != 32 || size != 64) <------------------------------------
    return W25Q_PARAM_ERR;
    if ((size == 64 && BlockAddr >= BLOCK_COUNT)
    || (size == 32 && BlockAddr >= BLOCK_COUNT * 2))
    return W25Q_PARAM_ERR;

Null pointer

Hello. Good library. But there is a bug. It have a function 'W25Q_ReadStatusStruct' and calls it from 'W25Q_Init' and others with argument NULL. I you have memory mapped to 0x0, the memory will be corrupted. I needed to use ITCM (0x0 address) in my stm32h7 and spent a day to to figure out the issue. So need to replace "status->BUSY = w25q_status.BUSY = SRs[0] & 0b1;" with "w25q_status.BUSY = SRs[0] & 0b1;" etc.
P.S. Need to implement DMA.

There is a definition error

Hello, there is a definition error in the driver you provided.
#define W25Q_WRITE_EXT_ADDR_REG 0xC8U ///< write extended addr reg (only in 3-byte mode)
The correct one is:
#define W25Q_WRITE_EXT_ADDR_REG 0xC5U

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.