precision-converters-firmware
Loading...
Searching...
No Matches
Functions | Variables
app_config_stm32.c File Reference

STM32 Specific configuration files for AD552XR IIO Application. More...

#include "app_config_stm32.h"
#include "app_config.h"
Include dependency graph for app_config_stm32.c:

Functions

void SystemClock_Config (void)
 
int32_t stm32_init_system (void)
 Initialize the STM32 system peripherals.
 

Variables

struct stm32_dma_channel txdma_channel
 
struct stm32_dma_channel rxdma_channel
 
struct stm32_gpio_init_param stm32_gpio_cs_pwm_extra_init_params
 
struct stm32_spi_init_param stm32_spi_extra_init_params
 
struct stm32_i2c_init_param stm32_i2c_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_output_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_input_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_ldac_tgp_pwm_extra_init_params
 
struct stm32_usb_uart_init_param stm32_vcom_extra_init_params
 
struct stm32_uart_init_param stm32_uart_extra_init_params
 
struct stm32_pwm_init_param stm32_pwm_tgp_extra_init_params
 
struct stm32_pwm_init_param stm32_pwm_tgp_trigger_mode_extra_init_params
 
struct stm32_pwm_init_param stm32_pwm_dac_update_extra_init_params
 
struct stm32_pwm_init_param stm32_pwm_dma_trigger_extra_init_params
 

Detailed Description

STM32 Specific configuration files for AD552XR IIO Application.

This module contains the STM32 platform specific configurations

Copyright (c) 2026 Analog Devices, Inc.

This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.

Function Documentation

◆ stm32_init_system()

int32_t stm32_init_system ( void  )

Initialize the STM32 system peripherals.

Returns
None
Here is the caller graph for this function:

◆ SystemClock_Config()

void SystemClock_Config ( void  )
extern

Variable Documentation

◆ rxdma_channel

struct stm32_dma_channel rxdma_channel
Initial value:
= {
.hdma = &RX_DMA_CH_HANDLE,
.ch_num = RX_DMA_CH_ID,
.mem_increment = false,
.mem_data_alignment = DATA_ALIGN_BYTE,
.per_data_alignment = DATA_ALIGN_BYTE,
.dma_mode = DMA_CIRCULAR_MODE
}
#define RX_DMA_CH_HANDLE
Definition app_config_stm32.h:130
#define RX_DMA_CH_ID
Definition app_config_stm32.h:128

◆ stm32_gpio_cs_pwm_extra_init_params

struct stm32_gpio_init_param stm32_gpio_cs_pwm_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_AF_PP,
.speed = GPIO_SPEED_FREQ_HIGH,
.alternate = GPIO_AF1_TIM2,
}

◆ stm32_gpio_input_extra_init_params

struct stm32_gpio_init_param stm32_gpio_input_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_INPUT,
.speed = GPIO_SPEED_FREQ_HIGH,
.alternate = 0
}

◆ stm32_gpio_ldac_tgp_pwm_extra_init_params

struct stm32_gpio_init_param stm32_gpio_ldac_tgp_pwm_extra_init_params
Initial value:
= {
.speed = GPIO_SPEED_FREQ_HIGH,
.mode = GPIO_MODE_AF_PP,
.alternate = GPIO_AF1_TIM1,
}

◆ stm32_gpio_output_extra_init_params

struct stm32_gpio_init_param stm32_gpio_output_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_PP,
.speed = GPIO_SPEED_FREQ_HIGH,
.alternate = 0
}

◆ stm32_i2c_extra_init_params

struct stm32_i2c_init_param stm32_i2c_extra_init_params
Initial value:
= {
.i2c_timing = I2C_TIMING
}
#define I2C_TIMING
Definition app_config_stm32.h:60

◆ stm32_pwm_dac_update_extra_init_params

struct stm32_pwm_init_param stm32_pwm_dac_update_extra_init_params
Initial value:
= {
.mode = TIM_OC_PWM2,
.timer_chn = TIM_DAC_UPDATE_CH_ID,
.complementary_channel = false,
.timer_autoreload = true,
.get_timer_clock = HAL_RCC_GetPCLK1Freq,
.clock_divider = TIM_DAC_UPDATE_CLK_DIVIDER,
.repetitions = 0,
.onepulse_enable = false,
.dma_enable = false,
.slave_mode = STM32_PWM_SM_DISABLE,
.trigger_output = PWM_TRGO_OC1,
}
#define TIM_DAC_UPDATE_CLK_DIVIDER
Definition app_config_stm32.h:113
#define TIM_DAC_UPDATE_CH_ID
Definition app_config_stm32.h:111
#define TIM_DAC_UPDATE_HANDLE
Definition app_config_stm32.h:114
#define TIM_DAC_UPDATE_PRESCALER
Definition app_config_stm32.h:112

◆ stm32_pwm_dma_trigger_extra_init_params

struct stm32_pwm_init_param stm32_pwm_dma_trigger_extra_init_params
Initial value:
= {
.timer_autoreload = false,
.mode = TIM_OC_PWM2,
.timer_chn = TIM_DMA_TRIGGER_CH_ID,
.complementary_channel = false,
.get_timer_clock = HAL_RCC_GetPCLK2Freq,
.clock_divider = TIM_DMA_TRIGGER_CLK_DIVIDER,
.slave_mode = STM32_PWM_SM_TRIGGER,
.trigger_source = PWM_TS_ITR1,
.trigger_output = PWM_TRGO_RESET,
.dma_enable = true,
.repetitions = sizeof(uint32_t) - 1,
.onepulse_enable = true
}
#define TIM_DMA_TRIGGER_CLK_DIVIDER
Definition app_config_stm32.h:121
#define TIM_DMA_TRIGGER_CH_ID
Definition app_config_stm32.h:119
#define TIM_DMA_TRIGGER_PRESCALER
Definition app_config_stm32.h:120
#define TIM_DMA_TRIGGER_HANDLE
Definition app_config_stm32.h:122

◆ stm32_pwm_tgp_extra_init_params

struct stm32_pwm_init_param stm32_pwm_tgp_extra_init_params
Initial value:
= {
.htimer = &TIM_TGP_HANDLE,
.prescaler = TIM_TGP_PRESCALER,
.timer_autoreload = true,
.mode = TIM_OC_PWM2,
.timer_chn = TIM_TGP_CH_ID,
.complementary_channel = true,
.get_timer_clock = HAL_RCC_GetPCLK2Freq,
.clock_divider = TIM_TGP_CLK_DIVIDER,
.slave_mode = STM32_PWM_SM_DISABLE,
.dma_enable = false,
.repetitions = 0,
.onepulse_enable = false
}
#define TIM_TGP_CLK_DIVIDER
Definition app_config_stm32.h:106
#define TIM_TGP_CH_ID
Definition app_config_stm32.h:104
#define TIM_TGP_PRESCALER
Definition app_config_stm32.h:105
#define TIM_TGP_HANDLE
Definition app_config_stm32.h:107

◆ stm32_pwm_tgp_trigger_mode_extra_init_params

struct stm32_pwm_init_param stm32_pwm_tgp_trigger_mode_extra_init_params
Initial value:
= {
.htimer = &TIM_TGP_HANDLE,
.prescaler = TIM_TGP_PRESCALER,
.timer_autoreload = true,
.mode = TIM_OC_PWM2,
.timer_chn = TIM_TGP_CH_ID,
.complementary_channel = true,
.get_timer_clock = HAL_RCC_GetPCLK2Freq,
.clock_divider = TIM_TGP_CLK_DIVIDER,
.slave_mode = STM32_PWM_SM_TRIGGER,
.trigger_source = PWM_TS_ITR1,
.dma_enable = false,
.repetitions = 0,
.onepulse_enable = true
}

◆ stm32_spi_extra_init_params

struct stm32_spi_init_param stm32_spi_extra_init_params
Initial value:
= {
.chip_select_port = SPI_CSB_PORT,
.get_input_clock = HAL_RCC_GetPCLK2Freq,
.dma_init = NULL,
.rxdma_ch = NULL,
.txdma_ch = NULL,
.irq_num = 0,
.alternate = 0,
}
#define SPI_CSB_PORT
Definition app_config_stm32.h:38

◆ stm32_uart_extra_init_params

struct stm32_uart_init_param stm32_uart_extra_init_params
Initial value:
= {
.huart = &UART_HANDLE
}
#define UART_HANDLE
Definition app_config_stm32.h:97

◆ stm32_vcom_extra_init_params

struct stm32_usb_uart_init_param stm32_vcom_extra_init_params
Initial value:
= {
.husbdevice = &APP_UART_USB_HANDLE
}
#define APP_UART_USB_HANDLE
Definition app_config_stm32.h:44

◆ txdma_channel

struct stm32_dma_channel txdma_channel
Initial value:
= {
.hdma = &TX_DMA_CH_HANDLE,
.ch_num = TX_DMA_CH_ID,
.mem_increment = true,
.mem_data_alignment = DATA_ALIGN_BYTE,
.per_data_alignment = DATA_ALIGN_BYTE,
.dma_mode = DMA_CIRCULAR_MODE
}
#define TX_DMA_CH_HANDLE
Definition app_config_stm32.h:129
#define TX_DMA_CH_ID
Definition app_config_stm32.h:127