Tool/software:
Hi,
To make the Fls works with Autosar Fee module, I have to do some changes in Fls driver.
in function Fls_Ospi_readDirect:
pSrc = (uint8 *)(FLS_BASE_ADDRESS + addrOffset); #if 0 remainSize = (uint32)trans->count & 3U; size = (uint32)trans->count - remainSize; /* Transfer the data in 32-bit size */ for (i = 0U; i < size; i += 4U) { HW_WR_REG32(pDst + i, HW_RD_REG32(pSrc + i)); } /* Transfer the remaining data in 8-bit size */ for (i = 0; i < remainSize; i++) { HW_WR_REG32(pDst + size + i, HW_RD_REG8(pSrc + size + i)); } #endif /* This code is used to replace the comment out code above to avoid data abort exception which cased by alignment issue at function HW_WR_REG32(). 12/2024 by Phoenix */ for (i = 0; i < trans->count; i++) { HW_WR_REG32(pDst + i, HW_RD_REG8(pSrc + i)); }
The other one is that I need to clear the register that was set by RBL.
HW_WR_FIELD32(FLS_OSPI_CTRL_BASE_ADDR + OSPI_DEV_INSTR_RD_CONFIG_REG, OSPI_DEV_INSTR_RD_CONFIG_REG_DUMMY_RD_CLK_CYCLES_FLD, 0);
Otherwise, I have to configure dummy cycle to 8 which may not necessary for us.
Please include those fix in the next mcal release.
thanks