Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Hello.
I've added "FLASH" driver from "TI BOARD DRIVERS" section of SysConfig with no any changes to "empty_am263px-lp_r5fss0-0_nortos_ti-arm-clang" project and got following build errors. Changing name of instance to "CONFIG_FLASH0" solves this problem, but flash driver is not working anyway.
I found the bug, which is most probably connected with this problem. Steps to reproduce:
1. Import 'ospi_flash_io_am263px-lp_r5fss0-0_nortos_ti-arm-clang' from SDK example and build it. All tests are passed.
2. Make any changes to 'example.syscfg' file and build the project.
3. Debug the project. It stucks on function 'Flash_open()', which is called from 'Board_driversOpen->Board_flashOpen()'.
4. Remove changes from 'example.syscfg' (make it equal to original one) and build the project. Running project still fails.
5. After some debugging, I found that changing protocol in flash configuration to 1S-1S-1S removes stucking, but opening flash driver is failed in this case.
Function stucks if this part of code, status is never success:static int32_t Flash_norOspiWaitReady(Flash_Config *config, uint32_t timeOut)
{
.......
while((status != SystemP_SUCCESS) || (timeOut > 0))
{
status = Flash_norOspiCmdRead(config, cmd, cmdAddr, numAddrBytes, dummyBits, readStatus, numBytesToRead);
if((status == SystemP_SUCCESS) && ((readStatus[0] & bitMask) == 0))
{
break;
}
timeOut--;
}