您好,我的程序在freeRTOS任务调度之前读写flash可以成功,但是在开始任务调度之后,在任务中读写flash程序会进入dataEntry,经过debug追踪发现程序在运行到(Fapi_initializeFlashBanks((uint32_t)SYS_CLK_FREQ))进入dataEntry,SYS_CLK_FREQ等于150。以下是我的代码APP_test2.zip
您好,我的程序在freeRTOS任务调度之前读写flash可以成功,但是在开始任务调度之后,在任务中读写flash程序会进入dataEntry,经过debug追踪发现程序在运行到(Fapi_initializeFlashBanks((uint32_t)SYS_CLK_FREQ))进入dataEntry,SYS_CLK_FREQ等于150。以下是我的代码APP_test2.zip
找到了和我问题相同的帖子,但是工作人员贴出的解决方案链接无法打开。问题的原因可能是没有把F021 FLASH API拷贝到sram中,请您帮我确定一下是这个原因导致的吗https://e2echina.ti.com/support/microcontrollers/hercules/f/hercules-safety-microcontrollers-forum/169342/freertos-f021-flash-api-flash-freertos-f021-flash-api-fapi_initializeflashbanks/627986?tisearch=e2e-sitesearch&keymatch=freertos%2520flash#
链接是可以打开的。下面是链接中给出的解决方法
Regarding the data abort in Fapi_initializeFlashBanks(), it's because your project is enabliong MPU (using prvMpuEnable(); in os_port.c). If you disable this call, then there would be no data abort. You can disable OTP and EEPROM address map from MPU.
After doing above, we got in to other problem in Fapi_setActiveFlashBank( ). We get "undefEntry" because of BFI.W instruction.
Also, TI_Fee_Init call's TI_FeeInternal_GetVirtualSectorParameter( ). In this API, the RHS of following condition should read "0". However,we are observing it is reading F0, which means the read is getting offset by 4 bytes.(It's reading F0 of 0x F0200000.) Please check why is the read not correct.
if(oSector == Device_FlashDevice.Device_BankInfo[u16Bank].Device_SectorInfo[u16LoopIndex].Device_Sector)