4317 views|1 replies

9

Posts

0

Resources
The OP
 

STM32+W25Q64 failed to read and write external flash [Copy link]

Several interfaces were made using emwin, and several parameters were stored in the external flash. //Initialize the IO port of SPI FLASH void W25QXX_Init(void) { SPI_FLASH_TYPE=SPI_Flash_ReadID();//Read FLASH ID. SPI_FLASH_TYPE=SPI_Flash_ReadID();//Read FLASH ID. while(SPI_FLASH_TYPE!=W25Q64) { MX_SPI1_Init(); SPI_FLASH_TYPE=SPI_Flash_ReadID();//Read FLASH ID. LCD_ShowString(30,130,200,16,16,"W25Q64 Error!"); } } When it was powered on for the first time, it prompted an error but still started normally. It was normal to switch between several interfaces that did not require reading external flash, but it was stuck waiting for BUSY to be idle when it came to the interface that required reading flash. When it was simulated with keil, it was stuck in while(SPI_FLASH_TYPE!=W25Q64) { MX_SPI1_Init(); SPI_FLASH_TYPE=SPI_Flash_ReadID();//Read FLASH ID. LCD_ShowString(30,130,200,16,16,"W25Q64 Error!"); } when it was reset and restarted. It can only be restarted after powering off again. The SPI configuration was done directly through STM32cubemx, so there should be no problem. Now I can't find where the problem is.

This post is from stm32/stm8

Latest reply

It's such a simple thing, yet you can't figure it out  Details Published on 2019-4-28 17:50
 

1903

Posts

0

Resources
2
 
It's such a simple thing, yet you can't figure it out
This post is from stm32/stm8
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list