change clock frequency to 25Mhrz on flex_spi

cancel
Showing results for 
Search instead for 
Did you mean: 

change clock frequency to 25Mhrz on flex_spi

Jump to solution
157 Views
adi2Intel
Contributor II

Hi !
brief : we have a device (not NXP) that read JedecID from external flash thru SPI

here is the Valid transaction on logic analyzer:

adi2Intel_0-1659615680586.png

you can see that the frequency of the transaction

 

now, we want to do the same with NXP MXRT1050.
we have managed to read the JedecID of the external device using help from forum:
Solved: Re: Read JedecID, erase & program external indepen... - NXP Community

but when we are sampling with the analyzer the SPI transactions to read JedecID we get this:

adi2Intel_1-1659616289804.png

or this:

adi2Intel_2-1659616299565.png

these looks like non valid transactions

we thought this is because the NXP works in high frequency so analyzer cant read it

how we can reduce the frequency? we need the SPI transaction will look like the first picture, from our old device.

when I try to set Flex SPI clock to 25 it shows an error:

adi2Intel_3-1659616432151.jpeg

the project is a modified  flexSPI_nor_polling example project.

 

Thanks

Adi

Intel

0 Kudos
1 Solution
128 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
Hope you are well.

With the default configuration, it will be difficult to reach the 25Mhz so I suggest you change the clock that sources the FlexSPI clock. I used the SEMC clock source to reach this frequency.
Please refer to this configuration:

Omar_Anguiano_0-1659993775828.png


CLOCK_SetMux(kCLOCK_FlexspiMux, 0x0) this function with the value of 0x0 sets SEMC as source for FlexSPI clock. 

If you have more questions do not hesitate to ask me.
Best regards,
Omar

View solution in original post

0 Kudos
2 Replies
129 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
Hope you are well.

With the default configuration, it will be difficult to reach the 25Mhz so I suggest you change the clock that sources the FlexSPI clock. I used the SEMC clock source to reach this frequency.
Please refer to this configuration:

Omar_Anguiano_0-1659993775828.png


CLOCK_SetMux(kCLOCK_FlexspiMux, 0x0) this function with the value of 0x0 sets SEMC as source for FlexSPI clock. 

If you have more questions do not hesitate to ask me.
Best regards,
Omar

0 Kudos
147 Views
adi2Intel
Contributor II

I have changed  CLOCK_SetMux(kCLOCK_FlexspiMux, 0x3); to  CLOCK_SetMux(kCLOCK_FlexspiMux, 0x0); on app.h for project  flexSPI_nor_polling example

frequency looks OK now. I will update

0 Kudos