您尚未登录。

楼主 #1 2018-04-25 13:55:11

BugActiveDaughter
会员
注册时间: 2017-10-17
已发帖子: 118
积分: 117.5

stm32f429的nand hal 驱动有bug

HAL_NAND_Write_Page函数要多加一句   *(__IO uint8_t *)((uint32_t)(deviceaddress | ADDR_AREA)) = 0x00U; ,如下
/* Send read page command sequence */
    *(__IO uint8_t *)((uint32_t)(deviceaddress | CMD_AREA)) = NAND_CMD_AREA_A;
   
    *(__IO uint8_t *)((uint32_t)(deviceaddress | ADDR_AREA)) = 0x00U;
    *(__IO uint8_t *)((uint32_t)(deviceaddress | ADDR_AREA)) = 0x00U; //add
    *(__IO uint8_t *)((uint32_t)(deviceaddress | ADDR_AREA)) = ADDR_1ST_CYCLE(addressoffset);
    *(__IO uint8_t *)((uint32_t)(deviceaddress | ADDR_AREA)) = ADDR_2ND_CYCLE(addressoffset);
    *(__IO uint8_t *)((uint32_t)(deviceaddress | ADDR_AREA)) = ADDR_3RD_CYCLE(addressoffset);

HAL_NAND_Read_Page要改三个地方 ,下边有add就是增加语句

    /* Send read page command sequence */
    *(__IO uint8_t *)((uint32_t)(deviceaddress | CMD_AREA)) = NAND_CMD_AREA_A;
   
    *(__IO uint8_t *)((uint32_t)(deviceaddress | ADDR_AREA)) = 0x00U;
    *(__IO uint8_t *)((uint32_t)(deviceaddress | ADDR_AREA)) = 0x00U; // 1  add
    *(__IO uint8_t *)((uint32_t)(deviceaddress | ADDR_AREA)) = ADDR_1ST_CYCLE(addressoffset);
    *(__IO uint8_t *)((uint32_t)(deviceaddress | ADDR_AREA)) = ADDR_2ND_CYCLE(addressoffset);
    *(__IO uint8_t *)((uint32_t)(deviceaddress | ADDR_AREA)) = ADDR_3RD_CYCLE(addressoffset);
 
    /* for 512 and 1 GB devices, 4th cycle is required */
    if(hnand->Info.BlockNbr >= 1024U)
    {
     *(__IO uint8_t *)((uint32_t)(deviceaddress | ADDR_AREA)) = ADDR_4TH_CYCLE(addressoffset);
    }
 
    *(__IO uint8_t *)((uint32_t)(deviceaddress | CMD_AREA))  = NAND_CMD_AREA_TRUE1;

    for(i = 0; i < 10; i++);//2  add
    if(NAND_WaitRB(1))return HAL_BUSY;    //3//add

离线

楼主 #4 2018-04-25 13:58:18

BugActiveDaughter
会员
注册时间: 2017-10-17
已发帖子: 118
积分: 117.5

Re: stm32f429的nand hal 驱动有bug

1.6版本的hal库

离线

楼主 #5 2018-04-27 11:02:09

BugActiveDaughter
会员
注册时间: 2017-10-17
已发帖子: 118
积分: 117.5

Re: stm32f429的nand hal 驱动有bug

升级到最新的就不会有bug,兼容性就比较好

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn