k82 : qspi clock in polling example

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

k82 : qspi clock in polling example

373件の閲覧回数
EugeneHiihtaja
Senior Contributor I

Hi !

I can see in RM : "The controller supports singles,dual,
quad or octal data lines in single (SDR) or double (DDR) data rate configurations. SDR
mode supports upto 100 MHz and DDR mode supports up to 75MHz.

"

But in SDK example CLOCK_GetFreq(kCLOCK_McgPll0Clk) is taken as clock source for QSPI module

and it 120Mhz from this source.

Also SDR data rate configuration is in use. DDR enabling function exixts but not used in any place.

What is reason to use higher clock e.g. 120Mhz?

I think in VLPR power mode this clock should be set to 4 Mhz max from relevant source.

But what is right way to change QSPI clock ?

Disable QSPI interface and call full reinitialization by using qspi_nor_flash_init() full sequence or

if clock source is the same ( config.clockSource ) and it drop automatically when power mode changed,

for example SystemClock ( clock source = 0) drops from 120Mhz to 4Mhz, it is no need any QSPI reinitialization at all .

Please, suggest right initialisation sequence for QSPI for RUN - VLPR -> RUN transit.

Regards,

Eugene

0 件の賞賛
1 返信

322件の閲覧回数
FelipeGarcia
NXP Employee
NXP Employee

Hello Eugene,

 

Regarding your questions, the QSPI clock takes care of that in QSPI_Init to avoid the QSPI works under unsupported frequency.

 

If you like to change power mode, I highly recommend you to disable QSPI module before the transition. Once you are sure that the correct transition has been made you can enable QSPI again.

 

A similar procedure is done in qspi_polling() right before the QSPI writes to flash.

 

I hope this helps.

 

Best regards,

Felipe

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛