mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/CAN-Demo.git
synced 2025-06-13 20:35:58 +00:00
82 lines
1.8 KiB
C++
82 lines
1.8 KiB
C++
/*
|
|
* Configuration file for STA-Core.
|
|
*
|
|
* Created on: Aug 30, 2023
|
|
* Author: Dario
|
|
*/
|
|
|
|
#ifndef INC_STA_CONFIG_HPP_
|
|
#define INC_STA_CONFIG_HPP_
|
|
|
|
#define STA_STM32_ASEAG
|
|
#include <sta/devices/stm32/mcu/STM32F407xx.hpp>
|
|
|
|
// Doesn't really do too much right now. Has to be added for successful compilation.
|
|
#define STA_PRINTF_USE_STDLIB
|
|
|
|
#define STA_MCU_LITTLE_ENDIAN
|
|
#define STA_PLATFORM_STM32
|
|
|
|
// Enable debug serial output and assertions.
|
|
#define STA_ASSERT_FORCE
|
|
#define STA_DEBUGGING_ENABLED
|
|
|
|
// Activate the timer for microsecond delays.
|
|
// #define STA_STM32_DELAY_ENABLE
|
|
// #define STA_STM32_DELAY_US_TIM htim1
|
|
|
|
// Settings for the rtos-utils
|
|
#define STA_RTOS_SYSTEM_EVENTS_ENABLE
|
|
// #define STA_RTOS_SYSTEM_WATCHDOG_ENABLE
|
|
// #define STA_RTOS_WATCHDOG_ENABLE
|
|
#define STA_CAN_BUS_ENABLE
|
|
|
|
// Uses the default configuration for TACOS.
|
|
#include<sta/tacos/configs/default.hpp>
|
|
#define STA_TACOS_NUM_STATES 3
|
|
|
|
// Configure CAN IDs for tasks
|
|
#define SYSTEM_CAN_MSG_HANDLER 0x123
|
|
#define SYSTEM_CAN_THERMO 0x124
|
|
#define SYSTEM_CAN_RELAY 0x125
|
|
#define SYSTEM_CAN_V_IN 0x126
|
|
|
|
#define SYSTEM_CAN_ERROR 0x013
|
|
|
|
// Pin Definitions:
|
|
// Thermocouples:
|
|
#define STA_THERMO_SPI &hspi2
|
|
|
|
#define THERMO1_CS_GROUP GPIOE
|
|
#define THERMO1_CS_PIN GPIO_PIN_12
|
|
|
|
#define THERMO2_CS_GROUP GPIOB
|
|
#define THERMO2_CS_PIN GPIO_PIN_10
|
|
|
|
#define THERMO3_CS_GROUP GPIOE
|
|
#define THERMO3_CS_PIN GPIO_PIN_15
|
|
|
|
#define THERMO4_CS_GROUP GPIOE
|
|
#define THERMO4_CS_PIN GPIO_PIN_14
|
|
|
|
#define THERMO5_CS_GROUP GPIOE
|
|
#define THERMO5_CS_PIN GPIO_PIN_13
|
|
|
|
// Relays:
|
|
#define RELAY1_GROUP GPIOA
|
|
#define RELAY1_PIN GPIO_PIN_2
|
|
|
|
#define RELAY2_GROUP GPIOA
|
|
#define RELAY2_PIN GPIO_PIN_1
|
|
|
|
#define RELAY3_GROUP GPIOA
|
|
#define RELAY3_PIN GPIO_PIN_0
|
|
|
|
#define RELAY4_GROUP GPIOA
|
|
#define RELAY4_PIN GPIO_PIN_3
|
|
|
|
#define RELAY5_GROUP GPIOA
|
|
#define RELAY5_PIN GPIO_PIN_6
|
|
|
|
#endif /* INC_STA_CONFIG_HPP_ */
|