cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 FMC and 16bits device

Alex_J
Associate II

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

 

 

11 REPLIES 11
Pavel A.
Super User

I'm looking at one project for STM32H753 with FPGA, there we defined the FMC "instance" type as NOR, not as SRAM. The windows addresses are in 0x60000000 range; set in MPU as non-shared device; not remapped.

32-bit accesses to the FPGA work just fine, no unexpected behavior.

 

Alex_J
Associate II

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..