STM32F407 FSMC memory

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
User avatar
mcauser
Posts: 392
Joined: Mon Jun 15, 2015 8:03 am

STM32F407 FSMC memory

Post by mcauser » Fri Mar 08, 2019 3:20 am

I have collected a bunch of STM32F4 boards which feature unpopulated footprints for FSMC SRAM/ROM/NOR/NAND/PSRAM memory.

* VCC-GND STM32F407ZGT6 Mini - https://github.com/mcauser/VCC_GND_F407ZG
* "Black" STM32F407ZGT6 - https://github.com/SpotlightKid/BLACK_F407ZG
* "Black" STM32F407ZET6- https://github.com/mcauser/BLACK_F407ZE

The VCC-GND ZGT6 docs suggest a K9F5608 Nand flash chip (256MBit 32Mx8 TSOP48).
The "Black" ZGT6 docs recommend a IS2WV51216-1M SRAM chip (44pin TSOP).
The "Black" ZET6 docs recommend a IS62WV51216-1M SRAM chip (44pin TSOP).

It seems these boards expose flexible memory controller pins and support multiple memory types.
Has anyone used them?
What memory chips did you use?
What kind of extra functionality do you get? More filesystem? More temp storage? More speed?
I have much to learn...

Found this for the STM32F439 boards:
https://github.com/formica-multiuso/mic ... -fsmc-sram

OutoftheBOTS_
Posts: 627
Joined: Mon Nov 20, 2017 10:18 am

Re: STM32F407 FSMC memory

Post by OutoftheBOTS_ » Fri Mar 08, 2019 5:25 am

I have used the FSMC to drive an external TFT in 16 bit parallel as the screen RAM is just seen as external RAM by the STM32F407VET.

Here is the code https://github.com/OutOfTheBots/ili9341_16bit_touch that was part of the development for this video https://www.youtube.com/watch?v=H51OzQl3BC8

I don't the HAL libiaries much as I find it takes me much longer to work out how to use them compared to just reading the reference manual and setting the register myself.

There was 2 parts to setting up the FSMC : part1 setup the pins in alternative mode and as FSMC then setting up the FSMC registers (this was only 2 lines of code)

User avatar
mcauser
Posts: 392
Joined: Mon Jun 15, 2015 8:03 am

Re: STM32F407 FSMC memory

Post by mcauser » Mon Mar 11, 2019 4:31 am

I ordered one of the 3.2" TFT's which mate with the "Black STM32F407ZET6" TFT/FSMC pins.
It's using the ILI9341 and XPT2046 resistive touch. Looks like it's similar if not the same board.

OutoftheBOTS_
Posts: 627
Joined: Mon Nov 20, 2017 10:18 am

Re: STM32F407 FSMC memory

Post by OutoftheBOTS_ » Mon Mar 11, 2019 4:43 am

The code will be the same. The only difference in the MCU is the amount of flash it has.

I did change 1 pin though for my code to work. Off memory I connected the LCD register select pin to the FSMC address pin A16 so that it would select when I used the following addresses

Code: Select all

#define LCD_REG      (*((volatile unsigned short *) 0x60000000))
#define LCD_RAM (*((volatile unsigned short *) 0x60020000))
If you use the standard pin on the connector then you will need to change the address that LCD_REG is pointing too so that the correct address pin goes high or low and also you will need to change the pin setup in in the FSMC_Init function

I never used the XTP2046 chip but rather connected the touch to the ADC pins of the MCU

lukesky333
Posts: 37
Joined: Fri Sep 02, 2016 4:07 pm
Location: Austria

Re: STM32F407 FSMC memory

Post by lukesky333 » Thu Jun 27, 2019 7:35 am

mcauser wrote:
Mon Mar 11, 2019 4:31 am
I ordered one of the 3.2" TFT's which mate with the "Black STM32F407ZET6" TFT/FSMC pins.
It's using the ILI9341 and XPT2046 resistive touch. Looks like it's similar if not the same board.
Can you give me a link to the TFT display?

User avatar
mcauser
Posts: 392
Joined: Mon Jun 15, 2015 8:03 am

Re: STM32F407 FSMC memory

Post by mcauser » Thu Jun 27, 2019 9:53 am

@lukesky333 Acelex on AliExpress sells them:
AU $21.76 | 3.2 inch TFT LCD screen with resistive touch screens ILI9341 display module
https://s.click.aliexpress.com/e/NxPJMlw

mapy
Posts: 4
Joined: Sat Sep 29, 2018 9:49 am

Re: STM32F407 FSMC memory

Post by mapy » Thu Jun 27, 2019 4:55 pm

Is It possible four you to share some examples using this board and this TFT. I have them but I can not write any pixel.
Thank you very much.

Enviado desde mi WIM mediante Tapatalk


Post Reply