WhyCan Forum

本站无需注册,无需积分,无需回复可下载所有资料,如果真的喜欢小站,请您注册之后请至少回复一个帖子激活Id,谢谢支持! 站长QQ: 516333132 (挖坑网/填坑网) admin@whycan.cn

您尚未登录。

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

BugActiveDaughter
Moderator
注册时间: 2017-10-17
累计积分: 58

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

离线

#2 2018-04-25 13:56:17

daydayup
会员
注册时间: 2017-10-09
累计积分: 294

Re: stm32f429的nand hal 驱动有bug

谢谢分享!

离线

#3 2018-04-25 13:57:11

qianhao
会员
注册时间: 2017-12-14
累计积分: 115

Re: stm32f429的nand hal 驱动有bug

学到了 活到老学到老

离线

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

BugActiveDaughter
Moderator
注册时间: 2017-10-17
累计积分: 58

Re: stm32f429的nand hal 驱动有bug

1.6版本的hal库

离线

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

BugActiveDaughter
Moderator
注册时间: 2017-10-17
累计积分: 58

Re: stm32f429的nand hal 驱动有bug

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

离线

#6 2018-04-27 11:15:57

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,504

Re: stm32f429的nand hal 驱动有bug

BugActiveDaughter 说:

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

最新是哪个版本?

离线

#7 2018-06-19 18:37:38

19697805
会员
注册时间: 2018-06-19
累计积分: 75

Re: stm32f429的nand hal 驱动有bug

谢谢分享!  活到老学到老

离线

#8 2019-03-09 18:21:13

tink
会员
注册时间: 2019-03-09
累计积分: 32

Re: stm32f429的nand hal 驱动有bug

谢谢分享!

离线

页脚