cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C011J4M6 programming pins and timer example ?

Glodhi
Associate

 

1. Please suggest the pin for programming interface or documents 

2. Programme example for tick timer, two external interrupts? library

Glodhi_0-1766468122893.png

 

2 REPLIES 2
KnarfB
Super User

My copilot said:

Programming Interface Pins (SWD)

Even in the 8‑pin SOIC package, the STM32C011J4M6 exposes the full SWD interface.

✔ Recommended SWD pins

Function Pin Notes
SWDIOPA13Bidirectional debug data
SWCLKPA14Debug clock
NRSTPA0Optional but strongly recommended
VDD / VSSPower + ground
 

These are the same pins used on all STM32C0 devices.

✔ Official documentation

You’ll want these three documents from ST:

  • Datasheet (STM32C011x4/x6)

  • Reference Manual (RM0490 — STM32C0 series)

  • Errata Sheet (always worth checking)

You can find them on ST’s product page by searching “STM32C011J4M6”.

 

Minimal Example: SysTick + Two External Interrupts (HAL)

Below is a clean, minimal, reproducible example using HAL. It demonstrates:

  • SysTick running at 1 ms

  • Two EXTI lines on PA1 and PA2

  • Interrupt handlers toggling flags

  • No CubeMX required

... (code snippets and explanations follow) 

 

Notes:

- the toolchain was recently upgraded  to STM32Cube for VS Code - STMicroelectronics 
and many existing tutorials... dont reflect that yet,

- try the STM32 Sidekick (chat button down right corner)

hth

KnarfB

Andrew Neil
Super User

@Glodhi wrote:

1. Please suggest ... documents 


See the 'Documentation' tab of the Product Page:

https://www.st.com/en/microcontrollers-microprocessors/stm32c011j4.html#documentation

The key documents are the Datasheet and the Reference Manual.

 

For software & examples, see the 'Tools & Software' tab:

https://www.st.com/en/microcontrollers-microprocessors/stm32c011j4.html#tools-software

 

You can access examples via STM32CubeMX

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.