Hi Lukas,
Thanks for your earlier response. I'm continuing this discussion with below context:
[Context] SecOC Tx messages intermittently fail due to ongoing Fee/Fls operations (FLS/FEE operations at FTFC blocks KeyRef/MacGen for SecOC crypto and hence the failures).
-> [Info] We are confident that we could deal with 'FTFC->CCIF busy' if it's purely due to ongoing FLS 'WRITE CMD' (where WRITE usually consumes microseconds).
-> But FLS 'ERASE' operations are presumably 'BOSS STAGE' for SECOC/CRY VS FLS contention case.
[Known facts] S32K148 FLS sector size is 4KB (physical sector) and our preliminary analysis is as follows:
-> "If at all an ERASE (for FLS SECTOR) is started, it is assumed that FTFC->CCIF stays BUSY '0' continuously for entire duration of ERASE execution time!"
In this regard, we have the following queries: (Please refer below snap and queries follow in the end):
NXP_CCIF_DURING_ERASE.jpg
[Query-1]:
The data sheet doesn't mention the 'SECTOR size*' when it talks about 'Erase Flash-Sector execution-time*' (Ref (1) and (2) from snapshot). So, shall we consider '4KB'?
[Query-2]: Will FTFC->CCIF flag stays '0-BUSY' for entire duration of ERASE operation (FLS_SECTOR)?
- Ref point (3) from snapshot: Will CCIF be '0' for entire '12ms' typical flash sector erase time! (i.e. Crypto is deterministically blocked in this erase duration)
- Ref point (4) from snapshot: Will CCIF be '0' for entire ' 130ms' of max flash sector erase time!
[Query-3] How does FLS driver in 'SYNC' processing and 'ASYNC' processing actually affect CCIF behavior during ERASE? (Currently our driver is ASYNC FLS Processing)
[Query-4][Optional] As per you, during FEE logical sector erase during Sector Swap (say: we have 2 x 32 KB Logical Fee Sectors), how will the erase happen at HW level (all 8 physical sectors of FLS erased at once keeping CCIF = 0 for entire duration (or) its granular (4KB by 4KB) i.e. we see transitions CCIF [0 - 1] -> [0 - 1] -> [0 - 1] -> [0 - 1] during this 32KB Logical sector erase of FEE?
i.e. erase granularity and CCIF behavior for erase duration.
[Query-5] [Optional] What are usual implications of forceful cancellation of ongoing erase (to prioritize the crypto operations).
(FLS level or FEE level)
Your quick and in-depth response is greatly appreciated (as we have cyclic and event messages in our ECU - 10ms highest frequency)
@Lukas2 S32K148EVB S32K148-T-BOX