2019-07-10 05:19 AM
I have just changed from STM32F (works fine) to STM32H and have used MX to generate the Code for a SRAM 16 bits wide and 6 Address lines. The FMC outputs the NE clock but depending on the Data Bus Setting 8, 16, or 32, NE produces either 8, 4, or 2 Clocks respectively within the NE Clock, the Address also increments for each down clock within the NE. My reqiuirements are for a single NE Clock for a 16 Data Bus. It appears that the FMC always wants to clock a 64 bit word what ever the Data Bus size. Regards JohnW
2019-07-12 03:08 AM
Re:- Multiple Clocks ... In terms of Code, I have only added to the CubeMX Code as follow:-
In main.h added #define SRAM_DRIVER_ADDR 0x6000000 //NE1
in main.c while(1) {
// Delay;
*(___IO uint16_t *) (SRAM_DRIVER_ADDR + 0x0000) = 0x000; //
}
NSBank = FMC_NORSRAM_BANK1;
MemoryType = FMC_MEMORY_TYPE_SRAM;
MemoryDataWidth = FMC_NORSRAM_MEM_BUS_WIDTH_16;
.AddressSetupTime = 1;
.AddressHoldTime =1;
.DataSetupTime = 1;
.BusTurnAroundDuration = 0;
AccessMode = FMC_ACCESS_MODE_A
I have Silicon Revision Y
Any help would be appreciated ... K. Regards John W
2019-07-12 07:08 AM
From RM0433, FMC chapter, Supported memories and transactions
General transaction rules:
The memory region MPU attribute must be configured as “Device�? or “strongly-ordered�?
in order to prevent issues on devices that do not have the byte select feature. As an
example, if byte accesses are performed to 16-bit memories with the MPU attribute set
to “Normal memory�?, the AXI transaction size is 64 bits and the FMC splits the
transaction into four consecutive accesses while only one access is expected instead
of four.
I don't use 'H7.
JW
2019-07-12 08:06 AM
Thanks Jan ... That explains why I have 4 Write clocks within the NE1 ... I was at the point of going back to the STM32F427.
I may need to check out the attribute. Do you know if it changed in the Compiler/MXCube.
Thanks for the information KR ... JAW
2019-07-30 12:01 PM
2019-07-31 01:36 AM
Hi Amilton ... Yes had local FAE give some help.
The Memory has to be put into a Region this can be done from CubeMX, I made sure CubeMX was updated.
Only had this working yesterday so have not fully checked out
KR John W
2019-09-03 03:31 PM
Yep it fixed my issue, thanks for that...