|
PER Firmware
|
"PDU" node source code More...
#include "main.h"#include "can_library/faults_common.h"#include "can_library/generated/PDU.h"#include "common/rtos/rtos.h"#include "common/heartbeat/heartbeat.h"#include "common/phal_F4/adc/adc.h"#include "common/phal_F4/can/can.h"#include "common/phal_F4/dma/dma.h"#include "common/phal_F4/gpio/gpio.h"#include "common/phal_F4/rcc/rcc.h"#include "common/utils/countof.h"#include "common/watchdog/watchdog.h"#include "cooling_fsm.h"#include "faults.h"#include "led.h"#include "state.h"#include "switches.h"#include "telemetry.h"Macros | |
| #define | TargetCoreClockrateHz 16'000'000 |
Functions | |
| void | HardFault_Handler () |
| static void | heartbeat_led_sweep (void) |
| static void | tsal_delayed_start () |
| DEFINE_CAN_TASKS () | |
| RTOS_DEFINE_TASK (switches_periodic, 15, TASK_PRIORITY_NORMAL, STACK_512) | |
| RTOS_DEFINE_TASK (tsal_delayed_start, 1000, TASK_PRIORITY_LOW, STACK_512) | |
| RTOS_DEFINE_TASK (cooling_fsm_periodic, COOLING_FSM_PERIOD_MS, TASK_PRIORITY_NORMAL, STACK_1024) | |
| RTOS_DEFINE_TASK (LED_periodic, 500, TASK_PRIORITY_LOW, STACK_512) | |
| RTOS_DEFINE_TASK (faults_periodic, 100, TASK_PRIORITY_LOW, STACK_512) | |
| RTOS_DEFINE_TASK (fault_library_periodic, 100, TASK_PRIORITY_LOW, STACK_1024) | |
| RTOS_DEFINE_TASK (telemetry_10hz, 100, TASK_PRIORITY_LOW, STACK_1024) | |
| DEFINE_WATCHDOG_TASK () | |
| DEFINE_HEARTBEAT_TASK (heartbeat_led_sweep) | |
| int | main () |
Variables | |
| GPIOInitConfig_t | gpio_config [] |
| ADCInitConfig_t | adc_config |
| dma_init_t | spi_rx_dma_config = SPI1_RXDMA_CONT_CONFIG(NULL, 2) |
| dma_init_t | spi_tx_dma_config = SPI1_TXDMA_CONT_CONFIG(NULL, 1) |
| SPI_InitConfig_t | spi_config |
| volatile ADCReadings_t | adc_readings |
| ADCChannelConfig_t | adc_channel_config [] |
| dma_init_t | adc_dma_config |
| ClockRateConfig_t | clock_config |
| uint32_t | APB1ClockRateHz |
| uint32_t | APB2ClockRateHz |
| uint32_t | AHBClockRateHz |
| uint32_t | PLLClockRateHz |
"PDU" node source code
| #define TargetCoreClockrateHz 16'000'000 |
| DEFINE_CAN_TASKS | ( | ) |
| DEFINE_HEARTBEAT_TASK | ( | heartbeat_led_sweep | ) |
| DEFINE_WATCHDOG_TASK | ( | ) |
| void HardFault_Handler | ( | void | ) |
|
static |
| int main | ( | void | ) |
| RTOS_DEFINE_TASK | ( | cooling_fsm_periodic | , |
| COOLING_FSM_PERIOD_MS | , | ||
| TASK_PRIORITY_NORMAL | , | ||
| STACK_1024 | ) |
| RTOS_DEFINE_TASK | ( | fault_library_periodic | , |
| 100 | , | ||
| TASK_PRIORITY_LOW | , | ||
| STACK_1024 | ) |
| RTOS_DEFINE_TASK | ( | faults_periodic | , |
| 100 | , | ||
| TASK_PRIORITY_LOW | , | ||
| STACK_512 | ) |
| RTOS_DEFINE_TASK | ( | LED_periodic | , |
| 500 | , | ||
| TASK_PRIORITY_LOW | , | ||
| STACK_512 | ) |
| RTOS_DEFINE_TASK | ( | switches_periodic | , |
| 15 | , | ||
| TASK_PRIORITY_NORMAL | , | ||
| STACK_512 | ) |
| RTOS_DEFINE_TASK | ( | telemetry_10hz | , |
| 100 | , | ||
| TASK_PRIORITY_LOW | , | ||
| STACK_1024 | ) |
| RTOS_DEFINE_TASK | ( | tsal_delayed_start | , |
| 1000 | , | ||
| TASK_PRIORITY_LOW | , | ||
| STACK_512 | ) |
|
static |
| ADCChannelConfig_t adc_channel_config[] |
| ADCInitConfig_t adc_config |
| dma_init_t adc_dma_config |
| volatile ADCReadings_t adc_readings |
|
extern |
|
extern |
|
extern |
| ClockRateConfig_t clock_config |
| GPIOInitConfig_t gpio_config[] |
|
extern |
| SPI_InitConfig_t spi_config |
| dma_init_t spi_rx_dma_config = SPI1_RXDMA_CONT_CONFIG(NULL, 2) |
| dma_init_t spi_tx_dma_config = SPI1_TXDMA_CONT_CONFIG(NULL, 1) |