2024-05-30 05:07 AM
Hello,
I have designed a hardware using STM32H7 series to drive a 8-bits parallel memory. The memory has an I/O port using which data can be written into the memory and can be read from the memory.
How can I initialize the GPIO port in such a way that I can use them in both configurations i.e. to write the data into the memory and to read data from the memory.
Please advise.
- Regards
Hrishikesh
2024-05-30 07:06 AM
Set the port lines as outputs in the procedure writing data to memory, then set them as inputs right after the data is written.
2024-05-30 09:57 AM
While @gbm 's post above replies your question, you might want to use FMC/FSMC instead of manually-controlled signals.
JW
2024-05-30 10:35 PM
Thank you for the suggestion.
Could you please confirm my understanding?
As per your suggestion, you told that I will have to initialize the GPIO mode each time before I use the port for operation. So, when I am writing to the memory, I will set the GPIO mode as output(i.e. initialize the GPIO to output using HAL driver) and then write to the port, and when I am reading from the memory, I will set the GPIO mode as input(i.e. initialize the GPIO to input using HAL driver) and then read from the port,
Am I right?
-Regards
2024-05-30 10:36 PM
I am sorry but I am not much sound with the FMC option of microcontroller. Could you please share some insights related to it?
-Regards
2024-05-30 11:50 PM
Read the datasheet (short description of capabilities) and the reference manual. There is for sure some "presentation" about the FMC.
Look also for examples, software and hardware (discovery and other boards, there's usually no external memory on the Nucleos).
Also check the OCTOSPI peripheral.
Manually controlled IOs for memory don't make sense on a machine like the H7, unless you have some "very special" memory which you can't connect otherwise. And you should think about your choice of memory... ;)
2024-05-31 12:01 AM
So the memory which I am using has only parallel I/O interface (MT29F2G08). Also as per the datasheet the IC doesn't support OctoSPI.
But for this IC will FMC create a difference.
-Regards
2024-05-31 12:09 AM
Just looked over the DS quickly, to me it looks like an "octal SPI" flash, which should be compatible with the OCTOSPI peripheral. But better ask some ST guys...
PS: it would help from the beginning to mention that it's about "flash" memory
PS2: googling ""MT29F" STM32h7 octospi" gave me at least one match...