1

How do I assign certain pins to the appropriate FSMC pins? I've looked through the reference manual and the examples, but there's nothing about pin assignment except configuring them as alternate push-pull. If it helps, I'm configuring the FSMC for an LCD interface.

Thanks.

Kris B
  • 19
  • 1

2 Answers2

2

What also might help is STM32CubeMx, which you can download from ST.

This will show alternative functions and you can define all pin assignments and more. Even if you do not use HAL, the generated code will give you clues about how the initialization can be done for your setup.

UPDATE

I don't have a STMF105 myself (neither used FSMC), but you can in STM32CubeMX define probably all pin positions. On the left (green/black items) there is probably FMSC where you can enable it and edit settings, than in the menu 'Configuration' on the top there are more settings possibly. Than you have to generate code, in that code, you can see the initialization code generated for FSMC. Follow the initialization code for FSMC to see what CubeMX made out of it, and convert it (manually) to the IDE you use.

Michel Keijzers
  • 13,867
  • 18
  • 69
  • 139
  • I've downloaded and played around with the STM32CubeMx software, however, I'm still unaware as to how the MCU assigns pins to FSMC. – Kris B Oct 15 '18 at 10:52
  • See updated answer. I don't have CubeMX at hand to try for you, sorry. – Michel Keijzers Oct 15 '18 at 10:59
  • 2
    Unfortunately, it looks like the STM32F105 is without an FSMC module. At least I know to use the STM32CubeMX in the future. Thank you all for your help. – Kris B Oct 15 '18 at 11:09
  • Btw, you can in CubeMX when selecting a board, also look parameter based, and select FSMC, than you will see which boards have FSMC. – Michel Keijzers Oct 15 '18 at 11:31
0

(I used a separate answer to keep the CubeMX answer in its own spot).

If you look at the STM32F105R8 datasheet, you see on page 8:

enter image description here

This shows that only the STM32F103 has the FSMC device (and only on 100/144 pins versions). So you have to

  • Move to STM32F103 (very cheap)
  • Move to another STM32FXXX version that has FSMC and supports your other requirements
  • Add an STM32F103 only for FSMC and communicate via your STM32F105.
  • Forget about FSMC
Michel Keijzers
  • 13,867
  • 18
  • 69
  • 139