HRI board firmware v2.1 Microcontroller firmware of the board used during the HRI labs.

Macros | Functions | Variables
callback_timers.c File Reference
`#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

## Macro Definition Documentation

## ◆ TE_CONTROL_LOOP_DEFAULT_VAL

#define TE_CONTROL_LOOP_DEFAULT_VAL 350

## ◆ TE_CURRENT_LOOP_DEFAULT_VAL

#define TE_CURRENT_LOOP_DEFAULT_VAL 50

## ◆ TE_DATA_LOOP_DEFAULT_VAL

#define TE_DATA_LOOP_DEFAULT_VAL 1000

## ◆ TE_LOOP_MAX_VALUE

#define TE_LOOP_MAX_VALUE 65534

## ◆ TE_LOOP_MIN_VALUE

#define TE_LOOP_MIN_VALUE 50

## Function Documentation

## ◆ tim10InitFunc()

void tim10InitFunc | ( | void |  | ) |

Initialize TIM10 used for timing the current loop (resolution 1us).

## ◆ TIM1_UP_TIM10_IRQHandler()

void TIM1_UP_TIM10_IRQHandler | ( | void |  | ) |

Interrupt from current control loop timer (TIM10)

## ◆ tim67InitFunc()

void tim67InitFunc | ( | void |  | ) |

Initialize TIM6, for timing the main control loop (resolution 1us) Initialize TIM7, for timing the data transmission loop (resolution 1us)

## ◆ TIM6_DAC_IRQHandler()

void TIM6_DAC_IRQHandler | ( | void |  | ) |

Interrupt from main control loop timer (TIM6)

## ◆ TIM7_IRQHandler()

void TIM7_IRQHandler | ( | void |  | ) |

Interrupt from data transmission loop timer (TIM7) (data loop)

## Variable Documentation

## ◆ cbt_tim10Task

cbt_PeriodicTaskFunc cbt_tim10Task

## ◆ cbt_tim6Task

cbt_PeriodicTaskFunc cbt_tim6Task

## ◆ cbt_tim7Task

cbt_PeriodicTaskFunc cbt_tim7Task

## ◆ cbt_ucLoad

volatile float32_t cbt_ucLoad