2014-05-29 07:15 AM
I need some help in understanding the Bus Turnaround time of the FSMC. I think I have it right, but don't want to burn out the data bus in finding out I'm wrong. Could someone who knows, confirm please?
My STM32F207 has a slow device and a fast SRAM connected to the address and data buses. They are accessed with the basic SRAM Mode 1 shown in section 31.5.4 of RM0033 using NE1 and NE2 respectively.2014-05-29 08:25 AM
My experience is with '40x, but IMO it will be the same as far as FSMC is concerned.
The description of most of the peripherals in the manuals is very sloppy; the description of the registers is usually better, although those are far from being precise, too. > (It does say BUSTRUN. I didn't mistype that.) :) . In fact, :( . > I think it has to be (BUSTURN+1) HCLK, Yes it is. In this thread https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex%5Fmx%5Fstm32%2Fmemory%20with%20long%20write%20recovery%20time%20with%20FSMC%20of%20STM32F407IG a related timing issue is discussed (address/data hold when write), I posted some waveforms there. > In all the timing diagrams, the data bus is driven for a short time after NEx goes high. It is irrelevant. In fact, the data timing is derived from NWRx, which goes high one clock before NEx, and data hold is 1 clock, so there is no real hold from NEx going high. You can infer some of the timing from th(NE_NWE) and th(Data_NWE) from the Asynchronous non-multiplexed SRAM/PSRAM/NOR write waveforms (I haven't had a look into the '20x datasheet, but this is in '40x datasheet and I guess this is a copy/paste situation). You can't see these in the waveform I posted in the abovementioned link, as the data bus there is floating until the next transaction, and the parasitic capacitances hold the previous level long enough. > I am 99% sure that if I do a read on NE1 with BUSTURN=8, and then a read on NE2, that there will be 9 HCLK between NE1 going high and NE2 going low. > In other words, when RM0033 says ''Time between NEx high to NEx low'', the two NEx don't have to be the same line. Is this correct? Hard to say. If you perform a NE1 write followed by NE2 write, either the NE1's BUSTURN may apply, or NE2's, or both consecutively, or the smaller or the bigger of the two - the manual does not answer this. I'd recommend you to experiment, e.g. with a Discovery board - you don't actually need to have a memory attached to see the address/data/control signals' timing - run it at low speed to clearly see the timings on an oscilloscope. And please come back with your findings. Thanks, Jan Waclawek