no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
parameters.c File Reference

Definition of STM32 platform data used by ad463x_fmcz project. More...

#include "parameters.h"
#include "stm32_dma.h"
#include "no_os_pwm.h"
Include dependency graph for parameters.c:

Variables

DMA_HandleTypeDef hdma_tim8_ch1
 
DMA_HandleTypeDef hdma_spi1_rx
 
struct stm32_uart_init_param ad463x_uart_extra_ip
 
struct no_os_dma_init_param dma_init
 
struct stm32_dma_channel txdma_channel
 
struct stm32_dma_channel rxdma_channel
 
struct stm32_gpio_init_param cnv_pwm_gpio_extra_init_params
 
struct stm32_pwm_init_param cnv_pwm_extra_init_params
 
struct stm32_pwm_init_param cs_pwm_extra_init_params
 
struct no_os_pwm_init_param cs_pwm_init
 
struct stm32_pwm_init_param tx_pwm_extra_init_params
 
struct no_os_pwm_init_param tx_pwm_init
 
struct stm32_spi_init_param ad463x_spi_extra_ip
 

Detailed Description

Definition of STM32 platform data used by ad463x_fmcz project.

Author
Axel Haslam (ahasl.nosp@m.am@b.nosp@m.aylib.nosp@m.re.c.nosp@m.om)

Copyright 2024(c) Analog Devices, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Variable Documentation

◆ ad463x_spi_extra_ip

struct stm32_spi_init_param ad463x_spi_extra_ip
Initial value:
= {
.chip_select_port = SPI_CS_PORT,
.get_input_clock = HAL_RCC_GetPCLK2Freq,
.dma_init = &dma_init,
.txdma_ch = &txdma_channel,
.rxdma_ch = &rxdma_channel,
.irq_num = DMA2_Stream0_IRQn,
.pwm_init = &cs_pwm_init,
.tx_pwm_init = &tx_pwm_init,
.alternate = GPIO_AF1_TIM1,
}
struct stm32_dma_channel txdma_channel
Definition parameters.c:51
struct no_os_pwm_init_param cs_pwm_init
Definition parameters.c:106
struct stm32_dma_channel rxdma_channel
Definition parameters.c:60
struct no_os_dma_init_param dma_init
Definition parameters.c:45
struct no_os_pwm_init_param tx_pwm_init
Definition parameters.c:134
#define SPI_CS_PORT
Definition parameters.h:67

◆ ad463x_uart_extra_ip

struct stm32_uart_init_param ad463x_uart_extra_ip
Initial value:
= {
.huart = &huart5,
}
UART_HandleTypeDef huart5

◆ cnv_pwm_extra_init_params

struct stm32_pwm_init_param cnv_pwm_extra_init_params
Initial value:
= {
.htimer = &htim1,
.pwm_timer = STM32_PWM_TIMER_TIM,
.prescaler = 1,
.timer_autoreload = true,
.mode = TIM_OC_PWM1,
.timer_chn = 3,
.complementary_channel = false,
.get_timer_clock = HAL_RCC_GetPCLK2Freq,
.clock_divider = 2,
.trigger_output = PWM_TRGO_UPDATE,
}
TIM_HandleTypeDef htim1
@ STM32_PWM_TIMER_TIM
Definition stm32_pwm.h:43
@ PWM_TRGO_UPDATE
Definition stm32_pwm.h:64
@ TIM_OC_PWM1
Definition stm32_pwm.h:49

◆ cnv_pwm_gpio_extra_init_params

struct stm32_gpio_init_param cnv_pwm_gpio_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_AF_PP,
.speed = GPIO_SPEED_FREQ_VERY_HIGH,
.alternate = GPIO_AF1_TIM1
}

◆ cs_pwm_extra_init_params

struct stm32_pwm_init_param cs_pwm_extra_init_params
Initial value:
= {
.htimer = &htim2,
.pwm_timer = STM32_PWM_TIMER_TIM,
.prescaler = 1,
.timer_autoreload = true,
.mode = TIM_OC_PWM1,
.timer_chn = 1,
.complementary_channel = false,
.get_timer_clock = HAL_RCC_GetPCLK1Freq,
.clock_divider = 2,
.onepulse_enable = true,
.slave_mode = STM32_PWM_SM_TRIGGER,
.trigger_source = PWM_TS_ITR0,
.trigger_output = PWM_TRGO_ENABLE,
}
TIM_HandleTypeDef htim2
@ STM32_PWM_SM_TRIGGER
Definition stm32_pwm.h:74
@ PWM_TRGO_ENABLE
Definition stm32_pwm.h:63
@ PWM_TS_ITR0
Definition stm32_pwm.h:55

◆ cs_pwm_init

struct no_os_pwm_init_param cs_pwm_init
Initial value:
= {
.id = 2,
.period_ns = CS_PWM_PERIOD_NS,
.duty_cycle_ns = CS_PWM_DUTY_NS,
.platform_ops = &stm32_pwm_ops,
}
struct stm32_pwm_init_param cs_pwm_extra_init_params
Definition parameters.c:90
#define CS_PWM_PERIOD_NS
Definition parameters.h:99
#define CS_PWM_DUTY_NS
Definition parameters.h:100
@ NO_OS_PWM_POLARITY_HIGH
Definition no_os_pwm.h:47
const struct no_os_pwm_platform_ops stm32_pwm_ops
STM32 platform specific PWM platform ops structure.
Definition stm32_pwm.c:1173

◆ dma_init

struct no_os_dma_init_param dma_init
Initial value:
= {
.id = 0,
.num_ch = 2,
.platform_ops = &stm32_dma_ops,
}
const struct no_os_dma_platform_ops stm32_dma_ops
stm32 platform specific DMA platform ops structure
Definition stm32_dma.c:280

◆ hdma_spi1_rx

DMA_HandleTypeDef hdma_spi1_rx
extern

◆ hdma_tim8_ch1

DMA_HandleTypeDef hdma_tim8_ch1
extern

◆ rxdma_channel

struct stm32_dma_channel rxdma_channel
Initial value:
= {
.hdma = &hdma_spi1_rx,
.ch_num = DMA_CHANNEL_3,
.mem_increment = true,
.mem_data_alignment = DATA_ALIGN_BYTE,
.per_data_alignment = DATA_ALIGN_BYTE,
.dma_mode = DMA_NORMAL_MODE,
}
DMA_HandleTypeDef hdma_spi1_rx
@ DMA_NORMAL_MODE
Definition stm32_dma.h:56
@ DATA_ALIGN_BYTE
Definition stm32_dma.h:46

◆ tx_pwm_extra_init_params

struct stm32_pwm_init_param tx_pwm_extra_init_params
Initial value:
= {
.htimer = &htim8,
.pwm_timer = STM32_PWM_TIMER_TIM,
.prescaler = 1,
.timer_autoreload = true,
.mode = TIM_OC_PWM1,
.timer_chn = 1,
.complementary_channel = false,
.get_timer_clock = HAL_RCC_GetPCLK2Freq,
.clock_divider = 2,
.onepulse_enable = true,
.slave_mode = STM32_PWM_SM_TRIGGER,
.trigger_source = PWM_TS_ITR0,
.dma_enable = true,
.repetitions = TX_PWM_REPS,
}
TIM_HandleTypeDef htim8
#define TX_PWM_REPS
Definition parameters.h:96

◆ tx_pwm_init

struct no_os_pwm_init_param tx_pwm_init
Initial value:
= {
.id = 8,
.period_ns = TX_PWM_PERIOD_NS,
.duty_cycle_ns = TX_PWM_DUTY_NS,
.platform_ops = &stm32_pwm_ops,
}
struct stm32_pwm_init_param tx_pwm_extra_init_params
Definition parameters.c:117
#define TX_PWM_DUTY_NS
Definition parameters.h:95
#define TX_PWM_PERIOD_NS
Definition parameters.h:94

◆ txdma_channel

struct stm32_dma_channel txdma_channel
Initial value:
= {
.hdma = &hdma_tim8_ch1,
.ch_num = DMA_CHANNEL_7,
.mem_increment = false,
.mem_data_alignment = DATA_ALIGN_BYTE,
.per_data_alignment = DATA_ALIGN_BYTE,
.dma_mode = DMA_CIRCULAR_MODE
}
DMA_HandleTypeDef hdma_tim8_ch1
@ DMA_CIRCULAR_MODE
Definition stm32_dma.h:57