Hello all,
I am a regular developer on Arduino using Atmel and ESP32 MCUs. I have also programmed several ST ARM MCUs (Nucleo eval boards) using mbed compilers. Recently, I decided to use very low end ST ARM MCUs such as STM32C0xxx and STM32G0xxx with low cost STLink programmer as flash burner.
I have an application needing 1 analog input, 2 digital outputs and serial port USART output to console and I decided to start with STM32C011JxM SO8N pinout. Each pin in this MCU can have many port pins and each port pins can be assigned many functions.
I am aware that if I use ST's CubeIDE, I can assign port pins to each of the 8 pins but I wish to use Arduino IDE only.
I made following connections for power and programming:
Pin No 2 - VDD 3.3V
Pin No 3 - VSS Ground
Pin No 7 - SWDIO connected to ST Link hardware programmer
Pin No 8 - SWCLK connected to ST Link hardware programmer
Pin No 1 - PB7 to drive LED
Pin No 5 - PA8 as Tx for Soft Serial @max38400 baud
Pin No 6 - PA10 as Rx for Soft Serial
I am able to send data to PC using softSerial, using a separate TTL-USB serial converter board.
I am facing following issues, so I request all of you to help me:
1. On power-on-reset, how to assign one port pin to a particular hardware pin, so that it can then be initialized for a particular function such as I/O or USART?
Using the hardware manual, I can glean from that which hardware pin can take which function. I can also get that info from pin Configuration in Cube IDE.
2. I looked up the manual and using power -on- reset port pin allocated there, I tried to use simple code for digital output or serial output or analog input but I failed.
3. Only thing that works is blink on pin 1,4 and 6 and software serial output on pin 5. These operations could not be rep;icated on other port pins.
4. Analog input is not working.
Thanks in advance.
How to map port lines on 8 pin STM32C011
Post here all questions related to STM32 core if you can't find a relevant section!
-
- Posts: 1
- Joined: Fri Feb 09, 2024 12:48 pm
Return to “General discussion”
Jump to
- Announcements
- New users start here
- ↳ Forum rules, FAQs and HowTo's
- ↳ Let us know a bit about you and your projects
- Arduino for STM32
- ↳ General discussion
- ↳ Ideas & suggestions
- ↳ Cores
- ↳ STM32 Core
- ↳ Builds and Announcements
- ↳ Code snippets
- ↳ Ideas & suggestions
- ↳ General discussion
- ↳ Installation and OS related
- ↳ Libraries & Hardware
- ↳ PR's bugs and enhancements
- ↳ LibMaple
- ↳ Builds and Announcements
- ↳ Code snippets
- ↳ General discussion
- ↳ Ideas & suggestions
- ↳ Installation and OS related
- ↳ Libraries & Hardware
- ↳ PR's bugs and enhancements
- ↳ Steve's LibMaple core
- ↳ General discussion
- ↳ PR's bugs and enhancements
- ↳ Projects
- ↳ IDE's
- ↳ Off topic
- Arduino for STM8
- ↳ General discussion
- ↳ Cores
- ↳ STM8 Core
- ↳ Other
- Boards
- ↳ Custom design boards
- ↳ Maple & Maple mini etc
- ↳ STM boards (Discovery, Eval, Nucleo, ...)
- ↳ All other boards
- ↳ STM32F0 based boards
- ↳ STM32F1 based boards
- ↳ STM32F2 based boards
- ↳ STM32F3 based boards
- ↳ STM32F4 based boards
- ↳ STM32F7 based boards
- ↳ STM32G0 based boards
- ↳ STM32G4 based boards
- ↳ STM32H7 based boards
- ↳ STM32L0 based boards
- ↳ STM32L1 based boards
- ↳ STM32L4 based boards
- ↳ STM32L5 based boards
- ↳ STM32MP1 based boards
- ↳ STM32WB based boards
- Bootloaders
- ↳ STM32 HID bootloader
- ↳ USB bootloader
- ↳ STM32 SD-Bootloader
- ↳ STM32 USB CDC bootloader
- Uploaders and debuggers
- ↳ STLink
- ↳ USB to Serial adaptors
- ↳ Black Magic Probe & other
- Dead Thread Graveyard
- ↳ Dead Thread Graveyard