2025-08-12 11:36 PM
I am trying to read ID and to write and read the data from the flash W25Q16JV with SPI2 of stm32L452CE connection, I am not even getting the ID from flash but SPI tx rx is getting HAL_OK. This wiring is working other code and providing unique ID from flash, but it is not working with my code. Please find the issue and update the corrected solution. In this I am using Mode 0 for flash. I have tried not SPI tx project and also FreeRTOS SPI task, but both are not giving ID or values. I will attach the project file with this, kindly check both and update the correct solution.
2025-08-21 1:33 AM
Hello @ela and welcome to the community;
Make sure that the NSS and SCK signals are toggling correctly. For that, please use an oscilloscope or logic analyzer to check the SPI signals (MOSI, MISO, SCK, and NSS).
Verify the wiring and ensure that all connections are secure and correct.
May these articles can help you to communicate with simple SPI-Flash memory
- How to add your SPI flash into the STM32CubeProgrammer’s external loader Part 1
- How to add your spi flash into the STM32CubeProgrammer's External Loader Part 2
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.