Export Pin configuration

Post here all questions related to STM32 core if you can't find a relevant section!
Post Reply
mebab
Posts: 115
Joined: Mon Aug 24, 2020 12:42 pm
Answers: 4

Export Pin configuration

Post by mebab »

Hi
I know that It is possible to have 'clock configuration' from STM32CubeIDE in a 'variant.cpp' file to be usable by Arduino IDE. How to use the STM32CubeIDE-generated pin configuration in Arduino IDE?

Thanks for your guidance,
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Export Pin configuration

Post by fpiSTM »

If what you want is use the MX_GPIO_init() then simply copy the code in your sketch.
HAL and LL are available at sketch level. For LL usage you have to include manually the header.
To be generic across serie all LL header have been wrapped in a generic header file:
https://github.com/stm32duino/Arduino_C ... o/stm32/LL

All LL header: stm32yyxx_ll.h
Specific one: stm32yyxx_ll_<ppp>.h where <ppp> is the tagerted peripheral. Ex for ADC: stm32yyxx_ll_adc.h
Post Reply

Return to “General discussion”