2019-10-02 01:55 AM
Below is the ST sample code.
/* NOR device configuration */
NOR_Timing.AddressSetupTime = 1;
NOR_Timing.AddressHoldTime = 1;
NOR_Timing.DataSetupTime = 6;
NOR_Timing.BusTurnAroundDuration = 0;
NOR_Timing.CLKDivision = 2;
NOR_Timing.DataLatency = 2;
NOR_Timing.AccessMode = FMC_ACCESS_MODE_B;
2019-10-02 03:26 AM
I don't use any "library" so I don't know exactly what's the mapping between the init struct fields and the FMC/FSMC regsiter fields, but presumably .DataSetupTime maps to DATAST field:
OTOH, I never gotten to understand what's exactly the difference between mode 1/A and 2/B (and C and D); what I can see in the diagrams is that in mode 2 NADV is pulsed whereas in mode 1 not, but then I don't know why ST says mode 2 is for NOR FLASH. why would one need the NADV signal for NOR FLASH; I never seen a NOR FLASH which would need an address latch signal.
JW