AnsweredAssumed Answered

Write problems on a SRAM with the STM32H743ZIT6

Question asked by Hal9 on Apr 20, 2018
Latest reply on Apr 23, 2018 by Hal9

Greetings
I have the following problem on the micro STM32H743ZIT6:
1) during access to the external write bus, on an SRAM, with only 16 bit bus, occurs when I execute the instruction
* ((uint16_t *) 0x60000000) = (uint16_t) 0xFFFF;
The hardware signals move as follows (/ NE1 yellow, / NOE blue, /WR purple) see attached.

1) It is certainly incorrect because
- /NE1 (yellow chipselect) should only be activated once and not 2.
- And / NWR (purple) should only activate 1 within / NE1 and not 2.
How come this occurs?
Where am I doing wrong ?
2) The above test was performed with the data cache and code disabled, because otherwise nothing is activated.
 How can I write externally with the cache enabled?

Obviously if it's possible.

 

My InitCode is:

/* FMC initialization function */
static void MX_FMC_Init(void)
{
    FMC_NORSRAM_TimingTypeDef Timing;
    FMC_SDRAM_TimingTypeDef SdramTiming;

    /** Perform the SRAM1 memory initialization sequence
     * Accesso alla FPGA
    */
    hsram1.Instance                    = FMC_NORSRAM_DEVICE;
    hsram1.Extended                    = FMC_NORSRAM_EXTENDED_DEVICE;
    /* hsram1.Init */
    hsram1.Init.NSBank                = FMC_NORSRAM_BANK1;
    hsram1.Init.DataAddressMux        = FMC_DATA_ADDRESS_MUX_DISABLE;
    hsram1.Init.MemoryType            = FMC_MEMORY_TYPE_SRAM;
    hsram1.Init.MemoryDataWidth        = FMC_NORSRAM_MEM_BUS_WIDTH_16;
    hsram1.Init.BurstAccessMode        = FMC_BURST_ACCESS_MODE_DISABLE;
    hsram1.Init.WaitSignalPolarity    = FMC_WAIT_SIGNAL_POLARITY_LOW;
    hsram1.Init.WaitSignalActive    = FMC_WAIT_TIMING_BEFORE_WS;
    hsram1.Init.WriteOperation        = FMC_WRITE_OPERATION_ENABLE;
    hsram1.Init.WaitSignal            = FMC_WAIT_SIGNAL_DISABLE;
    hsram1.Init.ExtendedMode        = FMC_EXTENDED_MODE_DISABLE;
    hsram1.Init.AsynchronousWait    = FMC_ASYNCHRONOUS_WAIT_DISABLE;
    hsram1.Init.WriteBurst            = FMC_WRITE_BURST_DISABLE;
    hsram1.Init.ContinuousClock        = FMC_CONTINUOUS_CLOCK_SYNC_ONLY;
    hsram1.Init.WriteFifo            = FMC_WRITE_FIFO_DISABLE;
    hsram1.Init.PageSize            = FMC_PAGE_SIZE_NONE;
    /* Timing */
    Timing.AddressSetupTime            = 9;
    Timing.AddressHoldTime            = 15;
    Timing.DataSetupTime            = 11;
    Timing.BusTurnAroundDuration    = 7;
    Timing.CLKDivision                = 16;
    Timing.DataLatency                = 17;
    Timing.AccessMode                = FMC_ACCESS_MODE_A;
    /* ExtTiming */

    if (HAL_SRAM_Init(&hsram1, &Timing, NULL) != HAL_OK)
    {
        _Error_Handler(__FILE__, __LINE__);
    }


Thank you

Attachments

Outcomes