RT1020 flash operation SDK example Question

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

RT1020 flash operation SDK example Question

ソリューションへジャンプ
1,498件の閲覧回数
Seongyon_Jeong
Contributor III

Hi

from flash SDK example, 

My question is About flexspi_clock_init.  

static inline void flexspi_clock_init()
{
#if defined(XIP_EXTERNAL_FLASH) && (XIP_EXTERNAL_FLASH == 1)
/* Switch to PLL2 for XIP to avoid hardfault during re-initialize clock. */
CLOCK_InitSysPfd(kCLOCK_Pfd2, 24); /* Set PLL2 PFD2 clock 396MHZ. */
CLOCK_SetMux(kCLOCK_FlexspiMux, 0x2); /* Choose PLL2 PFD2 clock as flexspi source clock. */
CLOCK_SetDiv(kCLOCK_FlexspiDiv, 2); /* flexspi clock 133M. */
#else
~~~~
#endif
}

In this function  ,   flexspi clock is 132Mz , isn`t it ?   why  133,000,000 ?,   

Does not it make wrong action ?

/*******************************************************************************
* Code
******************************************************************************/
flexspi_device_config_t deviceconfig = {
.flexspiRootClk = 133000000,
.flashSize = FLASH_SIZE,
.CSIntervalUnit = kFLEXSPI_CsIntervalUnit1SckCycle,
.CSInterval = 2,

 

0 件の賞賛
返信
1 解決策
1,471件の閲覧回数
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @Seongyon_Jeong,

You are correct. From the software description it does seem to be 132MHz, but after replicating the setup on ConfigTools' Clocks tool, I also got the same 132MHz. I believe 133MHz is one of the standard values supported from flash devices. However, most likely for simplicity the flexspi_clock_init() routine initially sets it to a near acceptable value of 132MHz. That said, I will comment about this internally to chance the comment to the appropriate frequency.

Thanks for reporting this.

BR,
Edwin.

 

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,484件の閲覧回数
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @Seongyon_Jeong,

The output from the flexspi_clock_init() should be 133MHz. Are you seeing a 131MHz output from your board? Or how are you determining that your output is different from the intended frequency?

BR,
Edwin.

0 件の賞賛
返信
1,481件の閲覧回数
Seongyon_Jeong
Contributor III

I didn`t  check the frequency [directly - physically] using scope.  

Just only,  with Software description.,

CLOCK_InitSysPfd(kCLOCK_Pfd2, 24); => PLL2 PFD2 clock 396 Mhz
CLOCK_SetMux(kCLOCK_FlexspiMux, 0x2); /* Choose PLL2 PFD2 clock as flexspi source clock. */
CLOCK_SetDiv(kCLOCK_FlexspiDiv, 2);
=> Exactly [ PLL2 PFD2 clock 396 Mhz ] / 3 = 132Mhz , why Say 396 / 3 = 133Mhz ???

0 件の賞賛
返信
1,472件の閲覧回数
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @Seongyon_Jeong,

You are correct. From the software description it does seem to be 132MHz, but after replicating the setup on ConfigTools' Clocks tool, I also got the same 132MHz. I believe 133MHz is one of the standard values supported from flash devices. However, most likely for simplicity the flexspi_clock_init() routine initially sets it to a near acceptable value of 132MHz. That said, I will comment about this internally to chance the comment to the appropriate frequency.

Thanks for reporting this.

BR,
Edwin.

 

0 件の賞賛
返信
1,458件の閲覧回数
Seongyon_Jeong
Contributor III
thanks for your explanation.
0 件の賞賛
返信