Hello everyone,
I’m working with a SparkFun MicroMod ATP board which uses pins labeled G0 to G11. My goal is to control these pins using the STM32F405 microcontroller inside, but I’m having trouble finding the correct pin mapping between the SparkFun pin labels (G0–G11) and the STM32F405 pin names like PC0, PC2, etc.
I’ve tried multiple approaches to define pins in my Arduino/PlatformIO project, for example:
const int Testpin = 71; // Trying a numeric pin index
const int Testpin = PC_2; // Trying STM32 pin name directly
However, neither method works as expected.
Here is my current platformio.ini
setup:
[env:micromod_f405]
platform = ststm32
board = sparkfun_micromod_f405
framework = arduino
upload_protocol = dfu
monitor_speed = 115200
build_flags =
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
-D USBCON
-D USBD_USE_CDC
I suspect that my environment or variant files might be incorrect or outdated, and that’s why I can’t find the correct translation from SparkFun’s Gx pins to the underlying STM32 pins.
Could someone please point me to the official or correct variant/pin mapping files, or explain how to properly map SparkFun MicroMod ATP pins (G0–G11) to STM32F405 pin names in the Arduino framework?
Thanks in advance for your help!