Clock initialization for FlexSPI in SDK for RT1051

cancel
Showing results for 
Search instead for 
Did you mean: 

Clock initialization for FlexSPI in SDK for RT1051

204 Views
mastupristi
Contributor III

Hallo,

in the FlexSPI examples, in the SDK, the clock setting (for FlexSPI itself) is done outside the BOARD_BootClockRUN() function in the clock_config.c file. It is done in the flexspi_clock_init() function called just before FlexSPI initialization.

Why this?

Is it safe and reliable to do all the clock initialization (including FlexSPI) in BOARD_BootClockRUN()?

best regards

Max

Labels (1)
0 Kudos
3 Replies

79 Views
Yuri
NXP TechSupport
NXP TechSupport

Hello,

 

   Clocks are needed during modules (FlexSPI in particular) initialization to access module's

registers. This is usual approach for i.MX devices.

 

Have a great day,

Yuri

 

 

-------------------------------------------------------------------------------

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 Kudos

79 Views
mastupristi
Contributor III

Clocks are needed during modules (FlexSPI in particular) initialization to access module's

registers. This is usual approach for i.MX devices.

So it doesn't matter when initializations are made. The important thing is that they are done before the peripherals are accessed.
From this I deduce that doing them in the BOARD_BootClockRUN() function or doing them just before the initialization of FlexSPI is the same thing.
So I should be safe doing everything in the BOARD_BootClockRUN() function, right?

best regards

Max

0 Kudos

79 Views
Yuri
NXP TechSupport
NXP TechSupport

    Generally Your understanding is correct. 

~Yuri.

0 Kudos