precision-converters-firmware
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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_spi.h"
21#include "stm32_uart.h"
22#include "stm32_irq.h"
23#include "stm32_gpio.h"
24#include "stm32_i2c.h"
25#include "stm32_uart_stdio.h"
26#include "main.h"
27
28/******************************************************************************/
29/********************** Macros and Constants Definition ***********************/
30/******************************************************************************/
31
32/* Note: The SDP-K1 board with the STM32F469NI MCU has been used
33* for developing the firmware. The below parameters will change depending
34* on the controller used. */
35
36/* SPI Pins on SDP-K1-Arduino Interface */
37#define SPI_DEVICE_ID 1 // SPI1
38#define SPI_CS_PORT 0 // GPIO Port A
39#define SPI_CSB 15 // PA_15
40
41/* I2C Device ID */
42#define I2C_DEVICE_ID 1 // I2C1
43
44/* Gain Port G and Pin 11 */
45#define GAIN_PIN 11 // PG_11
46#define GAIN_PORT 6 // GPIO PORT G
47
48/* Reset Port B and Pin 15 */
49#define RESET_PIN 15 // PB_15
50#define RESET_PORT 1 // GPIO Port B
51
52/* LDAC Port G and Pin 10 */
53#define LDAC_PIN 10 // PG_10
54#define LDAC_PORT 6 // GPIO PORT G
55
56/* ADDR0 Port A and Pin 10 */
57#define ADDR0_PIN 10 // PA_10
58#define ADDR0_PORT 0 // GPIO PORT A
59
60#define I2C_TIMING 0 // (Unused)
61
62/* STM32 UART specific parameters */
63#define APP_UART_HANDLE &huart5
64#define UART_IRQ_ID UART5_IRQn
65
66/* platform ops */
67#define uart_ops stm32_uart_ops
68#define i2c_ops stm32_i2c_ops
69
70/******************************************************************************/
71/********************** Public/Extern Declarations ****************************/
72/******************************************************************************/
73
74extern struct no_os_uart_desc *uart_desc;
75extern UART_HandleTypeDef huart5;
76
77extern struct stm32_uart_init_param stm32_uart_extra_init_params;
78extern struct stm32_spi_init_param stm32_spi_extra_init_params;
79extern struct stm32_i2c_init_param stm32_i2c_extra_init_params;
80
81extern void stm32_system_init(void);
82
83#endif // APP_CONFIG_STM32_H_
UART_HandleTypeDef huart5
void stm32_system_init(void)
Initialize the STM32 system peripherals.
Definition app_config_stm32.c:174
struct stm32_uart_init_param stm32_uart_extra_init_params
Definition app_config_stm32.c:51
struct stm32_spi_init_param stm32_spi_extra_init_params
Definition app_config_stm32.c:61
struct stm32_i2c_init_param stm32_i2c_extra_init_params
Definition app_config_stm32.c:99
struct no_os_uart_desc * uart_desc
Definition app_config.c:97