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.

TMS570LS1224: Data Abort on TI_FeeInternal_BlankCheck() in user mode

Part Number: TMS570LS1224

Tool/software:

Dear Sir/Madam,

we are using the FEE driver in conjunction with SafeRTOS and the MPU. In privileged mode, before starting the OS, everything works fine and we can read/write to the emulated EPROM. However, a call to TI_Fee_WriteSync() in user mode leads to a data abort (FAULT_STATUS: 1101, DFAR: 0x100). The data abort happens within the Flash API in Fapi_flushPipeline(), called by Fapi_doBlankCheck(), called by TI_FeeInternal_BlankCheck(), called by TI_Fee_WriteSync().

The Flash API's documentation tells us that Fapi_flushPipeline() needs read access to addresses 0x000, 0x100, 0x200 and 0x300. However, even when we enable read access in the MPU for these locations, the data abort happens upon reading 0x100. The Flash API's documentation tells us that all Flash API functions require privileged mode. However, the FEE driver's documentation tells us that only TI_Fee_Init() and TI_FeeInternal_WriteDataF021() require privileged access. Both functions are not part of the call stack when the data abort happens. In particular, TI_FeeInternal_WriteDataF021() would be called in TI_Fee_WriteSync() after TI_FeeInternal_BlankCheck() is called.

This leads to the following questions:

- Why do functions in the FEE driver do not need privileged mode per the FEE driver's documentation, even if they call Flash API functions that do need privileged access per the Flash API's documentation?
- How can we enable read access to 0x000, 0x100, 0x200 and 0x300 in user mode?
- Since TI_FeeInternal_WriteDataF021() needs privileged mode anyway later on, should we consider TI_Fee_WriteSync() as requiring privileged mode? This would solve the problem. However, we want to keep the code sections running in privileged mode as short as possible.
---
Edit: A similar problem occurs in TI_Fee_MainFunction() when the function performs an erase. Fapi_setActiveFlashBank() is called which leads to a data abort with FAULT_STATUS=1001, DFAR: 0x0800A3A4 when not in privileged mode.

Thanks for your help,
Philipp