2025-07-04 4:04 AM - last edited on 2025-07-04 6:10 AM by mƎALLEm
Hi STM Team,
We are using STM32H757XIH6 microcontroller in our design for one of the project.
We are having the query regarding FMC port.
We are planning to use 8 bit data bus (FMC_D0-D7) of FMC port to drive multiple peripherals like LCD, Keypad, ADCs, IO cards etc.
We understand their are 4 Chip Selects NE1,NE2,NE3 and NE4.
We also intend to use GPIO pins to work as additional Chip Selects for all above peripherals.
Can we use the FMC port data lines (FMC_D0-D7) along with GPIOs as additional Chip Selects for above application?
Request you to please share the steps to configure FMC port for this application.
Could you please also confirm if we can use FMC port signals as GPIO signals?
Appreciate your support.
Solved! Go to Solution.
2025-07-04 5:41 AM - edited 2025-07-04 7:15 AM
Hello,
To expend NE/Chip select better to use 3 to 8 line decoder like the 74xx138 or equivalent.
A, B and C inputs of that decoder are connected to the highest lines address of the FMC. So one SRAM bank will be divided to 8 regions equal of size of 8MByte.
G input of the 74xx138 will be connected to one of the NE of the FMC pins.
Example with FMC_NE0 and the different devices address (maximum 8 devices per FMC_NEx):
Hope that helps.
2025-07-04 5:41 AM - edited 2025-07-04 7:15 AM
Hello,
To expend NE/Chip select better to use 3 to 8 line decoder like the 74xx138 or equivalent.
A, B and C inputs of that decoder are connected to the highest lines address of the FMC. So one SRAM bank will be divided to 8 regions equal of size of 8MByte.
G input of the 74xx138 will be connected to one of the NE of the FMC pins.
Example with FMC_NE0 and the different devices address (maximum 8 devices per FMC_NEx):
Hope that helps.
2025-07-07 5:00 AM
Thanks for your guidance.
Also, can we use a common 8-bit data bus (FMC_D0-D7) and use GPIO pins to work as additional Chip Selects (using decoding logic implemented in software to generate chip selects) to drive multiple devices like the LCD, Keypad, ADCs, DACs, IO cards, etc., from the FMC port, with each peripheral having a separate chip select pin for operation? For example, if we want to drive the LCD, we use FMC_D0-D7 and enable its chip select (Generated by via GPIO "CS_LCD"). Similarly, if we want to drive the Keypad, we use FMC_D0-D7 and enable its chip select (Generated by via GPIO "CS_Keypad"). Is this approach feasible?
Request your support on same.
2025-07-07 5:07 AM - edited 2025-07-09 5:57 AM
You asked already the same questions.
You cannot use FMC_D0-D7 to enable chip select. FMC_D0-D7 are for data and CS pins is intended to be driven by FMC_NEx.
You can use a simple GPIOs but you need to ensure the correct Set/Reset at the right times and avoid conflict between the devices. And frankly I don't know for the LCD, I'm not sure, it could be not.
That's why I'm suggesting to use an external decoder for your application. That solution avoids any conflict and any CS set/reset timing issue .
Hope it's clear now.
2025-07-09 5:03 AM
Yes, it's clear now.
Thanks for your guidance.