Crazy-Geeks / STM32-W25Q-QSPI

STM32 Winbond W25Q memory Quad SPI Driver
https://crazy-geeks.github.io/STM32-W25Q-QSPI/
MIT License
80 stars 27 forks source link

Null pointer #5

Open Konstantinqwe opened 1 year ago

Konstantinqwe commented 1 year ago

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.

deividAlfa commented 1 year ago

Fixed in 509c2be31814304888fa193097e457c9e8d41352