Is it possible to change the FlexSPI chip select interval during runtime by writing to the register or would we need to follow a special setup routine for it to avoid issues?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to change the FlexSPI chip select interval during runtime by writing to the register or would we need to follow a special setup routine for it to avoid issues?

Jump to solution
1,500 Views
imxrtuser
Senior Contributor I

Hello,

is it possible to change the FlexSPI chip select interval during runtime by writing to the register or would we need to follow a special setup routine for it to avoid issues?

pastedImage_1.png

The flash we are planning to use defines two different values depending on the commands executed.

For read to read 15 ns and for write/program/erase to read status 50 ns therefore we would like to set the CSINTERVAL to 50 ns after a write/program/erase and back to 15 ns after the first status register read.

I would change the value with

FLEXSPI->FLSHCR1[port] = (FLEXSPI->FLSHCR1[port] & ~FLEXSPI_FLSHCR1_CSINTERVAL_MASK) | FLEXSPI_FLSHCR1_CSINTERVAL(CSInterval);

Kind regards,

Stefan

Tags (1)
0 Kudos
Reply
1 Solution
1,423 Views
FelipeGarcia
NXP Employee
NXP Employee

Hello Stefan,

 

I would recommend to use the same method used in our FlexSPI examples with FLEXSPI_SetFlashConfig function. Maybe you could try the following.

 

    /* Configure flash settings according to serial flash feature. */
    FLEXSPI_SetFlashConfig(base, &deviceconfig, kFLEXSPI_PortA1);
 
    /* Do software reset. */
    FLEXSPI_SoftwareReset(base);‍‍‍‍‍

 

I hope it helps!

 

Best regards,

Felipe

View solution in original post

2 Replies
1,424 Views
FelipeGarcia
NXP Employee
NXP Employee

Hello Stefan,

 

I would recommend to use the same method used in our FlexSPI examples with FLEXSPI_SetFlashConfig function. Maybe you could try the following.

 

    /* Configure flash settings according to serial flash feature. */
    FLEXSPI_SetFlashConfig(base, &deviceconfig, kFLEXSPI_PortA1);
 
    /* Do software reset. */
    FLEXSPI_SoftwareReset(base);‍‍‍‍‍

 

I hope it helps!

 

Best regards,

Felipe

1,423 Views
imxrtuser
Senior Contributor I

Hello Felipe,

thank you for your answer. This function will set a lot more than necessary and produce (time-)overhead because it reconfigures the DLL and has 100 NOPs for DLL locking. We will use 50ns for for now.

Kind regards,

Stefan

0 Kudos
Reply