MPC5675K and parallel GPIO Pad Data In Register

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC5675K and parallel GPIO Pad Data In Register

1,100件の閲覧回数
CorderBollie
Contributor II

Hello

 

We have an application running in decoupled parallel mode (DPM) on a MPC5675K.

A Samsung K9F1G08 Flash is connected via GPIOs where GPIO[0]..[7] 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[0]).

 

We tried to read PGPDI[0] twice and the errors are gone like:

 

void psp_nand_gpio_read ( uint8_t * dest, uint32_t length )

{

  RE_HI;

  WE_HI;

  while ( length-- )

  {

    RE_LO;

    /* Wait some time. */

    wait_nand( PULSE_WIDTH );

    /* Read data. */

    *dest = ( *(volatile uint8_t *)( SIUL_BASE + 0x0C40u ) );

    *dest++ = ( *(volatile uint8_t *)( SIUL_BASE + 0x0C40u ) );

    RE_HI;

  }

} /* 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?

ラベル(1)
タグ(4)
0 件の賞賛
返信
1 返信

804件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

hi,

Seems there could be timing issue  when accessing the external memory. Unless that code is interrupted or other core accesses/modifies “dest” area. If the latter one is not a case, check if there is always enough time between RE assertion and data read (to follow memory specification) and also the time between RE  negation and assertion again.

Have you checked the reading with the scope or some analyzer? Try to compare the values in buffer for  single reading and for repeated one (use 2 buffers here, do not write to single one). Is the result somehow comparable?


Regards,

Petr

0 件の賞賛
返信