AnsweredAssumed Answered

DSPI Configuration to access external flash

Question asked by Vignesh V on Apr 27, 2019
Latest reply on May 5, 2019 by Vignesh V

Hi,

    My clarifications query regarding accessing external flash in MPC5777C. I had reffered MPC5676R accessing with spansion flash dspiF129C. ineed to do similar way with another flash (cypress SPI NOR flash)

 

The configuration mentioned below i used as master  and i understand  following configuration for 8 bit read write with frame size 7 with some slow configuration.

DSPI_B.CTAR[1].R = DSPI_CTAR_FMSZ(0x7) |
DSPI_CTAR_PCSSCK(4) |
DSPI_CTAR_DT(4) |
DSPI_CTAR_ASC(4) |
DSPI_CTAR_CSSCK(4) |
DSPI_CTAR_PASC_7CLK |
DSPI_CTAR_PDT_7CLK |
DSPI_CTAR_PBR_7CLK |
DSPI_CTAR_BR(0x8) ;

 

1. What needs to be done (register settings) if there should be an optimum speed  is achieved .

2.InCase of 16 bit read/wtite is this configuration fine.

DSPI_B.CTAR[1].R = DSPI_CTAR_FMSZ(0xF) |
DSPI_CTAR_PCSSCK(4) |
DSPI_CTAR_DT(4) |
DSPI_CTAR_ASC(4) |
DSPI_CTAR_CSSCK(4) |
DSPI_CTAR_PASC_7CLK |
DSPI_CTAR_PDT_7CLK |
DSPI_CTAR_PBR_7CLK |
DSPI_CTAR_BR(0x10) ;

 

3. How can be the write and read macros  be modified best to do a16 bit read and write 

#define PUSH(n) DSPI_B.PUSHR.R = continuous_command_for_PUSH(n)

#define POP(n) n = (uint8_t) (DSPI_B.POPR.R); \
DSPI_B.SR.R = DSPI_SR_RFDF

 

Could any one guide me on the above mentioned queries?

 

Thanks In Advance,

Vignesh

Outcomes