提交 6b3ea6df 编写于 作者: wuyangyong's avatar wuyangyong

chage SPI_FLASH timeout

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@449 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 db6aa746
#include <stm32f10x.h>
#include "spi_flash.h"
#include "rtthread.h"
extern unsigned char SPI_WriteByte(unsigned char data);
......@@ -77,13 +78,17 @@ static unsigned char AT45DB_StatusRegisterRead(void)
static void wait_busy(void)
{
unsigned int i=0;
while (i++<2000)
while (i++<3000)
{
if (AT45DB_StatusRegisterRead()&0x80)
{
break;
}
}
if( !(i<3000) )
{
rt_kprintf("\r\nSPI_FLASH timeout!!!");
}
}
static void read_page(unsigned int page,unsigned char * pHeader)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册