RT1052 SEMC in DBI mode Speed of communication

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

RT1052 SEMC in DBI mode Speed of communication

2,116 Views
XuT
Contributor I

I try to use the SEMC in DBI mode in order to communicate with the FPGA ,But no matter how I set the speed is only about 7M,Here  is my initialization code and screenshot of the logic analyzer.How to set up to improve communication speed?

Thanks!

0 Kudos
Reply
6 Replies

2,097 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Just as Nick suggested, I think you'd better to check the value of the semcclock at firstly.

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

 

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

2,107 Views
nickwallis
Senior Contributor I

@XuT I don't see anywhere in your code where you are setting up the clock source for the SEMC module?

The default clock frequency for the SEMC module is 8MHz, but it can go up to 166MHz depending on which power mode you are running.

Search for "SEMC_CLK_ROOT" in the reference manual.

Typically, one might run the SEMC module off the PLL2 clock (which is normally 528MHz) and divide it down using the PLL2 PFD divider and/or the SEMC_PODF divider.

Here's an example, you might need to modify it for your application but you get the idea:

	// Set the PLL2 PFD divider to /29,
	// so the output frequency is now 528MHz * [18/29] = 327MHz
	CLOCK_InitSysPfd(kCLOCK_Pfd2, 29);

	// Set PLL2 as the clock source for the SEMC module
	CLOCK_SetMux(kCLOCK_SemcMux, 1);

	// Set the AXI_PODF (a.k.a. SEMC_PODF) divider in CBCDR to /2,
	// so the actual SEMC module clock is 327MHz /2 = 163.86MHz
	CLOCK_SetDiv(kCLOCK_SemcDiv, 1);

 

BR

-Nick

0 Kudos
Reply

2,090 Views
XuT
Contributor I

I did not include the code of initialize the clock,Here are my relevant Settings

CLOCK_SetMux(kCLOCK_SemcMux,0); //PERIPH_CLK AS SEMC SOURCE,PERIPH_CLK=600M
CLOCK_SetDiv(kCLOCK_SemcDiv,3); //SEMC Clock=600/4=150Mhz

 

 I've printed semcclock value is 150M

semcclock=CLOCK_GetFreq(kCLOCK_SemcClk); //150M

 

And  when I read in 32-bit addresses,In a period of CS pulling down,The frequency of the two reads is exactly 40M

 

 

 

0 Kudos
Reply

2,076 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Whether you mean the frequency of the SEMC CLK is independent of the read and write operation.
Hope it helps.
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
Reply

2,064 Views
XuT
Contributor I

The operation to read may be related to the following parameters:

dbi_config.tCsxSetup_Ns=0;
dbi_config.tCsxHold_Ns=0;
dbi_config.tWexLow_Ns=5;
dbi_config.tWexHigh_Ns=5;
dbi_config.tRdxLow_Ns=5;
dbi_config.tRdxHigh_Ns=5;
dbi_config.tCsxInterval_Ns=2;

And the interval between reads:

for (index = 0; index < datalen; index++)
{
sdram_Buffer[index]= sdram[index] ;
//SEMC_SendIPCommand(SEMC,kSEMC_MemType_8080,sdram,kSEMC_NORDBICM_Read,1,&sdram_Buffer[index]);
}

If user IP command is only 1M 。Is there any other faster way to read it

0 Kudos
Reply

2,057 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
According to your current setting of the dbi_config struct, it's close to the max performance actually. So I'm afraid it's hard to improve the speed of reading or writing operation.
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
Reply