Configurations for FMC NOR flash on STM32H7A3
HI,
I have a custom board with FMC NOR memory S29GL512S11 controlled by STM32H7A3. I created one external loader to flash the NOR memory and works wells. When I try to use the same configurations with the SYSCLK 280MHz and FMC clock 140MHz I can't have any access to the memory.
I try to find one way to calculate the right timings for both devices to configure the FMC module, but with the memory datasheet and RM0455 I don't understand how I can make the right configuration.
At the moment I have this configuration:
hnor.Instance = FMC_NORSRAM_DEVICE;
hnor.Extended = FMC_NORSRAM_EXTENDED_DEVICE;
hnor.Init.NSBank = FMC_NORSRAM_BANK1;
//HAL_NOR_MspInit(&hnor);
//HAL_NOR_DeInit(&hnor);
NOR_Timing.AddressSetupTime = 7;
NOR_Timing.AddressHoldTime = 15;
NOR_Timing.DataSetupTime = 2;
NOR_Timing.BusTurnAroundDuration = 3;
NOR_Timing.CLKDivision = 16;
NOR_Timing.DataLatency = 17;
NOR_Timing.AccessMode = FMC_ACCESS_MODE_B;
hnor.Init.NSBank = FMC_NORSRAM_BANK1;
hnor.Init.DataAddressMux = FMC_DATA_ADDRESS_MUX_DISABLE;
hnor.Init.MemoryType = FMC_MEMORY_TYPE_NOR;
hnor.Init.MemoryDataWidth = NOR_MEMORY_WIDTH;
hnor.Init.BurstAccessMode = FMC_BURST_ACCESS_MODE_DISABLE;
hnor.Init.WaitSignalPolarity = FMC_WAIT_SIGNAL_POLARITY_LOW;
hnor.Init.WaitSignalActive = FMC_WAIT_TIMING_BEFORE_WS;
hnor.Init.WriteOperation = FMC_WRITE_OPERATION_ENABLE;
hnor.Init.WaitSignal = FMC_WAIT_SIGNAL_ENABLE;
hnor.Init.ExtendedMode = FMC_EXTENDED_MODE_DISABLE;
hnor.Init.AsynchronousWait = FMC_ASYNCHRONOUS_WAIT_DISABLE;
hnor.Init.WriteBurst = FMC_WRITE_BURST_DISABLE;
hnor.Init.ContinuousClock = FMC_CONTINUOUS_CLOCK_SYNC_ASYNC;
hnor.Init.WriteFifo =0x0 ;
hnor.Init.PageSize = 0x0;
/* Initialize the NOR controller */
if(HAL_NOR_Init(&hnor, &NOR_Timing, &NOR_Timing) != HAL_OK)
{
/* Initialization Error */
return 1;
}
return 0;How I can solve this problem?
