1
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ if you are looking on which pin you can assign which alternative function, you will find that in product specification and not in reference manual. You can find that file on same page as reference manual. \$\endgroup\$ – Rokta Oct 15 '18 at 8:14
  • \$\begingroup\$ What kind of LCD are you working with exactly? \$\endgroup\$ – duskwuff -inactive- Oct 15 '18 at 9:02
  • \$\begingroup\$ It's the WH2004L-TFH-ET# \$\endgroup\$ – Kris B Oct 15 '18 at 9:59
  • 1
    \$\begingroup\$ The STM32F105 doesn't have an FSMC module ... \$\endgroup\$ – brhans Oct 15 '18 at 11:34
2
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ I've downloaded and played around with the STM32CubeMx software, however, I'm still unaware as to how the MCU assigns pins to FSMC. \$\endgroup\$ – Kris B Oct 15 '18 at 10:52
  • \$\begingroup\$ See updated answer. I don't have CubeMX at hand to try for you, sorry. \$\endgroup\$ – Michel Keijzers Oct 15 '18 at 10:59
  • 2
    \$\begingroup\$ 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. \$\endgroup\$ – Kris B Oct 15 '18 at 11:09
  • \$\begingroup\$ Btw, you can in CubeMX when selecting a board, also look parameter based, and select FSMC, than you will see which boards have FSMC. \$\endgroup\$ – Michel Keijzers Oct 15 '18 at 11:31
0
\$\begingroup\$

(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
\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.