cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743VIH6 FMC send eight bytes in one time while I send 2 bytes

mozhu
Associate

While I use the STM32H743VIH6 FMC to drive the ST7789V TFT-LCD via a 16-bit 8080 interface, it's quite strange that even though I only send a half-word, the result is that it sends four

mozhu_0-1739973987357.png

code is

mozhu_1-1739974022363.png

but when I send like 
*(volatile uint64_t *)0x61000000 = 0xAAAABBBBCCCCDDDD;
the signal looks just like this

mozhu_2-1739974167295.png

I still can't find a way to control FMC to send one half-word....
and this is how FMC config
/** Perform the SRAM1 memory initialization sequence
*/
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 = 8;
Timing.AddressHoldTime = 15;
Timing.DataSetupTime = 50;
Timing.BusTurnAroundDuration = 0;
Timing.CLKDivision = 16;
Timing.DataLatency = 17;
Timing.AccessMode = FMC_ACCESS_MODE_A;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mozhu
Associate

OK, I found the result...
FMC default mapping uses 0x60000000 as the address, but this is normal memory in the Cortex-M7's MPU unit, and as a result, it is 64-bit.
Just remap it to 0xC0000000, and the problem will be solved.

View solution in original post

1 REPLY 1
mozhu
Associate

OK, I found the result...
FMC default mapping uses 0x60000000 as the address, but this is normal memory in the Cortex-M7's MPU unit, and as a result, it is 64-bit.
Just remap it to 0xC0000000, and the problem will be solved.