Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN
Hi team,
For a project, I am using a TMS570LS31x dev.kit equipped with a 3137. On a later phase, transition will be made to a custom PCB equipped with a 3134.
In this context, I am supposed to access the device's Flash to store data. Because of project requirements, I need to use both Bank1 and 7 (while program is stored in Bank0).
However, When I try to run Fapi functions on Bank1, the CPU falls in dabort, flashErrorReal.
Following code produces the error. Do you have any inputs on this?
Note that I use HALCoGen, and the device seems properly initialized.
Best regards,
Christophe
Fapi_FlashBankType bank = FlashBankX; // x can be either 1 or 7 in my case
uint32_t *startAdd = (uint32_t*)0xXXXXXXXX; // 0x00180000 for Bank1, 0xF0200000 for Bank7
Fapi_FlashStatusWordType statusWord;
Fapi_StatusType ret = Fapi_initializeFlashBanks((uint32_t)PLL1_FREQ);
if (Fapi_Error_Fail > ret)
{
ret = Fapi_setActiveFlashBank(bank);
}
if (Fapi_Error_Fail > ret)
{
if (Fapi_FlashBank7 == bank)
{
ret = Fapi_enableEepromBankSectors(0xFFFFFFFF, 0U);
}
else
{
ret = Fapi_enableMainBankSectors(0xFFFF);
}
if (Fapi_Status_Success == ret)
{
FAPI_CLEAR_FSM_DONE_EVENT;
}
}
while(Fapi_Status_FsmBusy == FAPI_CHECK_FSM_READY_BUSY);
if (Fapi_Status_Success == ret)
{
ret = Fapi_doBlankCheck(startAdd, 1U, &statusWord); // Falls to flashErrorReal here when using Bank1, does not with Bank7
}