Tool/software: TI C/C++ Compiler
i am running below rtos code on AM65xx a53 core
uint32_t ioMode;
ioMode = BOARD_FLASH_QSPI_IO_MODE_QUAD;
uint32_t blockNum, pageNum; /* Block, page number */
Board_flashOffsetToBlkPage(flashHandle, SPI_EEPROM_DEVICEIP_OFFSET,
&blockNum, &pageNum);
Board_flashEraseBlk(flashHandle, blockNum);
Task_sleep(1000); //we see that the value is not getting written to flash if sleep not here
Board_flashWrite(flashHandle, SPI_EEPROM_DEVICEIP_OFFSET, (uint8_t *)&ipAddr, 4,
(void *)(&ioMode));
Task_sleep(1000);
Board_flashRead(flashHandle, SPI_EEPROM_DEVICEIP_OFFSET, (uint8_t *)&test_ip_after,
4, (void *)(&ioMode));
UART_printf("current ip = %d, current ip from spi read = %d", ipAddr,test_ip_after );
basically, i am trying to write IP address to flash memory.
The problem i see is in the last line when i print the data that i intended to write to flash and the data i read from flash after writing.(ipAddr and test_ip_after )
I notice that these two values are not same unless i insert bunch of task sleep in between,
Is it a known issue, what is the best way to deal with it?