12#ifndef APP_CONFIG_STM32_H_
13#define APP_CONFIG_STM32_H_
20#include "stm32_uart.h"
23#include "stm32_gpio.h"
25#include "stm32_gpio_irq.h"
28#include "stm32_uart_stdio.h"
29#include "usb_device.h"
30#elif defined STM32H563xx
37#if defined(STM32H563xx)
41#define STM32_SPI_CS_PORT 3
49#define GPIO_TRIGGER_INT_PORT 4
53#define STM32_UART_BASE 3
56#define STM32_SAI_BASE SAI1_Block_A
58#define APP_UART_HANDLE huart3
61#define TDM_DATA_SIZE 16
62#define TDM_SLOTS_PER_FRAME 4
63#define TDM_FS_ACTIVE_LENGTH 8
67#define TDM_N_SAMPLES_DMA_READ 800
68#define TDM_DMA_READ_SIZE TDM_N_SAMPLES_DMA_READ * TDM_SLOTS_PER_FRAME/2
71#define DCLK_PIN_MASK 0
73#define DOUT0_PIN_MASK 0
74#define DOUT1_PIN_MASK 0
81#define UART_IRQ_ID USART3_IRQn
82#define UART_DEVICE_ID 0
83#define SPI_DEVICE_ID STM32_SPI_ID
84#define INTR_GPIO_TRIGGER_HANDLE 0
85#define IRQ_INT_ID ODR_PIN
86#define DMA_IRQ_ID GPDMA1_Channel7_IRQn
87#define I2C_DEVICE_ID 1
92#define I2C_TIMING 0x00000E14
99#define SAMPLING_RATE (500000)
102#define STM32_SPI_ID 1
104#define STM32_SPI_CS_PORT 0
119#define APP_UART_USB_HANDLE hUsbDeviceHS
120#define APP_UART_USB_IRQ OTG_HS_IRQn
123#define APP_UART_HANDLE huart5
124#define UART_IRQ_ID UART5_IRQn
125#define UART_DEVICE_ID 5
127#define SPI_DEVICE_ID STM32_SPI_ID
128#define IRQ_INT_ID ODR_PIN
129#define I2C_DEVICE_ID 1
134#define PWM_CLK_DIVIDER 2
135#define PWM_PRESCALER 3
136#define PWM_HANDLE htim4
138#define GPIO_TRIGGER_INT_PORT ODR_PORT
139#define INTR_GPIO_TRIGGER_HANDLE 0
141#define SAMPLING_RATE (12000)
147#define CONV_TRIGGER_PERIOD_NSEC (((float)(1.0 / SAMPLING_RATE) * 1000000) * 1000)
148#define CONV_TRIGGER_DUTY_CYCLE_NSEC (CONV_TRIGGER_PERIOD_NSEC / 40)
157#define DOUT1_IDR (*((volatile uint32_t *)0x40020010))
158#define ODR_IDR (*((volatile uint32_t *)0x40020C10))
159#define DCLK_IDR (*((volatile uint32_t *)0x40021810))
160#define DOUT0_IDR (*((volatile uint32_t *)0x40021810))
161#define DCLK_ODR (*((volatile uint32_t *)0x40021814))
164#define DCLK_PIN_MASK (uint32_t)(1 << DCLK_PIN)
165#define ODR_PIN_MASK (uint32_t)(1 << ODR_PIN)
166#define DOUT0_PIN_MASK (uint32_t)(1 << DOUT0_PIN)
167#define DOUT1_PIN_MASK (uint32_t)(1 << DOUT1_PIN)
172#define I2C_TIMING 0x00000E14
191extern TIM_HandleTypeDef
htim4;
194#if (INTERFACE_MODE == TDM_MODE)
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
#define APP_UART_HANDLE
Definition app_config_stm32.h:131
struct stm32_spi_init_param stm32_spi_extra_init_params
Definition app_config_stm32.c:43
struct stm32_tdm_init_param stm32_tdm_extra_init_params
Definition app_config_stm32.c:55
struct stm32_gpio_init_param stm32_input_extra_init_params
Definition app_config_stm32.c:94
struct stm32_gpio_init_param stm32_output_extra_init_params
Definition app_config_stm32.c:100
void ad7134_dma_rx_cplt(void *hsai)
SAI DMA Receive Complete Callback function.
Definition app_config_stm32.c:183
struct stm32_gpio_init_param stm32_pwm_gpio_init_params
Definition app_config_stm32.c:88
bool data_capture_operation
Definition ad4134_iio.c:194
struct stm32_pwm_init_param stm32_pwm_extra_init_params
Definition app_config_stm32.c:77
struct iio_device_data * ad7134_iio_dev_data
Definition ad4134_iio.c:187
struct stm32_gpio_init_param stm32_pdn_extra_init_params
Definition app_config_stm32.c:66
void ad7134_dma_rx_half_cplt(void *hsai)
SAI DMA Receive Half Complete Callback function.
Definition app_config_stm32.c:168
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