|
HRI board firmware
v2.1
Microcontroller firmware of the board used during the HRI labs.
|
#include "callback_timers.h"#include "../lib/utils.h"#include "../torque_regulator.h"#include "../haptic_controller.h"Macros | |
| #define | TE_LOOP_MIN_VALUE 50 |
| #define | TE_LOOP_MAX_VALUE 65534 |
| #define | TE_CURRENT_LOOP_DEFAULT_VAL 50 |
| #define | TE_CONTROL_LOOP_DEFAULT_VAL 350 |
| #define | TE_DATA_LOOP_DEFAULT_VAL 1000 |
Functions | |
| void | tim10InitFunc (void) |
| Initialize TIM10 used for timing the current loop (resolution 1us). More... | |
| void | tim67InitFunc (void) |
| Initialize TIM6, for timing the main control loop (resolution 1us) Initialize TIM7, for timing the data transmission loop (resolution 1us) More... | |
| void | cbt_Init (void) |
| Initialize the timers to call an interrupt routine periodically. More... | |
| void | cbt_SetCurrentLoopTimer (cbt_PeriodicTaskFunc f, uint32_t period) |
| Set the function to call periodically by the timer 1. More... | |
| void | cbt_SetHapticControllerTimer (cbt_PeriodicTaskFunc f, uint32_t period) |
| Set the function to call periodically by the timer 6. More... | |
| void | cbt_SetCommLoopTimer (cbt_PeriodicTaskFunc f, uint32_t period) |
| Set the function to call periodically by the timer 7. More... | |
| void | TIM1_UP_TIM10_IRQHandler (void) |
| Interrupt from current control loop timer (TIM10) More... | |
| void | TIM6_DAC_IRQHandler (void) |
| Interrupt from main control loop timer (TIM6) More... | |
| void | TIM7_IRQHandler (void) |
| Interrupt from data transmission loop timer (TIM7) (data loop) More... | |
| void | cbt_SetHapticControllerPeriod (uint32_t period) |
| Set the period of the position loop. More... | |
| void | cbt_SetCommLoopPeriod (uint32_t period) |
| Set the period of the communication loop. More... | |
| uint32_t | cbt_GetCurrentLoopPeriod (void) |
| Get the period of the current loop. More... | |
| uint32_t | cbt_GetHapticControllerPeriod (void) |
| Get the period of the position loop. More... | |
| uint32_t | cbt_GetCommLoopPeriod (void) |
| Get the period of the communication loop. More... | |
Variables | |
| cbt_PeriodicTaskFunc | cbt_tim10Task |
| cbt_PeriodicTaskFunc | cbt_tim6Task |
| cbt_PeriodicTaskFunc | cbt_tim7Task |
| volatile float32_t | cbt_ucLoad |
| #define TE_CONTROL_LOOP_DEFAULT_VAL 350 |
| #define TE_CURRENT_LOOP_DEFAULT_VAL 50 |
| #define TE_DATA_LOOP_DEFAULT_VAL 1000 |
| #define TE_LOOP_MAX_VALUE 65534 |
| #define TE_LOOP_MIN_VALUE 50 |
| void tim10InitFunc | ( | void | ) |
Initialize TIM10 used for timing the current loop (resolution 1us).
| void TIM1_UP_TIM10_IRQHandler | ( | void | ) |
Interrupt from current control loop timer (TIM10)
| void tim67InitFunc | ( | void | ) |
Initialize TIM6, for timing the main control loop (resolution 1us) Initialize TIM7, for timing the data transmission loop (resolution 1us)
| void TIM6_DAC_IRQHandler | ( | void | ) |
Interrupt from main control loop timer (TIM6)
| void TIM7_IRQHandler | ( | void | ) |
Interrupt from data transmission loop timer (TIM7) (data loop)
| cbt_PeriodicTaskFunc cbt_tim10Task |
| cbt_PeriodicTaskFunc cbt_tim6Task |
| cbt_PeriodicTaskFunc cbt_tim7Task |
| volatile float32_t cbt_ucLoad |
1.8.13