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?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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?

跳至解决方案
909 次查看
mitterha
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

标记 (1)
0 项奖励
1 解答
832 次查看
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

在原帖中查看解决方案

2 回复数
833 次查看
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

832 次查看
mitterha
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 项奖励