Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: EncoderInit.cpp
- Revision:
- 2:3fcf36c1b1af
- Parent:
- 0:ebd170807e11
- Child:
- 4:9ce0e451aeff
--- a/EncoderInit.cpp Thu May 26 16:21:43 2016 +0000
+++ b/EncoderInit.cpp Mon Dec 17 17:02:43 2018 +0000
@@ -13,22 +13,22 @@
encoder->IC1Filter = 0x0F;
encoder->IC1Polarity = TIM_INPUTCHANNELPOLARITY_RISING;
- encoder->IC1Prescaler = TIM_ICPSC_DIV4;
+ encoder->IC1Prescaler = TIM_ICPSC_DIV1;
encoder->IC1Selection = TIM_ICSELECTION_DIRECTTI;
encoder->IC2Filter = 0x0F;
encoder->IC2Polarity = TIM_INPUTCHANNELPOLARITY_FALLING;
- encoder->IC2Prescaler = TIM_ICPSC_DIV4;
+ encoder->IC2Prescaler = TIM_ICPSC_DIV1;
encoder->IC2Selection = TIM_ICSELECTION_DIRECTTI;
if (HAL_TIM_Encoder_Init(timer, encoder) != HAL_OK) {
- printf("Couldn't Init Encoder\r\n");
+ //printf("Couldn't Init Encoder\r\n");
while (1) {}
}
if(HAL_TIM_Encoder_Start(timer,TIM_CHANNEL_1)!=HAL_OK) {
- printf("Couldn't Start Encoder\r\n");
+ //printf("Couldn't Start Encoder\r\n");
while (1) {}
}
}