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_gpio_irq.h"
25#include "main.h"
26#include "stm32_usb_uart.h"
27#include "app_config.h"
28#include "stm32_irq.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 TARGET_NAME SDP-K1
38
39//#define ARDUINO
40/* SPI Pins on SDP-K1-Arduino Interface */
41#ifdef ARDUINO
42#define SPI_DEVICE_ID 1 // SPI1
43#define SPI_CS_PORT 0 // GPIO Port A
44#define SPI_CSB 15 // PA_15
45#define I2C_DEVICE_ID 1 // I2C1
46#else // Default- SDP_120 Interface
47/* SPI Pins on SDP-K1-SDP-120 Interface */
48#define SPI_DEVICE_ID 5 // SPI5
49#define SPI_CS_PORT 1 // GPIO Port B
50#define SPI_CSB 9 // PA_15
51#define I2C_DEVICE_ID 3 // I2C3
52#endif
53
54/* STM32 UART specific parameters */
55#define UART_IRQ_ID UART5_IRQn
56#define UART_ID 5
57#define APP_UART_HANDLE &huart5
58#define APP_UART_USB_HANDLE hUsbDeviceHS
59#define USB_IRQ_ID OTG_HS_IRQn
60
61/* RDY specific Port and Pin */
62#define RDY_PORT 6 // Port G
63#define RDY_PIN 11 // PG_11
64
65/* Priority for Ready Interrupt */
66#define RDY_GPIO_PRIORITY 1
67
68/* Max SPI Clock Speed */
69#define MAX_SPI_SCLK 11250000
70
71/******************************************************************************/
72/********************** Variables and User Defined Data Types *****************/
73/******************************************************************************/
74
75extern UART_HandleTypeDef huart5;
76extern USBD_HandleTypeDef APP_UART_USB_HANDLE;
77
79extern struct stm32_uart_init_param stm32_uart_extra_init_params;
80extern struct stm32_spi_init_param stm32_spi_extra_init_params;
81extern struct stm32_i2c_init_param stm32_i2c_extra_init_params;
82extern struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params;
83extern struct stm32_uart_desc *uart_extra_params;
84
85extern void stm32_system_init(void);
86#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_uart_desc * uart_extra_params
Configuration file of nanodac firmware example program.
VCOM driver for stm32 as a no_os_uart implementation.
Specific initialization parameters for stm32 UART over USB.
Definition stm32_usb_uart.h:27