stm32-rs / stm32l0xx-hal

A hardware abstraction layer (HAL) for the STM32L0 series microcontrollers written in Rust
BSD Zero Clause License
96 stars 60 forks source link

unify rcc enable/reset #196

Closed burrbull closed 3 years ago

burrbull commented 3 years ago

Some peripheral in this hal reset before enable. This is strange.

burrbull commented 3 years ago

By doing a reset, we make sure that the expectations of the API match the actual hardware state.

I meant that usually we do enable and then reset. But I saw several times in this particular HAL reset preceded enable (reset disabled peripheral). For example on AES or DMA.

hannobraun commented 3 years ago

I meant that usually we do enable and then reset. But I saw several times in this particular HAL reset preceded enable (reset disabled peripheral). For example on AES or DMA.

Ah, got it. I would have thought that works, but I could be wrong. It might just be a bug.

burrbull commented 3 years ago

cc @hannobraun