hal_tick.h changed for the L432KC target in TARGET/../device/ in order to reassign the system ticker from TIM2 to TIM7, since TIM2 was needed as a 32bit encoder counter.
Dependents: Nucleo_L432KC_Quadrature_Decoder_with_ADC_and_DAC
Fork of mbed-dev by
Revision 160:307a9fd4de22, committed 2017-03-11
- Comitter:
- tonnyleonard
- Date:
- Sat Mar 11 22:55:28 2017 +0000
- Parent:
- 159:612c381a210f
- Child:
- 161:bd0311f1ad86
- Commit message:
- System ticker on Nucleo L432KC changed from TIM2 to TIM7, so that one may use TIM2 as a 32bit encoder counter.
Changed in this revision
targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/device/hal_tick.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/device/hal_tick.h Tue Feb 28 17:13:35 2017 +0000 +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/device/hal_tick.h Sat Mar 11 22:55:28 2017 +0000 @@ -42,14 +42,14 @@ #include "stm32l4xx.h" #include "cmsis_nvic.h" -#define TIM_MST TIM2 -#define TIM_MST_IRQ TIM2_IRQn -#define TIM_MST_RCC __TIM2_CLK_ENABLE() +#define TIM_MST TIM7 +#define TIM_MST_IRQ TIM7_IRQn +#define TIM_MST_RCC __TIM7_CLK_ENABLE() -#define TIM_MST_RESET_ON __TIM2_FORCE_RESET() -#define TIM_MST_RESET_OFF __TIM2_RELEASE_RESET() +#define TIM_MST_RESET_ON __TIM7_FORCE_RESET() +#define TIM_MST_RESET_OFF __TIM7_RELEASE_RESET() -#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer +#define TIM_MST_16BIT 1 // 1=16-bit timer, 0=32-bit timer #define TIM_MST_PCLK 1 // Select the peripheral clock number (1 or 2)