precision-converters-firmware
Loading...
Searching...
No Matches
app_config_stm32.h
Go to the documentation of this file.
1/***************************************************************************/
13#ifndef APP_CONFIG_STM32_H_
14#define APP_CONFIG_STM32_H_
15
16/******************************************************************************/
17/***************************** Include Files **********************************/
18/******************************************************************************/
19
20#include "stm32_uart.h"
21#include "stm32_spi.h"
22#include "stm32_i2c.h"
23#include "stm32_gpio.h"
24#include "stm32_irq.h"
25#include "stm32_gpio_irq.h"
26#include "main.h"
27#include "stm32_uart_stdio.h"
28#include "stm32_usb_uart.h"
29
30/******************************************************************************/
31/********************** Macros and Constants Definition ***********************/
32/******************************************************************************/
33
34/* Note: The SDP-K1 board with the STM32F469NI MCU has been used
35* for developing the firmware. The below parameters will change depending
36* on the controller used. */
37#define HW_CARRIER_NAME SDP-K1
38
39/* STM32 SPI Specific parameters */
40#define SPI_DEVICE_ID 1 // SPI1
41#define SPI_CS_PORT 0 // GPIO Port A
42#define SPI_CSB 15 // PA_15
43
44/* STM32 UART specific parameters */
45#define APP_UART_HANDLE &huart5
46#define APP_UART_USB_HANDLE hUsbDeviceHS
47
48/* UART Device ID */
49#define UART_IRQ_ID UART5_IRQn
50
51/* I2C Device ID */
52#define I2C_DEVICE_ID 1 // I2C1
53
54/* RDY Specific Port D and Pin 12 */
55#define CONV_MON 7 // PG_7
56#define CONV_MON_PORT 6 // PORTG
57
58#define TRIGGER_INT_ID 7
59#define TRIGGER_GPIO_PORT 6
60#define TRIGGER_GPIO_PIN 7
61
62/* Priority for Ready Interrupt */
63#define CONV_GPIO_PRIORITY 1
64
65/******************************************************************************/
66/********************** Variables and User Defined Data Types *****************/
67/******************************************************************************/
68
69extern USBD_HandleTypeDef APP_UART_USB_HANDLE;
70extern UART_HandleTypeDef huart5;
71
72extern struct stm32_uart_init_param stm32_uart_extra_init_params;
73extern struct stm32_spi_init_param stm32_spi_extra_init_params;
74extern struct stm32_i2c_init_param stm32_i2c_extra_init_params;
75extern struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params;
76extern struct stm32_gpio_init_param stm32_trigger_gpio_extra_init_params;
78
79extern void stm32_system_init(void);
80
81#endif // APP_CONFIG_STM32_H_
UART_HandleTypeDef huart5
void stm32_system_init(void)
Initialize the STM32 system peripherals.
Definition app_config_stm32.c:176
struct stm32_usb_uart_init_param stm32_vcom_extra_init_params
Definition app_config_stm32.c:38
#define APP_UART_USB_HANDLE
Definition app_config_stm32.h:44
struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params
Definition app_config_stm32.c:43
struct stm32_i2c_init_param stm32_i2c_extra_init_params
Definition app_config_stm32.c:152
struct stm32_uart_init_param stm32_uart_extra_init_params
Definition app_config_stm32.c:102
struct stm32_spi_init_param stm32_spi_extra_init_params
Definition app_config_stm32.c:46
struct stm32_gpio_init_param stm32_trigger_gpio_extra_init_params
Definition app_config_stm32.c:58
VCOM driver for stm32 as a no_os_uart implementation.
Specific initialization parameters for stm32 UART over USB.
Definition stm32_usb_uart.h:27