Skip to content

Conversation

@Wratox
Copy link

@Wratox Wratox commented Jan 22, 2026

Added a few functions to low level timer in order to avoid having to access the registers directly.

@Wratox
Copy link
Author

Wratox commented Jan 26, 2026

I don't really get why the ci failed here, I checked RM0493, RM0515 and stm32-metapac docs and found no evidence that af1 is missing on any stm32wbaxxx processors.

Compiling embassy-stm32wba-examples v0.1.0 (/ci/code/examples/stm32wba)
error[E0599]: no method named `af1` found for struct `TimGp16` in the current scope
    --> /ci/code/embassy-stm32/src/timer/low_level.rs:1031:26
     |
1031 |         self.regs_gp16().af1().modify(|w| w.set_etrsel(val));
     |                          ^^^ method not found in `TimGp16`

Embassy-stm32 compiles fine for all of stm32wbaxxx and I even went as far as replacing stm32wba52cg in examples/stm32wba/Cargo.toml with every other variation of stm32wbaxxx but when I tried to compile the example some failed to compile due to different pinout but never because of the above error:

Processor Status
stm32wba50ke Error: no field PC13 on type Peripherals
stm32wba50kg Error: no field PC13 on type Peripherals
stm32wba52ce compiled
stm32wba52cg compiled
stm32wba52ke Error: no field PC13 on type Peripherals
stm32wba52kg Error: no field PC13 on type Peripherals
stm32wba54ce compiled
stm32wba54cg compiled
stm32wba54ke Error: no field PC13 on type Peripherals
stm32wba54kg Error: no field PC13 on type Peripherals
stm32wba55ce compiled
stm32wba55cg compiled
stm32wba55he Error: no field PC13 on type Peripherals
stm32wba55hg Error: no field PC13 on type Peripherals
stm32wba55ue compiled
stm32wba55ug compiled
stm32wba62cg Error: no field PA0 on type Peripherals
stm32wba62ci Error: no field PA0 on type Peripherals
stm32wba62mg compiled
stm32wba62mi compiled
stm32wba62pg compiled
stm32wba62pi compiled
stm32wba63cg compiled
stm32wba63ci compiled
stm32wba64cg Error: no field PA0 on type Peripherals
stm32wba64ci Error: no field PA0 on type Peripherals
stm32wba65cg Error: no field PA0 on type Peripherals
stm32wba65ci Error: no field PA0 on type Peripherals
stm32wba65mg compiled
stm32wba65mi compiled
stm32wba65pg compiled
stm32wba65pi compiled
stm32wba65rg compiled
stm32wba65ri compiled

@Wratox Wratox changed the title Added a few timer functions STM32 Added a few timer functions Jan 27, 2026
@Wratox
Copy link
Author

Wratox commented Jan 28, 2026

I realized now it failed because of building with stm32l073rz which doesn't have the TIMx_AF1 register(nor does any of the STM32L0x3 processors after checking RM0367).

Would someone be able tell me if there are any other processors that doesn't have this register?
And if so, which ones?

@xoviat
Copy link
Contributor

xoviat commented Jan 29, 2026

cfg(not(stm32l0))

@Wratox
Copy link
Author

Wratox commented Feb 2, 2026

cfg(not(stm32l0))

Alright, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants