change clock frequency to 25Mhrz on flex_spi

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

change clock frequency to 25Mhrz on flex_spi

跳至解决方案
291 次查看
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 项奖励
1 解答
262 次查看
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 项奖励
2 回复数
263 次查看
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 项奖励
281 次查看
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 项奖励