This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0L1306: 通过指针方式循环读取flash,发现结果出现异常

Part Number: MSPM0L1306

Hi sir,

    由于项目所需,我需要对flash中app部分的所有数据进行读取然后校验,目前我通过指针的方式读取flash数据,凡是发现读取的数据大部分是错误的,而且读取大约0x2000个字节后就会卡住,请问有什么方法快速大量的读取flash吗?

    uint32_t cnt=0;
    uint8_t buf[4]={0};
    uint16_t index;
    uint32_t* data=NULL;
    uint32_t flash_data=0;


    while(cnt<g_cnt) {
        data=(uint32_t *)(APPLICATION_START_ADDR+4*cnt);
        flash_data=*data;
        buf[0]=flash_data&0xff;
        buf[1]=(flash_data>>8)&0xff;
        buf[2]=(flash_data>>16)&0xff;
        buf[3]=(flash_data>>24)&0xff;
        DUMP_BUFFER(buf, 4);
        TRACE("have read %08x data",cnt);
    }
下面是log打印截图以及正确的flash数据,从截图对比flash数据发现很多数据都是错误的