中级会员
 
- 积分
- 302
- 金钱
- 302
- 注册时间
- 2015-7-16
- 在线时间
- 29 小时
|
发表于 2015-7-30 12:59:23
|
显示全部楼层
回复【87楼】Azer:
---------------------------------
我就是把这个函数给改回去了,八度大大是直接返回 malok.
这个函数在dfu_mal.c中
uint16_t MAL_GetStatus(uint32_t SectorAddress , uint8_t Cmd, uint8_t *buffer)
{
uint8_t x = (SectorAddress >> 26) & 0x03 ; /* 0x000000000 --> 0 */
/* 0x640000000 --> 1 */
/* 0x080000000 --> 2 */
uint8_t y = Cmd & 0x01;
SET_POLLING_TIMING(TimingTable[x][y]); /* x: Erase/Write Timing */
/* y: Media */
return MAL_OK;
}
然后前面删除的那个数组也要加回去
static const uint16_t TimingTable[5][2] =
{ /* Sector Erase time, Sector Program time*/
{ SPI_FLASH_SECTOR_ERASE_TIME, SPI_FLASH_SECTOR_WRITE_TIME }, /* SPI Flash */
{ M29W128F_SECTOR_ERASE_TIME, M29W128F_SECTOR_WRITE_TIME }, /* NOR Flash M29W128F */
{ INTERN_FLASH_SECTOR_ERASE_TIME, INTERN_FLASH_SECTOR_WRITE_TIME }, /* Internal Flash */
{ M29W128G_SECTOR_ERASE_TIME, M29W128G_SECTOR_WRITE_TIME }, /* NOR Flash M29W128G */
{ S29GL128_SECTOR_ERASE_TIME, S29GL128_SECTOR_WRITE_TIME } /* NOR Flash S29GL128 */
};
|
|