Brandon Modon Encoder_Nucleo_16_bits
Diff: EncoderMspInitF4.cpp
- Revision:
- 7:cd502aeab71a
- Parent:
- 0:ebd170807e11
--- a/EncoderMspInitF4.cpp Fri Oct 14 13:38:48 2016 +0000 +++ b/EncoderMspInitF4.cpp Tue Feb 21 15:33:10 2017 +0000 @@ -52,10 +52,10 @@ GPIO_InitStruct.Alternate = GPIO_AF1_TIM2; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); } - else if (htim->Instance == TIM3) { //PB4 PB5 = Nucleo D5 D4 + else if (htim->Instance == TIM3) { //PA6 PA7 = Nucleo D12 D11 //MY MODIF __TIM3_CLK_ENABLE(); __GPIOB_CLK_ENABLE(); - GPIO_InitStruct.Pin = GPIO_PIN_4 | GPIO_PIN_5; + GPIO_InitStruct.Pin = GPIO_PIN_6 | GPIO_PIN_7; //MY MODIF GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_PULLDOWN; GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;