2021-09-06 05:45 AM
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.
Solved! Go to Solution.
2021-09-07 03:37 AM
Thanks for the answer;
Okay, so CubeMX does not support FMC with SDRAM and SRAM. Only PSRAM and NOR flash can be configured for FMC in CubeMX. I think that my question should be can I configure FMC for SDRAM directly from the code or without FMC can I still use SDRAM with the QFP144?
Best Regards.
2021-09-07 03:53 AM
2021-09-07 11:12 PM
Okey man it is very sad. Since there is no stock of QFP176 and QFP208 I don't know what to do now. I didn't expect that any H7 series microcontroller doesn't support SDRAM or SRAM.
2021-09-08 01:09 AM
I'm not sure about SRAM, which should be supported by QFP144 I guess but mixed address and data line only.
2021-09-08 07:02 AM
2021-09-10 07:41 PM
Depending on the chip, you get an FMC or (I think) FSMC. FSMC has no dynamic RAM support, FMC supports all memories.
Some of the Dynamic memory pins can be remapped. In the 459Disco board, I believe that A0 must be remapped from the default. To the extent you can do that, you can run various types of memory.
I have a design that uses SDRAM and SRAM on a F767, The FMC accepts this. (Lines from the chip to the dynamic memory are too long and I think the SDRAM reading and writing is unreliable. The SRAM (display chip) works, but the timing had to be adjusted a bit.
2021-09-11 01:02 AM
Thank you for your opinion,
I have checked every pin that I need to use FMC SDRAM. Only 3 pin is missing in the configuration. If I can find the alternative ones for those pins It would work. But I couldn't find where the pins are registered for that purpose in the code. For example when I configure SPI3 in the CubeMX. There is a configuration in msp function for related pins. But in the msp init function MISO and MOSI pins are both configured as alternate functions. How does the chip know which one is MISO or MOSI. This is what I am looking for in the code. Maybe it is only a hardware thing. If this is the case. There is no option to change the necessary pins with their alternatives.
Best Regards.
2021-09-11 06:37 AM
2021-09-11 08:09 AM
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.
2021-09-11 08:23 AM
As a design suggestion:
While chips are very hard to find, you can still design the board.
1) pick the chip that has the subsystems you need, I generally go for memory and the controllers.
2) start a new project with the CubeMX-IDE. Select FMC and nothing else. Configure the chip enough to nail down the pins.
3) go through your design and see what subsystems are still available.. Pick as many alternate functions as you need.
If you are using SDRAM, my preliminary advice is that the length of the data lines to the chip are critical because the timing is not as adjustable as you'd like. SRAM timing is far simpler. Mapping an indirectly addressed display controller as SRAM is not explained at all well, but you'd like to designate A5 as a register select because of the way the FMC memory blocks get permissions. Ask if that's a case for you.
I have not gotten SDRAM to work reliably when fed from a nucleo board due to chip line lengths. What I'd recommend is to find a board with the memory already installed. You will likely have a display and other things installed as well. This may severely limit your choice of peripheral subsystems, but it will give you a board where the hardware is reliable. If your custom hardware uses only SPI and I2C, you are likely to be able to build your project. This configuration will at least allow you to breadboard and debug a project to an extent.
If nothing else, without buying anything, you will have a better idea of what processor your project can use.