Stima V4 Slave RAIN
4.2
|
Interface STM32 hardware_hal STIMAV4 Header config. More...
Go to the source code of this file.
Macros | |
#define | UID_BASE_ADDRESS (0x1FFF7590UL) |
#define | CAN_NVIC_INT_PREMPT_PRIORITY 8 |
#define | PIN_CAN_RX1 PB12 |
#define | PIN_CAN_TX1 PB13 |
#define | PIN_CAN_EN PC12 |
#define | PIN_CAN_STB PB15 |
#define | PIN_IN_ICTRL PA4 |
#define | PIN_OUT_DEN PC4 |
#define | PIN_OUT_DSEL0 PC5 |
#define | PIN_OUT_DSEL1 PC6 |
#define | PIN_OUT0 PC7 |
#define | PIN_OUT1 PC8 |
#define | PIN_OUT2 PC9 |
#define | PIN_OUT3 PC10 |
#define | PIN_IN0 PB2 |
#define | PIN_IN1 PA8 |
#define | PIN_IN2 PB8 |
#define | PIN_I2C2_EN PC11 |
#define | PIN_I2C2_SDA PB14 |
#define | PIN_I2C2_SCL PB10 |
#define | PIN_I2C1_SDA PB7 |
#define | PIN_I2C1_SCL PB6 |
#define | PIN_EN_SPLY PD2 |
#define | PIN_EN_5VS PB5 |
#define | PIN_EN_5VA PB9 |
#define | PIN_FAULT_SPLY PB4 |
#define | PIN_SPI_SCK PA5 |
#define | PIN_SPI_MOSI PA12 |
#define | PIN_SPI_MISO PA11 |
#define | PIN_SYS_JTMS PA13 |
#define | PIN_USART1_TX PA10 |
#define | PIN_USART1_RX PA9 |
#define | PIN_USART2_TX PA2 |
#define | PIN_USART2_RX PA15 |
#define | PIN_USART2_CTS PA0 |
#define | PIN_USART2_RTS PA1 |
#define | PIN_ANALOG_01 PC0 |
#define | PIN_ANALOG_02 PC1 |
#define | PIN_ANALOG_03 PC2 |
#define | PIN_ANALOG_04 PC3 |
#define | PIN_ANALOG_09 PA4 |
#define | DEN_Pin GPIO_PIN_4 |
#define | DEN_GPIO_Port GPIOC |
#define | DSEL0_Pin GPIO_PIN_5 |
#define | DSEL0_GPIO_Port GPIOC |
#define | IN0_Pin GPIO_PIN_2 |
#define | IN0_GPIO_Port GPIOB |
#define | STB_CAN_Pin GPIO_PIN_15 |
#define | STB_CAN_GPIO_Port GPIOB |
#define | DSEL1_Pin GPIO_PIN_6 |
#define | DSEL1_GPIO_Port GPIOC |
#define | PW0_Pin GPIO_PIN_7 |
#define | PW0_GPIO_Port GPIOC |
#define | PW1_Pin GPIO_PIN_8 |
#define | PW1_GPIO_Port GPIOC |
#define | PW2_Pin GPIO_PIN_9 |
#define | PW2_GPIO_Port GPIOC |
#define | IN1_Pin GPIO_PIN_8 |
#define | IN1_GPIO_Port GPIOA |
#define | PW3_Pin GPIO_PIN_10 |
#define | PW3_GPIO_Port GPIOC |
#define | I2C2_EN_Pin GPIO_PIN_11 |
#define | I2C2_EN_GPIO_Port GPIOC |
#define | EN_CAN_Pin GPIO_PIN_12 |
#define | EN_CAN_GPIO_Port GPIOC |
#define | EN_SPLY_Pin GPIO_PIN_2 |
#define | EN_SPLY_GPIO_Port GPIOD |
#define | FAULT_Pin GPIO_PIN_4 |
#define | FAULT_GPIO_Port GPIOB |
#define | EN_5VS_Pin GPIO_PIN_5 |
#define | EN_5VS_GPIO_Port GPIOB |
#define | IN2_Pin GPIO_PIN_8 |
#define | IN2_GPIO_Port GPIOB |
#define | EN_5VA_Pin GPIO_PIN_9 |
#define | EN_5VA_GPIO_Port GPIOB |
Functions | |
void | SystemClock_Config (void) |
System Clock Configuration. More... | |
void | SetupSystemPeripheral (void) |
Startup PeripheralConfig Local Board. More... | |
void | HAL_MspInit (void) |
Initializes the Global MSP. More... | |
void | MX_GPIO_Init (void) |
GPIO Initialization Function. More... | |
void | STM32L4GetCPUID (uint8_t *ptrCpuId) |
Get Unique ID HW of CPU (SerialNumber Unique ID) More... | |
uint64_t | StimaV4GetSerialNumber (void) |
Get StimaV4 Serial Number from UID Cpu and Module TYPE. More... | |
void | MX_CAN1_Init (void) |
CAN1 Initialization Function. More... | |
void | HAL_CAN_MspInit (CAN_HandleTypeDef *hcan) |
CAN MSP Initialization. This function configures the hardware resources used in this example. More... | |
void | HAL_CAN_MspDeInit (CAN_HandleTypeDef *hcan) |
CAN MSP De-Initialization. This function freeze the hardware resources used in this example. More... | |
Variables | |
CAN_HandleTypeDef | hcan1 |
Interface STM32 hardware_hal STIMAV4 Header config.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/licenses/.
Definition in file module_slave_hal.hpp.
#define CAN_NVIC_INT_PREMPT_PRIORITY 8 |
Definition at line 56 of file module_slave_hal.hpp.
#define DEN_GPIO_Port GPIOC |
Definition at line 143 of file module_slave_hal.hpp.
#define DEN_Pin GPIO_PIN_4 |
Definition at line 142 of file module_slave_hal.hpp.
#define DSEL0_GPIO_Port GPIOC |
Definition at line 145 of file module_slave_hal.hpp.
#define DSEL0_Pin GPIO_PIN_5 |
Definition at line 144 of file module_slave_hal.hpp.
#define DSEL1_GPIO_Port GPIOC |
Definition at line 151 of file module_slave_hal.hpp.
#define DSEL1_Pin GPIO_PIN_6 |
Definition at line 150 of file module_slave_hal.hpp.
#define EN_5VA_GPIO_Port GPIOB |
Definition at line 175 of file module_slave_hal.hpp.
#define EN_5VA_Pin GPIO_PIN_9 |
Definition at line 174 of file module_slave_hal.hpp.
#define EN_5VS_GPIO_Port GPIOB |
Definition at line 171 of file module_slave_hal.hpp.
#define EN_5VS_Pin GPIO_PIN_5 |
Definition at line 170 of file module_slave_hal.hpp.
#define EN_CAN_GPIO_Port GPIOC |
Definition at line 165 of file module_slave_hal.hpp.
#define EN_CAN_Pin GPIO_PIN_12 |
Definition at line 164 of file module_slave_hal.hpp.
#define EN_SPLY_GPIO_Port GPIOD |
Definition at line 167 of file module_slave_hal.hpp.
#define EN_SPLY_Pin GPIO_PIN_2 |
Definition at line 166 of file module_slave_hal.hpp.
#define FAULT_GPIO_Port GPIOB |
Definition at line 169 of file module_slave_hal.hpp.
#define FAULT_Pin GPIO_PIN_4 |
Definition at line 168 of file module_slave_hal.hpp.
#define I2C2_EN_GPIO_Port GPIOC |
Definition at line 163 of file module_slave_hal.hpp.
#define I2C2_EN_Pin GPIO_PIN_11 |
Definition at line 162 of file module_slave_hal.hpp.
#define IN0_GPIO_Port GPIOB |
Definition at line 147 of file module_slave_hal.hpp.
#define IN0_Pin GPIO_PIN_2 |
Definition at line 146 of file module_slave_hal.hpp.
#define IN1_GPIO_Port GPIOA |
Definition at line 159 of file module_slave_hal.hpp.
#define IN1_Pin GPIO_PIN_8 |
Definition at line 158 of file module_slave_hal.hpp.
#define IN2_GPIO_Port GPIOB |
Definition at line 173 of file module_slave_hal.hpp.
#define IN2_Pin GPIO_PIN_8 |
Definition at line 172 of file module_slave_hal.hpp.
#define PIN_ANALOG_01 PC0 |
Definition at line 123 of file module_slave_hal.hpp.
#define PIN_ANALOG_02 PC1 |
Definition at line 124 of file module_slave_hal.hpp.
#define PIN_ANALOG_03 PC2 |
Definition at line 125 of file module_slave_hal.hpp.
#define PIN_ANALOG_04 PC3 |
Definition at line 126 of file module_slave_hal.hpp.
#define PIN_ANALOG_09 PA4 |
Definition at line 127 of file module_slave_hal.hpp.
#define PIN_CAN_EN PC12 |
Definition at line 68 of file module_slave_hal.hpp.
#define PIN_CAN_RX1 PB12 |
Definition at line 66 of file module_slave_hal.hpp.
#define PIN_CAN_STB PB15 |
Definition at line 69 of file module_slave_hal.hpp.
#define PIN_CAN_TX1 PB13 |
Definition at line 67 of file module_slave_hal.hpp.
#define PIN_EN_5VA PB9 |
Definition at line 102 of file module_slave_hal.hpp.
#define PIN_EN_5VS PB5 |
Definition at line 101 of file module_slave_hal.hpp.
#define PIN_EN_SPLY PD2 |
Definition at line 100 of file module_slave_hal.hpp.
#define PIN_FAULT_SPLY PB4 |
Definition at line 103 of file module_slave_hal.hpp.
#define PIN_I2C1_SCL PB6 |
Definition at line 97 of file module_slave_hal.hpp.
#define PIN_I2C1_SDA PB7 |
Definition at line 96 of file module_slave_hal.hpp.
#define PIN_I2C2_EN PC11 |
Definition at line 92 of file module_slave_hal.hpp.
#define PIN_I2C2_SCL PB10 |
Definition at line 94 of file module_slave_hal.hpp.
#define PIN_I2C2_SDA PB14 |
Definition at line 93 of file module_slave_hal.hpp.
#define PIN_IN0 PB2 |
Definition at line 82 of file module_slave_hal.hpp.
#define PIN_IN1 PA8 |
Definition at line 83 of file module_slave_hal.hpp.
#define PIN_IN2 PB8 |
Definition at line 84 of file module_slave_hal.hpp.
#define PIN_IN_ICTRL PA4 |
Definition at line 72 of file module_slave_hal.hpp.
#define PIN_OUT0 PC7 |
Definition at line 76 of file module_slave_hal.hpp.
#define PIN_OUT1 PC8 |
Definition at line 77 of file module_slave_hal.hpp.
#define PIN_OUT2 PC9 |
Definition at line 78 of file module_slave_hal.hpp.
#define PIN_OUT3 PC10 |
Definition at line 79 of file module_slave_hal.hpp.
#define PIN_OUT_DEN PC4 |
Definition at line 73 of file module_slave_hal.hpp.
#define PIN_OUT_DSEL0 PC5 |
Definition at line 74 of file module_slave_hal.hpp.
#define PIN_OUT_DSEL1 PC6 |
Definition at line 75 of file module_slave_hal.hpp.
#define PIN_SPI_MISO PA11 |
Definition at line 108 of file module_slave_hal.hpp.
#define PIN_SPI_MOSI PA12 |
Definition at line 107 of file module_slave_hal.hpp.
#define PIN_SPI_SCK PA5 |
Definition at line 106 of file module_slave_hal.hpp.
#define PIN_SYS_JTMS PA13 |
Definition at line 110 of file module_slave_hal.hpp.
#define PIN_USART1_RX PA9 |
Definition at line 114 of file module_slave_hal.hpp.
#define PIN_USART1_TX PA10 |
Definition at line 113 of file module_slave_hal.hpp.
#define PIN_USART2_CTS PA0 |
Definition at line 119 of file module_slave_hal.hpp.
#define PIN_USART2_RTS PA1 |
Definition at line 120 of file module_slave_hal.hpp.
#define PIN_USART2_RX PA15 |
Definition at line 118 of file module_slave_hal.hpp.
#define PIN_USART2_TX PA2 |
Definition at line 117 of file module_slave_hal.hpp.
#define PW0_GPIO_Port GPIOC |
Definition at line 153 of file module_slave_hal.hpp.
#define PW0_Pin GPIO_PIN_7 |
Definition at line 152 of file module_slave_hal.hpp.
#define PW1_GPIO_Port GPIOC |
Definition at line 155 of file module_slave_hal.hpp.
#define PW1_Pin GPIO_PIN_8 |
Definition at line 154 of file module_slave_hal.hpp.
#define PW2_GPIO_Port GPIOC |
Definition at line 157 of file module_slave_hal.hpp.
#define PW2_Pin GPIO_PIN_9 |
Definition at line 156 of file module_slave_hal.hpp.
#define PW3_GPIO_Port GPIOC |
Definition at line 161 of file module_slave_hal.hpp.
#define PW3_Pin GPIO_PIN_10 |
Definition at line 160 of file module_slave_hal.hpp.
#define STB_CAN_GPIO_Port GPIOB |
Definition at line 149 of file module_slave_hal.hpp.
#define STB_CAN_Pin GPIO_PIN_15 |
Definition at line 148 of file module_slave_hal.hpp.
#define UID_BASE_ADDRESS (0x1FFF7590UL) |
Definition at line 39 of file module_slave_hal.hpp.
void HAL_CAN_MspDeInit | ( | CAN_HandleTypeDef * | hcan | ) |
CAN MSP De-Initialization. This function freeze the hardware resources used in this example.
hcan | CAN handle pointer |
CAN1 GPIO Configuration PB12 ---—> CAN1_RX PB13 ---—> CAN1_TX
Definition at line 554 of file module_slave_hal.cpp.
void HAL_CAN_MspInit | ( | CAN_HandleTypeDef * | hcan | ) |
CAN MSP Initialization. This function configures the hardware resources used in this example.
hcan | CAN handle pointer |
Definition at line 516 of file module_slave_hal.cpp.
void HAL_MspInit | ( | void | ) |
Initializes the Global MSP.
PVD Configuration
Enable the PVD Output
Definition at line 481 of file module_slave_hal.cpp.
void MX_CAN1_Init | ( | void | ) |
CAN1 Initialization Function.
Definition at line 333 of file module_slave_hal.cpp.
void MX_GPIO_Init | ( | void | ) |
GPIO Initialization Function.
Definition at line 404 of file module_slave_hal.cpp.
void SetupSystemPeripheral | ( | void | ) |
Startup PeripheralConfig Local Board.
Enable cycle counter (for debug)
Definition at line 256 of file module_slave_hal.cpp.
uint64_t StimaV4GetSerialNumber | ( | void | ) |
Get StimaV4 Serial Number from UID Cpu and Module TYPE.
Definition at line 312 of file module_slave_hal.cpp.
void STM32L4GetCPUID | ( | uint8_t * | ptrCpuId | ) |
Get Unique ID HW of CPU (SerialNumber Unique ID)
ptrCpuId | pointer to external 12 byte buffer required (CPU_ID) |
Definition at line 304 of file module_slave_hal.cpp.
void SystemClock_Config | ( | void | ) |
System Clock Configuration.
Configure the main internal regulator output voltage
Configure LSE Drive Capability
Initializes the RCC Oscillators according to the specified parameters in the RCC_OscInitTypeDef structure.
Initializes the CPU, AHB and APB buses clocks
Enable MSI Auto calibration
Enable the SYSCFG APB clock
Configures CRS
Definition at line 183 of file module_slave_hal.cpp.
|
extern |
Definition at line 40 of file module_slave_hal.cpp.