We have an application running in decoupled parallel mode (DPM) on a MPC5675K.
A Samsung K9F1G08 Flash is connected via GPIOs where GPIO.. are connected to I/O0..7 of the flash module.
If we read a huge amount of data from the flash device we get a lot of ECC errors and sometimes at least one byte is completely wrong.
While reading the data we use a gpio to toggle RE line of the flash device and read in the data via the parallel GPIO Pad Data In Register 0 (SIUL.PGPDI).
We tried to read PGPDI twice and the errors are gone like:
void psp_nand_gpio_read ( uint8_t * dest, uint32_t length )
while ( length-- )
/* Wait some time. */
wait_nand( PULSE_WIDTH );
/* Read data. */
*dest = ( *(volatile uint8_t *)( SIUL_BASE + 0x0C40u ) );
*dest++ = ( *(volatile uint8_t *)( SIUL_BASE + 0x0C40u ) );
} /* psp_nand_gpio_read */
If we do that we are able to read all bytes without error. If we read only once we will get errors.
The question is what can cause that behaviour?