2016-12-08 10:01 AM
So I finally got my IL9325 TFT display running via FMC but it is running much slower than I expected. The SPI based displays on arduinos seem to be performing better than this parallel setup. I measured my data pulse width to be around 20us. Is this the limit of the FMC(settings below)? I am running my clock at 168Mhz, HSE=24Mhz M = 12, N = 168 , P = 2, Q = 7, AHB =1, APB1 = 4, APB2 = 2. If the FMC should be running faster, what should I be looking into?
FMC_NORSRAMTimingInitStructure.FMC_AddressSetupTime = 15; /* Address Setup Time */ FMC_NORSRAMTimingInitStructure.FMC_AddressHoldTime = 0; FMC_NORSRAMTimingInitStructure.FMC_DataSetupTime = 15; /* Data Setup Time */ FMC_NORSRAMTimingInitStructure.FMC_BusTurnAroundDuration = 0; FMC_NORSRAMTimingInitStructure.FMC_CLKDivision = 0; FMC_NORSRAMTimingInitStructure.FMC_DataLatency = 0; FMC_NORSRAMTimingInitStructure.FMC_AccessMode = FMC_AccessMode_A; /* FSMC Access Mode */ FMC_NORSRAMInitStructure.FMC_Bank = FMC_Bank1_NORSRAM4; FMC_NORSRAMInitStructure.FMC_DataAddressMux = FMC_DataAddressMux_Disable; FMC_NORSRAMInitStructure.FMC_MemoryType = FMC_MemoryType_SRAM; FMC_NORSRAMInitStructure.FMC_MemoryDataWidth = FMC_NORSRAM_MemoryDataWidth_16b; FMC_NORSRAMInitStructure.FMC_BurstAccessMode = FMC_BurstAccessMode_Disable; FMC_NORSRAMInitStructure.FMC_WaitSignalPolarity = FMC_WaitSignalPolarity_Low; FMC_NORSRAMInitStructure.FMC_WrapMode = FMC_WrapMode_Disable; FMC_NORSRAMInitStructure.FMC_WaitSignalActive = FMC_WaitSignalActive_BeforeWaitState; FMC_NORSRAMInitStructure.FMC_WriteOperation = FMC_WriteOperation_Enable; FMC_NORSRAMInitStructure.FMC_WaitSignal = FMC_WaitSignal_Disable; FMC_NORSRAMInitStructure.FMC_AsynchronousWait = FMC_AsynchronousWait_Disable; FMC_NORSRAMInitStructure.FMC_ExtendedMode = FMC_ExtendedMode_Disable; FMC_NORSRAMInitStructure.FMC_WriteBurst = FMC_WriteBurst_Disable; FMC_NORSRAMInitStructure.FMC_ReadWriteTimingStruct = &FMC_NORSRAMTimingInitStructure; FMC_NORSRAMInit(&FMC_NORSRAMInitStructure); /* FSMC Write Timing */ FMC_NORSRAMTimingInitStructure.FMC_AddressSetupTime = 5;//2;//1; /* Address Setup Time */ FMC_NORSRAMTimingInitStructure.FMC_AddressHoldTime = 0; FMC_NORSRAMTimingInitStructure.FMC_DataSetupTime = 5;//2;//1; /* Data Setup Time */ FMC_NORSRAMTimingInitStructure.FMC_BusTurnAroundDuration = 0x00; FMC_NORSRAMTimingInitStructure.FMC_CLKDivision = 0; FMC_NORSRAMTimingInitStructure.FMC_DataLatency = 0x00; FMC_NORSRAMTimingInitStructure.FMC_AccessMode = FMC_AccessMode_A; /* FSMC Access Mode */ FMC_NORSRAMInitStructure.FMC_WriteTimingStruct = &FMC_NORSRAMTimingInitStructure; FMC_NORSRAMInit(&FMC_NORSRAMInitStructure);�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
#fmc #stm32f429/39 #fmc-speed #fmc-setup
Note: this post was migrated and contained many threaded conversations, some content may be missing.
2016-12-08 10:12 AM
Hello lampii,
I don't have experiences with your type of memory, I've played only with SDRAM's and NAND Flash, however take a look on application note
, where you can find how to configure your SRAM... this can help a lot in my opinion.Good luck,
Renegade
2016-12-08 10:16 AM
Hello Renegade,
Thank you for the response. I will take a look at AN4570 to see if I can find any clues.My setup is essentially the same as the 8080 diagram on
.2016-12-08 10:27 AM
Hmm. My setup is very similar and it was derived from 2790. But i don't understand why my pulse width is at 20us rather than ns. I modified my system_stm32f4xx.c file to incorporate the clock settings above. These were selected using the CubeMX, but I should note that I am using the SPL.
2016-12-08 10:30 AM
Wouldn't you need two structures here for the read/write, you are initializing things twice, the last call reconfiguring the read/write identically.
Your description of the bus speed is very slow, you'd want to review your internal clock setting, and perhaps export and verify via MCO pin and a scope.
2016-12-08 11:14 AM
Hi Clive,
Thanks for pointing that out! I fixed the initialization but I still get the same behavior.
I also went through each of my clocks usings MCO1&2.
HSE = 24Mhz
SysClock/2 = 83.3Mhz
PLLCLK/2 = 83.3Mhz
PLL2SCLK = reported no waveform
2016-12-08 11:40 AM
Interesting let me look into PLL2SCLK initialization. I used Cube MX to compute the PLL values and prescalers but I am running a SPL library project as I am more familiar with it than HAL. According to Cube MX, I can't set the frequency to 180Mhz because I am using a 24Mhz HSE rather than a 25Mhz (its in the mail). I am operating under the assumption that the value for SYSCLK/HCLK from CubeMX is set to SystemCoreClock.
2016-12-08 12:22 PM
Any Ideas why PLL2SCLK would not show a waveform? I am able to use APB2 peripherals.
2016-12-08 12:33 PM
Most probably your PLLI2SCLK is not enabled, thus you see no waveform on the output. Have a look into CubeMX.
Try one thing, generate a project using CubeMX and configure your timings according to the app note I gave you and run your project from there. If you achieve your result, comare the code with yours and make the adjustments... in my opinion this is the fastest approach.
Btw. the F4x9 should allow frequency up to 180 MHz, isn't it?
Renegade
2016-12-08 12:45 PM
You are right Renegade. I am not using PLLI2SCK. So if my clock values are correct, what else could be slowing down my FMC to 20uS?