32 #include <STM32FreeRTOS.h>
35 #ifndef _MODULE_SLAVE_HAL_H
36 #define _MODULE_SLAVE_HAL_H
39 #define UID_BASE_ADDRESS (0x1FFF7590UL)
41 #if (ENABLE_I2C1 || ENABLE_I2C2)
50 extern QSPI_HandleTypeDef hqspi;
51 #define QSPI_NVIC_INT_PREMPT_PRIORITY 7
55 extern CAN_HandleTypeDef
hcan1;
56 #define CAN_NVIC_INT_PREMPT_PRIORITY 8
66 #define PIN_CAN_RX1 PB12
67 #define PIN_CAN_TX1 PB13
68 #define PIN_CAN_EN PC12
69 #define PIN_CAN_STB PB15
72 #define PIN_IN_ICTRL PA4
73 #define PIN_OUT_DEN PC4
74 #define PIN_OUT_DSEL0 PC5
75 #define PIN_OUT_DSEL1 PC6
87 #ifdef STIMAV4_SLAVE_HW_VER_01_01
92 #define PIN_I2C2_EN PC11
93 #define PIN_I2C2_SDA PB14
94 #define PIN_I2C2_SCL PB10
96 #define PIN_I2C1_SDA PB7
97 #define PIN_I2C1_SCL PB6
100 #define PIN_EN_SPLY PD2
101 #define PIN_EN_5VS PB5
102 #define PIN_EN_5VA PB9
103 #define PIN_FAULT_SPLY PB4
106 #define PIN_SPI_SCK PA5
107 #define PIN_SPI_MOSI PA12
108 #define PIN_SPI_MISO PA11
110 #define PIN_SYS_JTMS PA13
113 #define PIN_USART1_TX PA10
114 #define PIN_USART1_RX PA9
117 #define PIN_USART2_TX PA2
118 #define PIN_USART2_RX PA15
119 #define PIN_USART2_CTS PA0
120 #define PIN_USART2_RTS PA1
123 #define PIN_ANALOG_01 PC0
124 #define PIN_ANALOG_02 PC1
125 #define PIN_ANALOG_03 PC2
126 #define PIN_ANALOG_04 PC3
127 #define PIN_ANALOG_09 PA4
129 #if (ENABLE_DIAG_PIN)
132 #define HFLT_PIN PIN_OUT1
133 #define LED1_PIN PIN_OUT2
134 #define LED2_PIN PIN_OUT3
135 #define USER_INP PIN_IN2
142 #define DEN_Pin GPIO_PIN_4
143 #define DEN_GPIO_Port GPIOC
144 #define DSEL0_Pin GPIO_PIN_5
145 #define DSEL0_GPIO_Port GPIOC
146 #define IN0_Pin GPIO_PIN_2
147 #define IN0_GPIO_Port GPIOB
148 #define STB_CAN_Pin GPIO_PIN_15
149 #define STB_CAN_GPIO_Port GPIOB
150 #define DSEL1_Pin GPIO_PIN_6
151 #define DSEL1_GPIO_Port GPIOC
152 #define PW0_Pin GPIO_PIN_7
153 #define PW0_GPIO_Port GPIOC
154 #define PW1_Pin GPIO_PIN_8
155 #define PW1_GPIO_Port GPIOC
156 #define PW2_Pin GPIO_PIN_9
157 #define PW2_GPIO_Port GPIOC
158 #define IN1_Pin GPIO_PIN_8
159 #define IN1_GPIO_Port GPIOA
160 #define PW3_Pin GPIO_PIN_10
161 #define PW3_GPIO_Port GPIOC
162 #define I2C2_EN_Pin GPIO_PIN_11
163 #define I2C2_EN_GPIO_Port GPIOC
164 #define EN_CAN_Pin GPIO_PIN_12
165 #define EN_CAN_GPIO_Port GPIOC
166 #define EN_SPLY_Pin GPIO_PIN_2
167 #define EN_SPLY_GPIO_Port GPIOD
168 #define FAULT_Pin GPIO_PIN_4
169 #define FAULT_GPIO_Port GPIOB
170 #define EN_5VS_Pin GPIO_PIN_5
171 #define EN_5VS_GPIO_Port GPIOB
172 #define IN2_Pin GPIO_PIN_8
173 #define IN2_GPIO_Port GPIOB
174 #define EN_5VA_Pin GPIO_PIN_9
175 #define EN_5VA_GPIO_Port GPIOB
176 #ifdef STIMAV4_SLAVE_HW_VER_01_01
177 #define IN_BTN_Pin GPIO_PIN_0
178 #define IN_BTN_GPIO_Port GPIOH
205 void MX_QUADSPI_Init(
void);
206 void HAL_QSPI_MspInit(QSPI_HandleTypeDef* hqspi);
207 void HAL_QSPI_MspDeInit(QSPI_HandleTypeDef* hqspi);
void MX_CAN1_Init(void)
CAN1 Initialization Function.
void SetupSystemPeripheral(void)
Startup PeripheralConfig Local Board.
void STM32L4GetCPUID(uint8_t *ptrCpuId)
Get Unique ID HW of CPU (SerialNumber Unique ID)
uint64_t StimaV4GetSerialNumber(void)
Get StimaV4 Serial Number from UID Cpu and Module TYPE.
void SystemClock_Config(void)
System Clock Configuration.
void HAL_CAN_MspDeInit(CAN_HandleTypeDef *hcan)
CAN MSP De-Initialization. This function freeze the hardware resources used in this example.
void HAL_CAN_MspInit(CAN_HandleTypeDef *hcan)
CAN MSP Initialization. This function configures the hardware resources used in this example.
void MX_GPIO_Init(void)
GPIO Initialization Function.
void HAL_MspInit(void)
Initializes the Global MSP.