Fix step timer on Archim1 (#15447)
This commit is contained in:
parent
acbe84c8ef
commit
df48ef6df3
@ -50,7 +50,7 @@ const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
|
|||||||
{ TC0, 0, TC0_IRQn, 3}, // 0 - [servo timer5]
|
{ TC0, 0, TC0_IRQn, 3}, // 0 - [servo timer5]
|
||||||
{ TC0, 1, TC1_IRQn, 0}, // 1
|
{ TC0, 1, TC1_IRQn, 0}, // 1
|
||||||
{ TC0, 2, TC2_IRQn, 2}, // 2 - stepper
|
{ TC0, 2, TC2_IRQn, 2}, // 2 - stepper
|
||||||
{ TC1, 0, TC3_IRQn, 0}, // 3
|
{ TC1, 0, TC3_IRQn, 0}, // 3 - stepper for BOARD_ARCHIM1
|
||||||
{ TC1, 1, TC4_IRQn, 15}, // 4 - temperature
|
{ TC1, 1, TC4_IRQn, 15}, // 4 - temperature
|
||||||
{ TC1, 2, TC5_IRQn, 3}, // 5 - [servo timer3]
|
{ TC1, 2, TC5_IRQn, 3}, // 5 - [servo timer3]
|
||||||
{ TC2, 0, TC6_IRQn, 14}, // 6 - tone
|
{ TC2, 0, TC6_IRQn, 14}, // 6 - tone
|
||||||
|
@ -39,7 +39,9 @@ typedef uint32_t hal_timer_t;
|
|||||||
|
|
||||||
#define HAL_TIMER_RATE ((F_CPU) / 2) // frequency of timers peripherals
|
#define HAL_TIMER_RATE ((F_CPU) / 2) // frequency of timers peripherals
|
||||||
|
|
||||||
|
#ifndef STEP_TIMER_NUM
|
||||||
#define STEP_TIMER_NUM 2 // index of timer to use for stepper
|
#define STEP_TIMER_NUM 2 // index of timer to use for stepper
|
||||||
|
#endif
|
||||||
#define TEMP_TIMER_NUM 4 // index of timer to use for temperature
|
#define TEMP_TIMER_NUM 4 // index of timer to use for temperature
|
||||||
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||||
#define TONE_TIMER_NUM 6 // index of timer to use for beeper tones
|
#define TONE_TIMER_NUM 6 // index of timer to use for beeper tones
|
||||||
@ -61,7 +63,9 @@ typedef uint32_t hal_timer_t;
|
|||||||
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM)
|
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM)
|
||||||
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
|
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
|
||||||
|
|
||||||
|
#ifndef HAL_STEP_TIMER_ISR()
|
||||||
#define HAL_STEP_TIMER_ISR() void TC2_Handler()
|
#define HAL_STEP_TIMER_ISR() void TC2_Handler()
|
||||||
|
#endif
|
||||||
#define HAL_TEMP_TIMER_ISR() void TC4_Handler()
|
#define HAL_TEMP_TIMER_ISR() void TC4_Handler()
|
||||||
#define HAL_TONE_TIMER_ISR() void TC6_Handler()
|
#define HAL_TONE_TIMER_ISR() void TC6_Handler()
|
||||||
|
|
||||||
|
@ -43,6 +43,12 @@
|
|||||||
|
|
||||||
#define BOARD_INFO_NAME "Archim 1.0"
|
#define BOARD_INFO_NAME "Archim 1.0"
|
||||||
|
|
||||||
|
//
|
||||||
|
// Timers
|
||||||
|
//
|
||||||
|
#define STEP_TIMER_NUM 3
|
||||||
|
#define HAL_STEP_TIMER_ISR() void TC3_Handler()
|
||||||
|
|
||||||
//
|
//
|
||||||
// Items marked * have been altered from Archim v1.0
|
// Items marked * have been altered from Archim v1.0
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user