STM32F103C8T6 (blue pill) and GPIO interrupts

Yes, I need to set EXTI_IMR (Interrupt mask register), EXTI_RTSR (rising trigger), EXTI_FTSR (falling trigger).

The question is how to do it in Rust. The fact that the device crates are generated and not really documented does not make it easy for newbies like me.

Which one of these do I need?

  • stm32f1xx_hal::device::exti::IMR
  • stm32f1xx_hal::pac::exti::IMR
  • stm32f1xx_hal::stm32::exti::IMR

And, how do I obtain 'values' of these types?

I've found this blog post, but it seems to be outdated, because I can't get it to work with stm32f1xx-hal version 0.3.0.

1 Like