stm32/gpio: make port G work on U5.

This commit is contained in:
Dario Nieuwenhuis
2023-10-23 18:12:31 +02:00
parent a39ae12edc
commit 82593bd404
2 changed files with 9 additions and 2 deletions

View File

@ -763,6 +763,13 @@ pub(crate) unsafe fn init(_cs: CriticalSection) {
<crate::peripherals::AFIO as crate::rcc::sealed::RccPeripheral>::enable_and_reset_with_cs(_cs);
crate::_generated::init_gpio();
// Setting this bit is mandatory to use PG[15:2].
#[cfg(stm32u5)]
crate::pac::PWR.svmcr().modify(|w| {
w.set_io2sv(true);
w.set_io2vmen(true);
});
}
mod eh02 {