Skip to main content
EOzde.1
Associate III
September 6, 2021
Solved

Does STM32H745ZI(LQFP144) FMC support external SDRAM or SRAM? (not PSRAM).

  • September 6, 2021
  • 25 replies
  • 3773 views

Hi,

In CUBEMX with LQFP144, there is no configuration for both SRAM and SDRAM? But with other packets (LQFP176, LQFP208) there is a configuration like SDRAM1, SDRAM2, SRAM. Is it not possible with the LQFP144 or if I configure the parameters directly from the code, would it works? Because I believe all packets have the same properties except the pin numbers. 

Thank you.

This topic has been closed for replies.
Best answer by Harvey White

In the configuration tool, using either the cubeMX-IDE or the older tool, do a control left click on the pin in question. That should cause the alternate pins for the function to blink. As an example, SPI5-MISO on the F767 has a pin to the left side of the chip, and also one to the bottom.

For any function and any chip:

the configuration generator reads the assigned functions from the chip model. You can only select legal functions for any pin. The "produce code" generates user pin named definitions in main.h. Look for stm32xxxxxxx_hal_msp.c in the core/source directory. Replace the xxxxxx by something appropriate to your processor. Check the inits, and you will find where the configuration tool defines the pin functions for the processor.

You do NOT need to mess with this. If you're using the MX configuration tools, defining the alternate functions at that level and in that application will work for you.

If you are designing your own board, you have the most flexibility. If you use a Nucleo board, then you have less, but the alternate functions will likely be different for each project. If you use a Discovery board, be aware that the default setups (say for FMC on the 459i Disco board) are not used without modification, there's an alternate pin used.

So: only your user named pins are in main.h.

Use the configuration tool (even when using BSP drivers) to assign alternate pins.

Mixing BSP drivers on DISCO boards with cubeMX drivers is another issue entirely.

25 replies

Harvey White
Senior III
January 14, 2022

Then that's the answer for the memory controller. I'll have to look at the various chips I use and see whether or not the chip has OCTOSPI.

The cost difference between the 16MB and the 64MB is about 20 cents in unit lots. I'll go with the 64MB. Since I populate my own boards, I don't use BGA (at all), and I prefer chips with legs. So SOP8 is the preferred way to go.

Harvey White
Senior III
January 14, 2022

The F446 has an older style QSPI controller, and does not permit writes to the memory mapped QSPI chip. The F767 makes no mention of the limitation (of writing to the memory, and mentions sending and receiving packets to the chip). I'm going to presume that the chip works in this mode.

The chip I mentioned: A6404L, has only two modes, SPI and QSPI. The datasheet does not mention Dual SPI at all.

As a design point, if you design your own board layout (and don't use a Nucleo board or equivalent where the pins are preassigned), the default pin assignments in CubeMxIDE are not always the best ones. For QSPI, you'd want all the pins next to each other for ease in layout. Alternate pin assignments may be needed. For SPI, this is particularly true. Control pins for USART connections are similar.