Part Number: TDA3MV
Other Parts Discussed in Thread: SYSBIOS
Hi,
I am working on a project with TDA3 SR2.0. We use both M4 cores, DSP, EVE, ISP, DSS, LDC, CSI-2.
First I noticed the errata "i882 EMIF: DDR ECC Corrupted Read/Write Status Response" and thougth that in SR2.0 ECC will work fine. Yesterday I activated the ECC in our EMIF driver for the bootstrap. After that the software that normally boots did not boot properly. M4_1 did not start or had an exception, I don't know. After disabling the ECC booting was ok, again.
Than I found the application note "ECC/EDC on TDAxx" sprac42b
I was surprized that there is a restriction to access the DDR3 with activated ECC.
"EMIF supports ECC on the data written or read from the SDRAM. Enable the ECC feature by writing to
the appropriate registers inside the EMIF subsystem. ECC accesses are allowed for both SYS and the
MPU ports. 7-bit ECC is calculated over 32-bit data when in 32-bit DDR mode. 6-bit ECC is calculated
over 16-bit data when in 16-bit DDR mode. The ECC is calculated for all accesses that are within the
address ranges protected by ECC. These address ranges are software configurable. The ECC must be
enabled and only aligned writes with byte count in multiple of 4 bytes (2 bytes for narrow mode) should be
used. This is true for all TDA devices other than TDA2PX where you can have sub quanta writes as well."
"2.5.1.1 Restrictions Due to Non-Availability of Read Modify Write ECC Support in EMIF
In normal mode, a 7-bit ECC is computed for each 32-bit word, whereas, in narrow mode, a 6-bit ECC is
computed for each 16-bit word. EMIF does not provide read-modify-write support for ECC for all TDA
devices except TDA2PX. This means that any sub-quanta write access (less than 32 bit for normal and
less than 16 bit for narrow mode) generates an incorrect ECC and writes it into ECC memories. Any
further reads to such corrupted regions will very likely generate false 1-bit or 2-bit errors. To ensure this
does not happen, software design should take care of the following points."
To be sure...so in the end, if an unaligned write access by the M4 occured, reading of this same address later generates an 1-bit or 2-bit error event and the read value is corrupted. Is it right?
I assume in case of 2-bit error the value should be correct, cause of no wrong correction?
I know, there are some complex workarounds for M4 and DSP in case of cached or non-cached variants. In case of EVE the solution to handle the ECC restriction is in software possible, only. And devices like DSS or EDMA have to follow the restriction of 32bit alignement accesses.
Is it realy a good idea to check and modify the whole software to avoid unaligned write accesses? What about SYS/BIOS? Is it prepared for this ECC restriction?
I think it is more likely that an unaligned access remains undetected, than an ECC error happens. So another solution would be to use DDR3 with integrated ECC functionality.
What do you thing about it?
Best regards,
Milan