"Torque Vector" node source code
More...
#include "main.h"
#include <stdint.h>
#include "can_library/generated/TORQUE_VECTOR.h"
#include "common/freertos/freertos.h"
#include "common/heartbeat/heartbeat.h"
#include "common/phal/can.h"
#include "common/phal/gpio.h"
#include "common/phal/rcc.h"
#include "common/phal/usart.h"
#include "common/ublox/nav_pvt.h"
#include "common/ublox/nav_relposned.h"
#include "common/utils/countof.h"
#include "common/watchdog/watchdog.h"
#include "control_loop.h"
#include "sensors.h"
#include "telemetry.h"
|
|
void | HardFault_Handler (void) |
| |
|
| DEFINE_CAN_TASKS () |
| |
|
| DEFINE_TASK (control_loop, CONTROL_LOOP_PERIOD_MS, osPriorityNormal, STACK_4096) |
| |
|
| DEFINE_TASK (gps_periodic, GPS_THREAD_PERIOD_MS, osPriorityLow, STACK_1024) |
| |
|
| DEFINE_TASK (report_telemetry_100hz, TELEMETRY_100HZ_PERIOD_MS, osPriorityLow, STACK_512) |
| |
|
| DEFINE_TASK (report_telemetry_1hz, TELEMETRY_1HZ_PERIOD_MS, osPriorityLow, STACK_512) |
| |
|
| DEFINE_WATCHDOG_TASK () |
| |
|
| DEFINE_HEARTBEAT_TASK (nullptr) |
| |
|
int | main (void) |
| |
"Torque Vector" node source code
- Author
- Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)
◆ clock_config
Initial value:= {
.clock_source = CLOCK_SOURCE_HSE,
.use_pll = false,
.system_clock_target_hz = TargetCoreClockrateHz,
.ahb_clock_target_hz = (TargetCoreClockrateHz / 1),
.apb1_clock_target_hz = (TargetCoreClockrateHz / (1)),
.apb2_clock_target_hz = (TargetCoreClockrateHz / (1)),
}
◆ gpio_config
Initial value:= {
GPIO_INIT_OUTPUT(CONNECTION_LED_PORT, CONNECTION_LED_PIN, GPIO_OUTPUT_LOW_SPEED),
GPIO_INIT_FDCAN2TX_PB13,
GPIO_INIT_FDCAN2RX_PB12,
GPIO_INIT_USART3RX_PB11,
GPIO_INIT_USART3TX_PB10,
GPIO_INIT_USART1TX_PA9,
GPIO_INIT_USART1RX_PA10,
}
#define GPIO_INIT_OUTPUT(gpio_bank, pin_num, ospeed_sel)
Create GPIO Init struct to intilize a GPIO pin for output.
Definition gpio.h:131
◆ usart3
Initial value:= {
.baud_rate = GPS_BAUD_RATE,
.periph = USART3,
.wake_addr = false,
.usart_active_num = USART3_ACTIVE_IDX,
.tx_dma_cfg = &rover_tx_dma_config,
.rx_dma_cfg = &rover_rx_dma_config,
}
@ WORD_8
8-Bit word length
Definition usart.h:65
@ HW_DISABLE
Hardware flow control disable.
Definition usart.h:77
@ OB_DISABLE
Disable one bit sampling.
Definition usart.h:89
@ PT_NONE
Disable Parity bits.
Definition usart.h:61
@ SB_ONE
One Stop bit.
Definition usart.h:70
@ OV_16
Oversample by 16.
Definition usart.h:84