precision-converters-firmware
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 "no_os_irq.h"
27 #include "main.h"
28 
29 /******************************************************************************/
30 /********************** Macros and Constants Definition ***********************/
31 /******************************************************************************/
32 
33 /* The below configurations are specific to STM32H563ZIT6 MCU on NUCLEO-H563ZI Board. */
34 #define HW_CARRIER_NAME NUCLEO-H563ZI
35 
36 /* STM32 SPI Specific parameters */
37 #define SPI_DEVICE_ID 1 // SPI1
38 #define SPI_CS_PORT 3 // GPIO Port D
39 #define SPI_CSB 14 // PD_14
40 
41 /* STM32 UART specific parameters */
42 #define APP_UART_HANDLE &huart3
43 
44 /* UART Device ID */
45 #define UART_IRQ_ID USART3_IRQn
46 
47 /* RDY specific Port and Pin */
48 #define RDY_PORT 5
49 #define RDY_PIN 3
50 
51 #define RDY_GPIO_PRIORITY 1
52 
53 #define I2C_DEVICE_ID 1 // I2C1
54 
55 /* I2C timing register value for standard mode of operation
56  * Check here for more understanding on I2C timing register
57  * configuration: https://wiki.analog.com/resources/no-os/drivers/i2c */
58 #define I2C_TIMING 0x00000E14
59 
60 /******************************************************************************/
61 /********************** Variables and User Defined Data Types *****************/
62 /******************************************************************************/
63 
64 extern struct stm32_uart_init_param stm32_uart_extra_init_params;
65 extern struct stm32_spi_init_param stm32_spi_extra_init_params;
66 extern struct stm32_i2c_init_param stm32_i2c_extra_init_params;
67 extern struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params;
68 extern UART_HandleTypeDef huart3;
69 extern void stm32_system_init();
70 
71 #endif // APP_CONFIG_STM32_H_
struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params
Definition: app_config_stm32.c:35
void stm32_system_init(void)
Initialize the STM32 system peripherals.
Definition: app_config_stm32.c:111
struct stm32_uart_init_param stm32_uart_extra_init_params
Definition: app_config_stm32.c:49
struct stm32_spi_init_param stm32_spi_extra_init_params
Definition: app_config_stm32.c:54
struct stm32_i2c_init_param stm32_i2c_extra_init_params
Definition: app_config_stm32.c:99
UART_HandleTypeDef huart3