diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_rig/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_rig/interfaces-impl/bsp.cpp index 608341d9f0f19f5bdf5d54f5d6c70bedab23b949..de4b926c2fc783da1777853080c81ab38b6484a0 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_rig/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_rig/interfaces-impl/bsp.cpp @@ -211,7 +211,7 @@ namespace miosix RCC->APB1ENR |= RCC_APB1ENR_TIM3EN; RCC->APB1ENR |= RCC_APB1ENR_TIM4EN; RCC->APB2ENR |= RCC_APB2ENR_TIM8EN; - RCC->APB2ENR |= RCC_APB2ENR_TIM9EN; + RCC->APB1ENR |= RCC_APB1ENR_TIM2EN; RCC->APB2ENR |= RCC_APB2ENR_TIM10EN; RCC->APB2ENR |= RCC_APB2ENR_TIM11EN; @@ -263,13 +263,13 @@ namespace miosix timers::tim11ch1::mode(Mode::ALTERNATE); timers::tim3ch1::mode(Mode::ALTERNATE); timers::tim10ch1::mode(Mode::ALTERNATE); - timers::tim9ch2::mode(Mode::ALTERNATE); + timers::tim2ch2::mode(Mode::ALTERNATE); timers::tim4ch2::alternateFunction(2); timers::tim11ch1::alternateFunction(3); timers::tim3ch1::alternateFunction(2); timers::tim10ch1::alternateFunction(3); - timers::tim9ch2::alternateFunction(3); + timers::tim2ch2::alternateFunction(1); using namespace sensors; ADS131_1::cs::mode(Mode::OUTPUT); diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_rig/interfaces-impl/hwmapping.h b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_rig/interfaces-impl/hwmapping.h index 10013e2223c1b31ea3b46d7f7c72fbd0d897796f..1fa4fca0651fe2f17c6a6597cce0730618870e8b 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_rig/interfaces-impl/hwmapping.h +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_rig/interfaces-impl/hwmapping.h @@ -83,7 +83,7 @@ using tim4ch2 = Gpio<GPIOB_BASE, 7>; // Servo 1 using tim11ch1 = Gpio<GPIOB_BASE, 9>; // Servo 2 using tim3ch1 = Gpio<GPIOB_BASE, 4>; // Servo 3 using tim10ch1 = Gpio<GPIOB_BASE, 8>; // Servo 4 -using tim9ch2 = Gpio<GPIOE_BASE, 6>; // Servo 5 +using tim2ch2 = Gpio<GPIOB_BASE, 3>; // Servo 5 } // namespace timers } // namespace interfaces @@ -137,7 +137,7 @@ using servo1 = interfaces::timers::tim4ch2; using servo2 = interfaces::timers::tim11ch1; using servo3 = interfaces::timers::tim3ch1; using servo4 = interfaces::timers::tim10ch1; -using servo5 = interfaces::timers::tim9ch2; +using servo5 = interfaces::timers::tim2ch2; } // namespace servos namespace relays @@ -151,9 +151,9 @@ using relay4 = Gpio<GPIOA_BASE, 15>; namespace radio { using cs = Gpio<GPIOF_BASE, 6>; -using sck = interfaces::spi1::sck; -using miso = interfaces::spi1::miso; -using mosi = interfaces::spi1::mosi; +using sck = interfaces::spi4::sck; +using miso = interfaces::spi4::miso; +using mosi = interfaces::spi4::mosi; using dio0 = Gpio<GPIOD_BASE, 5>; using dio1 = Gpio<GPIOD_BASE, 12>; using dio3 = Gpio<GPIOD_BASE, 13>;