Skip to main content
Associate II
June 16, 2025
Solved

STM32H7 FMC and 16bits device

Hello,

I'm kind of newbie in the STM32 world, I'm more used with another brand of 32bits microcontroller that also have a "parrallel port" for interfacing external ram device.

My concern is about the FMC on the STM32H7.

I want to read/write a 16bits device.

Currently I'm using this configuration (almost the default one) :

Alex_J_0-1750105595053.png

My code for testing a write operation :

Alex_J_2-1750105719339.png

....

Alex_J_1-1750105684339.png

 

I can't see any problem in the code but when I check signals with an oscilloscope, I can see that the CPU is issuing 4 consecutive write operation :

Alex_J_3-1750105798354.png

 

A0 / A1 are also increasing as if the CPU is writing to 4 different places.

How can it be possible.

I have seen in the datasheet that when AXI bus and external bus is different size, it can occurs. But in that case how to perform a correct 16 bit operation ??

Other people seems to have this kind of trouble but nobody replied with a solution :

https://community.st.com/t5/stm32-mcus-products/h7-series-fmc-question/td-p/131535

https://community.st.com/t5/stm32-mcus-embedded-software/fmc-accessed-in-32-bit-but-cs-asserted-for-twice-long-64-bits/m-p/274657

Thanks in advance for any help

 

 

This topic has been closed for replies.
Alex_JBest answer
Associate II
June 23, 2025

Currently, I manage to make it work but it's not the way I thought.

I had to change the bank address to 0xC0000000

and deactivate MPU.

I can see one write cycle and my device is now working as expected.

But I'm not sure it's a good idea to deactivate the MPU.

I later found this related thread :

https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/stm32h743ii-fmc-8080-lcd-spurious-writes/td-p/354191

 

By the way, it's sad that cubeide didn't warm you about the bank remapping needed in 16 bits mode needed for sram/nor/lcd..

11 replies

Alex_JAuthorBest answer
Associate II
June 23, 2025

Currently, I manage to make it work but it's not the way I thought.

I had to change the bank address to 0xC0000000

and deactivate MPU.

I can see one write cycle and my device is now working as expected.

But I'm not sure it's a good idea to deactivate the MPU.

I later found this related thread :

https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/stm32h743ii-fmc-8080-lcd-spurious-writes/td-p/354191

 

By the way, it's sad that cubeide didn't warm you about the bank remapping needed in 16 bits mode needed for sram/nor/lcd..