About LPSPI CLK frequency on RT1051

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

About LPSPI CLK frequency on RT1051

799 Views
mastupristi
Senior Contributor I

I have problems setting the SCK frequency for LPSPI on RT1051.

here is my configuration:

LPSPI_CLOCKTREE1.png

I am quite sure about PLL3_PFD0 because I can indirectly measure it on CLKO2 pin:

CLKO2_CLOCKTREE1.png

CLKO2_CLOCKTREE2.png

Using SDK 2.4 APIs I set the LPSPI for a SCK running @25MHz, I debug it step-by-step to verify. The registers are:

REGISTERS.png

And this should be correct, the nearest frequency is 24MHz

but on my oscilloscope I see (green is SCK and cyan is CLKO2):

LPSPI_SCK.png

As expected CLKO2 is 30MHz (so FLEXSPI_ROOT_CLK sould be 120MHz, so PLL3_PFD0 should be 720MHz)

But SCK (the green one) is 12MHz... a half of expected 24MHz

but I try to change only the mux:

LPSPI_CLOCKTREE2.png

Now the actual SCK should be 21.12MHz (the registers are the same values)

And on the oscilloscope I see

LPSPI_SCK1.png

that is correct.

So where am I wrong? Why with PLL3_PFD0 I have SCK frequency half of what expected?

best regards

Max

Labels (1)
0 Kudos
2 Replies

616 Views
fangfang
NXP TechSupport
NXP TechSupport

Hello,

Please refer to the document how to configure  LPSPI clock on I.MXRT1050. URL:

https://community.nxp.com/docs/DOC-342717. Hope it help you.


Have a great day,
TIC

-------------------------------------------------------------------------------
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

616 Views
mastupristi
Senior Contributor I

Of course.

I use Config Tool to autogenerate code. I hope the it would generate the correct code.

0 Kudos