stm32duino / Arduino_Tools

Contains upload tools for STM32 based boards
Other
89 stars 64 forks source link

genpinmap doesn't support stm32f10x chips #17

Closed RickKimball closed 7 years ago

RickKimball commented 7 years ago

When I try to use genpinmap with an stm32f103 board I get the message:

"STM32F10xx MCU not supported due to older GPIO IP version"

How did you generate the PeriphalPins.c used with the NUCELO_F103RB and DISCO_F100RB ?

ghost commented 7 years ago

@RickKimball

STM32F1 chips are not supported due to the alternate functions. You have 2 ways to generate the PeripheralPins.c:

I don't have better solutions to propose to you.

RickKimball commented 7 years ago

Can you give me a hint how to hack it?

fpistm commented 7 years ago

Hi @RickKimball I've pushed a branch on my forked repo with the hack: https://github.com/fpistm/Arduino_Tools/commit/b406f1c367a256faa18a520ae5f93751a622f614

RickKimball commented 7 years ago

Thanks! That seems to work.

fpistm commented 7 years ago

You're welcome. I've updated my branch with a parsing for the F1 AF. It required further study to align value btw core and __HAL_AFIO_REMAP_xxxxx: https://github.com/stm32duino/Arduino_Core_STM32/blob/master/cores/arduino/stm32/PinAF_STM32F1.h#L67

I think there are some issue in the current PeripheralPins.c used by our F1 variant. This could be the root cause of the trouble with Serial Recv

RickKimball commented 7 years ago

I wonder why the NUCLEO_F103RB works then?

fpistm commented 7 years ago

If the concerned pins is not impacted it could work. It need further investigations. It's ongoing ;)

fpistm commented 7 years ago

I will produce a patch to support all AF for F1 but this will request some core update that I need to validate. The genpinmap script will be also updated to manage properly AF for F1.

fpistm commented 7 years ago

@RickKimball, here #18 , the PR to be able to extract AF information for F1. I've also push a PR to the core to be able to handle all AF: https://github.com/stm32duino/Arduino_Core_STM32/pull/84 If you can give a try with your vldisco, I've some doubt around some AF which could explain issue with Serial Rx Thanks in advance

fpistm commented 7 years ago

PR #18 merged.