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

Source file for STM32 platform configurations. More...

#include <stdbool.h>
#include <string.h>
#include "app_config.h"
#include "app_config_stm32.h"
#include "ad405x_iio.h"
#include "ad405x.h"
#include "iio.h"
Include dependency graph for app_config_stm32.c:

Functions

void SystemClock_Config (void)
 
void receivecomplete_callback (DMA_HandleTypeDef *hdma)
 Callback function to flag the transfer of number of requested samples.
 
void stm32_system_init (void)
 Initialize the STM32 system peripherals.
 
void stm32_system_init_post_verification (void)
 Initialize the STM32 system peripherals after the device has been verified.
 
void update_buff (uint8_t *local_buf, uint8_t *buf_start_addr)
 Update buffer index.
 
void stm32_config_cnv_prescalar (void)
 Configures the prescalar according to the operating mode.
 
__weak unsigned int ux_device_stack_tasks_run (void)
 Dummy function for USBx middleware used in STM32H563.
 

Variables

struct stm32_uart_init_param stm32_uart_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_gp0_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_gp1_extra_init_params
 
struct stm32_gpio_irq_init_param stm32_gpio_irq_extra_init_params
 
struct stm32_gpio_init_param stm32_cs_pwm_gpio_extra_init_params
 
struct stm32_gpio_init_param stm32_cs_gpio_extra_init_params
 
struct stm32_gpio_init_param stm32_pwm_gpio_extra_init_params
 
struct stm32_pwm_init_param stm32_pwm_cnv_extra_init_params
 
volatile struct stm32_spi_desc * sdesc
 
volatile int dma_cycle_count = 0
 
uint32_t rxdma_ndtr
 
volatile uint8_t * iio_buf_start_idx
 
volatile uint8_t * dma_buf_start_idx
 
volatile uint8_t * iio_buf_current_idx
 
volatile uint8_t * dma_buf_current_idx
 

Detailed Description

Source file for STM32 platform configurations.

Copyright (c) 2023-2025 Analog Devices, Inc. All rights reserved.

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

◆ receivecomplete_callback()

void receivecomplete_callback ( DMA_HandleTypeDef *  hdma)

Callback function to flag the transfer of number of requested samples.

Callback function to flag the capture of number of requested samples.

Parameters
hdma[in]- DMA Handler (Unused)
Returns
None
Parameters
hdma- DMA handler (Unused)
Returns
None

Callback function to flag the transfer of number of requested samples.

Parameters
hdma- DMA handler (Unused)
Returns
None

Callback function to flag the transfer of number of requested samples.

Parameters
hdma- DMA Handler (Unused)
Returns
None

◆ stm32_config_cnv_prescalar()

void stm32_config_cnv_prescalar ( void  )

Configures the prescalar according to the operating mode.

Returns
None
Here is the caller graph for this function:

◆ stm32_system_init()

void stm32_system_init ( void  )

Initialize the STM32 system peripherals.

Returns
None

◆ stm32_system_init_post_verification()

void stm32_system_init_post_verification ( void  )

Initialize the STM32 system peripherals after the device has been verified.

Returns
None
Here is the caller graph for this function:

◆ SystemClock_Config()

void SystemClock_Config ( void  )
Here is the caller graph for this function:

◆ update_buff()

void update_buff ( uint8_t *  local_buf,
uint8_t *  buf_start_addr 
)

Update buffer index.

Parameters
local_buf[out]- Local Buffer
buf_start_addr[out]- Buffer start addr
Returns
None

◆ ux_device_stack_tasks_run()

__weak unsigned int ux_device_stack_tasks_run ( void  )

Dummy function for USBx middleware used in STM32H563.

Returns
0
Here is the caller graph for this function:

Variable Documentation

◆ dma_buf_current_idx

volatile uint8_t* dma_buf_current_idx

◆ dma_buf_start_idx

volatile uint8_t* dma_buf_start_idx

◆ dma_cycle_count

volatile int dma_cycle_count = 0

◆ iio_buf_current_idx

volatile uint8_t* iio_buf_current_idx

◆ iio_buf_start_idx

volatile uint8_t* iio_buf_start_idx

◆ rxdma_ndtr

uint32_t rxdma_ndtr

◆ sdesc

volatile struct stm32_spi_desc* sdesc

◆ stm32_cs_gpio_extra_init_params

struct stm32_gpio_init_param stm32_cs_gpio_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_PP,
.speed = GPIO_SPEED_FREQ_HIGH,
}

◆ stm32_cs_pwm_gpio_extra_init_params

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

◆ stm32_gpio_gp0_extra_init_params

struct stm32_gpio_init_param stm32_gpio_gp0_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_INPUT,
.speed = GPIO_SPEED_FREQ_HIGH,
}

◆ stm32_gpio_gp1_extra_init_params

struct stm32_gpio_init_param stm32_gpio_gp1_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_INPUT,
.speed = GPIO_SPEED_FREQ_HIGH,
}

◆ stm32_gpio_irq_extra_init_params

struct stm32_gpio_irq_init_param stm32_gpio_irq_extra_init_params
Initial value:
= {
.port_nb = GP1_PORT_NUM,
}
#define GP1_PORT_NUM
Definition app_config_mbed.h:62

◆ stm32_pwm_cnv_extra_init_params

struct stm32_pwm_init_param stm32_pwm_cnv_extra_init_params
Initial value:
= {
.htimer = CNV_TIMER_HANDLE,
.pwm_timer = CNV_TIMER_TYPE,
.prescaler = CNV_TIMER_PRESCALER,
.timer_autoreload = true,
.mode = TIM_OC_PWM1,
.timer_chn = CNV_TIMER_CHANNEL,
.get_timer_clock = HAL_RCC_GetPCLK2Freq,
.clock_divider = CNV_TIMER_CLK_DIVIDER,
.slave_mode = STM32_PWM_SM_DISABLE,
.trigger_output = PWM_TRGO_UPDATE
}

◆ stm32_pwm_gpio_extra_init_params

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

◆ stm32_uart_extra_init_params

struct stm32_uart_init_param stm32_uart_extra_init_params
Initial value:
= {
.huart = &UART_HANDLE,
}
UART_HandleTypeDef UART_HANDLE