主题中讨论的其他器件:UNIFLASH
工具与软件:
嗨、团队:
我使用 ind_comms_sdk_am243x_09_02_00_15开发应用。
我在较低程序中检查了闪存读取和写入。
我将数据写入"0F0F0F0F0F0F..." ",并阅读它。
但是、读取数据有时会从"0f"更改为"0b"。
您能告诉我为什么会发生这种情况、以及如何感知和避免这种情况吗?
uint8_t write_flash[32]={0};
uint8_t read_flash[32]={0};
OSAL_MEMORY_memset(write_flash,0x0F,32);
//write "0F0F0F0F....." to flash
error = NVM_APP_write( NVM_TYPE_FLASH,
CONFIG_FLASH0,
0x400000,
32,
(void*)write_flash
);
//read from same section of flash
error = NVM_APP_read( NVM_TYPE_FLASH,
CONFIG_FLASH0,
0x400000,
32,
(void*)read_flash
);
for(uint32_t i=0;i<32;i++){
OSAL_printf("%02x",read_flash[i]);
}
//the result "0f0f0b0f0b0b0f0f0f0f0..."
OSAL_printf("\r\n");
此致、
小山


