pv_st_h735.c
Go to the documentation of this file.
1 /*
2  Copyright 2021 Picovoice Inc.
3 
4  You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
5  file accompanying this source.
6 
7  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
8  an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
9  specific language governing permissions and limitations under the License.
10 */
11 
12 #include <stdbool.h>
13 #include <string.h>
14 
15 #include "stm32h7xx_hal.h"
16 
17 #include "main.h"
18 #include "pv_st_h735.h"
19 
20 #define UUID_ADDRESS (0x1FF1E800)
21 #define UUID_SIZE (12)
22 
23 #define PV_COM (USART3)
24 #define PV_COM_ALT (GPIO_AF7_USART3)
25 #define PV_COM_IRQn (USART3_IRQn)
26 #define PV_COM_TX_Pin (GPIO_PIN_8)
27 #define PV_COM_TX_GPIO_Port (GPIOD)
28 #define PV_COM_RX_Pin (GPIO_PIN_9)
29 #define PV_COM_RX_GPIO_Port (GPIOD)
30 
31 static uint8_t uuid[UUID_SIZE];
32 
34 
35 
36 static void CPU_CACHE_Enable(void) {
39 }
40 
42 
43  RCC_OscInitTypeDef RCC_OscInitStruct = {0};
44  RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
45  HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY);
49  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
50  RCC_OscInitStruct.HSEState = RCC_HSE_ON;
51  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
52  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
53  RCC_OscInitStruct.PLL.PLLM = 5;
54  RCC_OscInitStruct.PLL.PLLN = 110;
55  RCC_OscInitStruct.PLL.PLLP = 1;
56  RCC_OscInitStruct.PLL.PLLQ = 4;
57  RCC_OscInitStruct.PLL.PLLR = 2;
58  RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_2;
59  RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE;
60  RCC_OscInitStruct.PLL.PLLFRACN = 0;
61  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
63  }
67  RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
68  RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
69  RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2;
70  RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2;
71  RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2;
72  RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2;
73  RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2;
74  if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) {
76  }
77 
81 
82  return PV_STATUS_SUCCESS;
83 }
84 
85 const uint8_t *pv_get_uuid(void) {
86  return (const uint8_t *) uuid;
87 }
88 
89 const uint32_t pv_get_uuid_size(void) {
90  return UUID_SIZE;
91 }
92 
94 }
95 
96 static void PeriphCommonClock_Config(void) {
97  RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
98 
99  PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SAI4A|RCC_PERIPHCLK_SAI1;
100  PeriphClkInitStruct.PLL2.PLL2M = 25;
101  PeriphClkInitStruct.PLL2.PLL2N = 344;
102  PeriphClkInitStruct.PLL2.PLL2P = 7;
103  PeriphClkInitStruct.PLL2.PLL2Q = 2;
104  PeriphClkInitStruct.PLL2.PLL2R = 2;
105  PeriphClkInitStruct.PLL2.PLL2RGE = RCC_PLL2VCIRANGE_0;
106  PeriphClkInitStruct.PLL2.PLL2VCOSEL = RCC_PLL2VCOMEDIUM;
107  PeriphClkInitStruct.PLL2.PLL2FRACN = 0;
108  PeriphClkInitStruct.Sai1ClockSelection = RCC_SAI1CLKSOURCE_PLL2;
109  PeriphClkInitStruct.Sai4AClockSelection = RCC_SAI4ACLKSOURCE_PLL2;
110  if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) {
112  }
113 }
114 
115 static void MX_GPIO_Init(void)
116 {
120 
121 }
122 
123 static void MPU_Config(void)
124 {
125  MPU_Region_InitTypeDef MPU_InitStruct = {0};
126  HAL_MPU_Disable();
127  MPU_InitStruct.Enable = MPU_REGION_ENABLE;
128  MPU_InitStruct.Number = MPU_REGION_NUMBER0;
129  MPU_InitStruct.BaseAddress = 0x24000000;
130  MPU_InitStruct.Size = MPU_REGION_SIZE_512KB;
131  MPU_InitStruct.SubRegionDisable = 0x0;
132  MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
133  MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
134  MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE;
135  MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
136  MPU_InitStruct.IsCacheable = MPU_ACCESS_CACHEABLE;
137  MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
138 
139  HAL_MPU_ConfigRegion(&MPU_InitStruct);
140 
141  MPU_InitStruct.Number = MPU_REGION_NUMBER1;
142  MPU_InitStruct.BaseAddress = 0x38000000;
143  MPU_InitStruct.Size = MPU_REGION_SIZE_16KB;
144  MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
145 
146  HAL_MPU_ConfigRegion(&MPU_InitStruct);
147  HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
148 }
149 
150 static pv_status_t pv_uart_init(void) {
151 
152  GPIO_InitTypeDef GPIO_InitStruct = {0};
155  GPIO_InitStruct.Pin = PV_COM_TX_Pin | PV_COM_RX_Pin;
156  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
157  GPIO_InitStruct.Pull = GPIO_NOPULL;
158  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
159  GPIO_InitStruct.Alternate = PV_COM_ALT;
160  HAL_GPIO_Init(PV_COM_TX_GPIO_Port, &GPIO_InitStruct);
161 
163  huart.Init.BaudRate = 115200;
170 
171  if (HAL_UART_Init(&huart) != HAL_OK) {
173  }
176  }
179  }
182  }
185  return PV_STATUS_SUCCESS;
186 }
187 
189  if (pv_uart_init() != PV_STATUS_SUCCESS) {
191  }
192  return PV_STATUS_SUCCESS;
193 }
194 
195 int __io_putchar (int ch) {
196  HAL_UART_Transmit(&huart, (uint8_t *) &ch, 1, 1000);
197  return ch;
198 }
199 
201  MPU_Config();
203  HAL_Init();
204  pv_clock_config();
206 
207  MX_GPIO_Init();
208 
209  memcpy(uuid, (uint8_t *) UUID_ADDRESS, UUID_SIZE);
210  return PV_STATUS_SUCCESS;
211 }
212 
213 void pv_error_handler(void) {
214  __disable_irq();
215  while(true);
216 }
217 
218 void assert_failed(uint8_t* file, uint32_t line)
219 {
220  (void) file;
221  (void) line;
223 }
RCC_ClkInitTypeDef::SYSCLKDivider
uint32_t SYSCLKDivider
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:132
__HAL_RCC_PLL_PLLSOURCE_CONFIG
#define __HAL_RCC_PLL_PLLSOURCE_CONFIG(__PLLSOURCE__)
Macro to configure the PLL clock source.
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:1048
__HAL_PWR_GET_FLAG
#define __HAL_PWR_GET_FLAG(__FLAG__)
Check PWR flag is set or not.
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:173
RCC_PLLInitTypeDef::PLLQ
uint32_t PLLQ
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:65
UART_TXFIFO_THRESHOLD_1_8
#define UART_TXFIFO_THRESHOLD_1_8
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart_ex.h:102
GPIO_MODE_AF_PP
#define GPIO_MODE_AF_PP
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:122
__UART_HandleTypeDef::Init
UART_InitTypeDef Init
Definition: stm32f4xx_hal_uart.h:145
pv_st_h735.h
HAL_NVIC_EnableIRQ
void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
UUID_SIZE
#define UUID_SIZE
Definition: pv_st_h735.c:21
RCC_PLLInitTypeDef::PLLState
uint32_t PLLState
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:49
huart
UART_HandleTypeDef huart
Definition: pv_st_h735.c:33
RCC_PLLInitTypeDef::PLLFRACN
uint32_t PLLFRACN
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:78
HAL_UART_Transmit
HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout)
RCC_APB4_DIV2
#define RCC_APB4_DIV2
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:477
FLASH_LATENCY_3
#define FLASH_LATENCY_3
Definition: stm32f7xx_hal_flash_ex.h:287
PV_STATUS_INVALID_STATE
@ PV_STATUS_INVALID_STATE
Definition: porcupine/include/picovoice.h:40
HAL_UARTEx_DisableFifoMode
HAL_StatusTypeDef HAL_UARTEx_DisableFifoMode(UART_HandleTypeDef *huart)
GPIO_InitTypeDef
GPIO Init structure definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:47
RCC_PLL_ON
#define RCC_PLL_ON
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:162
RCC_HCLK_DIV2
#define RCC_HCLK_DIV2
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:244
RCC_ClkInitTypeDef
RCC System, AHB and APB busses clock configuration structure definition.
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:77
RCC_PLLInitTypeDef::PLLP
uint32_t PLLP
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:62
RCC_PLL1VCOWIDE
#define RCC_PLL1VCOWIDE
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:303
RCC_OscInitTypeDef
RCC Internal/External Oscillator (HSE, HSI, LSE and LSI) configuration structure definition.
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:51
RCC_ClkInitTypeDef::APB3CLKDivider
uint32_t APB3CLKDivider
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:138
GPIO_InitTypeDef::Alternate
uint32_t Alternate
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:61
UART_RXFIFO_THRESHOLD_1_8
#define UART_RXFIFO_THRESHOLD_1_8
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart_ex.h:116
RCC_ClkInitTypeDef::APB2CLKDivider
uint32_t APB2CLKDivider
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:91
RCC_PLLInitTypeDef::PLLM
uint32_t PLLM
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:55
UART_InitTypeDef::OverSampling
uint32_t OverSampling
Definition: stm32f4xx_hal_uart.h:74
__disable_irq
__STATIC_FORCEINLINE void __disable_irq(void)
Disable IRQ Interrupts.
Definition: imxrt1050/imxrt1050-evkb/CMSIS/cmsis_gcc.h:207
__HAL_RCC_USART3_CLK_ENABLE
#define __HAL_RCC_USART3_CLK_ENABLE()
Definition: stm32f7xx_hal_rcc_ex.h:1046
RCC_PeriphCLKInitTypeDef::PeriphClockSelection
uint32_t PeriphClockSelection
Definition: stm32f7xx_hal_rcc_ex.h:128
GPIO_SPEED_FREQ_LOW
#define GPIO_SPEED_FREQ_LOW
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:142
UART_InitTypeDef::WordLength
uint32_t WordLength
Definition: stm32f4xx_hal_uart.h:55
__UART_HandleTypeDef
UART handle Structure definition.
Definition: stm32f4xx_hal_uart.h:141
__HAL_RCC_GPIOE_CLK_ENABLE
#define __HAL_RCC_GPIOE_CLK_ENABLE()
Definition: stm32f7xx_hal_rcc_ex.h:661
RCC_PeriphCLKInitTypeDef::PLL2
RCC_PLL2InitTypeDef PLL2
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h:147
UART_InitTypeDef::BaudRate
uint32_t BaudRate
Definition: stm32f4xx_hal_uart.h:49
RCC_PLL2InitTypeDef::PLL2M
uint32_t PLL2M
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h:50
RCC_PLL2VCOMEDIUM
#define RCC_PLL2VCOMEDIUM
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h:502
pv_clock_config
static pv_status_t pv_clock_config(void)
Definition: pv_st_h735.c:41
PeriphCommonClock_Config
static void PeriphCommonClock_Config(void)
Definition: pv_st_h735.c:96
HAL_PWREx_ConfigSupply
HAL_StatusTypeDef HAL_PWREx_ConfigSupply(uint32_t SupplySource)
PV_COM
#define PV_COM
Definition: pv_st_h735.c:23
MX_GPIO_Init
static void MX_GPIO_Init(void)
Definition: pv_st_h735.c:115
SCB_EnableICache
__STATIC_FORCEINLINE void SCB_EnableICache(void)
Enable I-Cache.
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:2241
RCC_SYSCLKSOURCE_PLLCLK
#define RCC_SYSCLKSOURCE_PLLCLK
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:205
RCC_PLL2InitTypeDef::PLL2VCOSEL
uint32_t PLL2VCOSEL
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h:69
__HAL_RCC_GPIOD_CLK_ENABLE
#define __HAL_RCC_GPIOD_CLK_ENABLE()
Definition: stm32f7xx_hal_rcc_ex.h:653
UART_HWCONTROL_NONE
#define UART_HWCONTROL_NONE
Definition: stm32f4xx_hal_uart.h:275
PWR_FLAG_VOSRDY
#define PWR_FLAG_VOSRDY
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:138
HAL_OK
@ HAL_OK
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:42
UART_InitTypeDef::StopBits
uint32_t StopBits
Definition: stm32f4xx_hal_uart.h:58
RCC_SAI1CLKSOURCE_PLL2
#define RCC_SAI1CLKSOURCE_PLL2
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h:970
UUID_ADDRESS
#define UUID_ADDRESS
Definition: pv_st_h735.c:20
HAL_GPIO_Init
void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
RCC_PLL2InitTypeDef::PLL2N
uint32_t PLL2N
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h:53
pv_error_handler
void pv_error_handler(void)
Definition: pv_st_h735.c:213
uuid
static uint8_t uuid[UUID_SIZE]
Definition: pv_st_h735.c:31
RCC_CLOCKTYPE_PCLK1
#define RCC_CLOCKTYPE_PCLK1
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:192
GPIO_InitTypeDef::Mode
uint32_t Mode
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:52
RCC_PLL2InitTypeDef::PLL2Q
uint32_t PLL2Q
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h:62
RCC_PLLInitTypeDef::PLLR
uint32_t PLLR
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:71
GPIO_InitTypeDef::Pull
uint32_t Pull
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:55
GPIO_NOPULL
#define GPIO_NOPULL
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:154
PV_STATUS_SUCCESS
@ PV_STATUS_SUCCESS
Definition: porcupine/include/picovoice.h:34
RCC_PLLInitTypeDef::PLLSource
uint32_t PLLSource
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:52
pv_status_t
pv_status_t
Definition: porcupine/include/picovoice.h:33
HAL_RCC_ClockConfig
HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
RCC_ClkInitTypeDef::AHBCLKDivider
uint32_t AHBCLKDivider
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:85
RCC_PLL2InitTypeDef::PLL2P
uint32_t PLL2P
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h:58
RCC_PLLInitTypeDef::PLLRGE
uint32_t PLLRGE
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:73
RCC_CLOCKTYPE_D3PCLK1
#define RCC_CLOCKTYPE_D3PCLK1
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:319
HAL_UART_Init
HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart)
HAL_RCC_OscConfig
HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
pv_message_init
pv_status_t pv_message_init(void)
Definition: pv_st_h735.c:188
UART_MODE_TX_RX
#define UART_MODE_TX_RX
Definition: stm32f4xx_hal_uart.h:288
__HAL_RCC_SYSCFG_CLK_ENABLE
#define __HAL_RCC_SYSCFG_CLK_ENABLE()
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:599
RCC_OscInitTypeDef::PLL
RCC_PLLInitTypeDef PLL
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:71
RCC_ClkInitTypeDef::ClockType
uint32_t ClockType
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:79
GPIO_InitTypeDef::Speed
uint32_t Speed
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:58
RCC_CLOCKTYPE_PCLK2
#define RCC_CLOCKTYPE_PCLK2
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:193
pv_get_uuid_size
const uint32_t pv_get_uuid_size(void)
Definition: pv_st_h735.c:89
RCC_PLL2InitTypeDef::PLL2FRACN
uint32_t PLL2FRACN
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h:72
UART_WORDLENGTH_8B
#define UART_WORDLENGTH_8B
Definition: stm32f4xx_hal_uart.h:247
RCC_PLLSOURCE_HSE
#define RCC_PLLSOURCE_HSE
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:182
RCC_CLOCKTYPE_SYSCLK
#define RCC_CLOCKTYPE_SYSCLK
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:190
RCC_PLL2InitTypeDef::PLL2R
uint32_t PLL2R
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h:65
pv_get_uuid
const uint8_t * pv_get_uuid(void)
Definition: pv_st_h735.c:85
assert_failed
void assert_failed(uint8_t *file, uint32_t line)
Definition: pv_st_h735.c:218
RCC_HSE_ON
#define RCC_HSE_ON
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:121
HAL_Init
HAL_StatusTypeDef HAL_Init(void)
This function is used to initialize the HAL Library; it must be the first instruction to be executed ...
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c:157
__io_putchar
int __io_putchar(int ch)
Definition: pv_st_h735.c:195
MPU_Config
static void MPU_Config(void)
Definition: pv_st_h735.c:123
RCC_CLOCKTYPE_HCLK
#define RCC_CLOCKTYPE_HCLK
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:191
SCB_EnableDCache
__STATIC_FORCEINLINE void SCB_EnableDCache(void)
Enable D-Cache.
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:2325
RCC_SYSCLK_DIV1
#define RCC_SYSCLK_DIV1
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:227
RCC_PERIPHCLK_SAI1
#define RCC_PERIPHCLK_SAI1
Definition: stm32f7xx_hal_rcc_ex.h:256
CPU_CACHE_Enable
static void CPU_CACHE_Enable(void)
Definition: pv_st_h735.c:36
main.h
pv_board_init
pv_status_t pv_board_init()
Definition: pv_st_h735.c:200
HAL_RCCEx_PeriphCLKConfig
HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)
RCC_PLL1VCIRANGE_2
#define RCC_PLL1VCIRANGE_2
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:291
UART_InitTypeDef::Mode
uint32_t Mode
Definition: stm32f4xx_hal_uart.h:68
pv_board_deinit
void pv_board_deinit()
Definition: pv_st_h735.c:93
RCC_APB2_DIV2
#define RCC_APB2_DIV2
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:457
RCC_APB3_DIV2
#define RCC_APB3_DIV2
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:416
PWR_REGULATOR_VOLTAGE_SCALE0
#define PWR_REGULATOR_VOLTAGE_SCALE0
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr.h:143
RCC_PeriphCLKInitTypeDef::Sai1ClockSelection
uint32_t Sai1ClockSelection
Definition: stm32f7xx_hal_rcc_ex.h:157
PV_COM_ALT
#define PV_COM_ALT
Definition: pv_st_h735.c:24
UART_OVERSAMPLING_16
#define UART_OVERSAMPLING_16
Definition: stm32f4xx_hal_uart.h:305
RCC_PLL2VCIRANGE_0
#define RCC_PLL2VCIRANGE_0
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h:488
RCC_ClkInitTypeDef::APB4CLKDivider
uint32_t APB4CLKDivider
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:145
UART_InitTypeDef::HwFlowCtl
uint32_t HwFlowCtl
Definition: stm32f4xx_hal_uart.h:71
UART_PARITY_NONE
#define UART_PARITY_NONE
Definition: stm32f4xx_hal_uart.h:265
RCC_ClkInitTypeDef::SYSCLKSource
uint32_t SYSCLKSource
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:82
RCC_OSCILLATORTYPE_HSE
#define RCC_OSCILLATORTYPE_HSE
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:109
RCC_OscInitTypeDef::HSEState
uint32_t HSEState
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:56
HAL_NVIC_SetPriority
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
RCC_CLOCKTYPE_D1PCLK1
#define RCC_CLOCKTYPE_D1PCLK1
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:316
RCC_PeriphCLKInitTypeDef
RCC extended clocks structure definition.
Definition: stm32f7xx_hal_rcc_ex.h:126
HAL_UARTEx_SetTxFifoThreshold
HAL_StatusTypeDef HAL_UARTEx_SetTxFifoThreshold(UART_HandleTypeDef *huart, uint32_t Threshold)
HAL_EnableCompensationCell
void HAL_EnableCompensationCell(void)
Enables the I/O Compensation Cell.
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c:524
RCC_PLL2InitTypeDef::PLL2RGE
uint32_t PLL2RGE
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h:67
HAL_UARTEx_SetRxFifoThreshold
HAL_StatusTypeDef HAL_UARTEx_SetRxFifoThreshold(UART_HandleTypeDef *huart, uint32_t Threshold)
RCC_PLLInitTypeDef::PLLN
uint32_t PLLN
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:58
__HAL_RCC_CSI_ENABLE
#define __HAL_RCC_CSI_ENABLE()
Macros to enable or disable the Internal oscillator (CSI).
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:7236
RCC_PLLInitTypeDef::PLLVCOSEL
uint32_t PLLVCOSEL
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:75
RCC_OscInitTypeDef::OscillatorType
uint32_t OscillatorType
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:53
PV_COM_TX_GPIO_Port
#define PV_COM_TX_GPIO_Port
Definition: pv_st_h735.c:27
__HAL_RCC_GPIOH_CLK_ENABLE
#define __HAL_RCC_GPIOH_CLK_ENABLE()
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:407
__UART_HandleTypeDef::Instance
USART_TypeDef * Instance
Definition: stm32f4xx_hal_uart.h:143
RCC_ClkInitTypeDef::APB1CLKDivider
uint32_t APB1CLKDivider
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:88
UART_STOPBITS_1
#define UART_STOPBITS_1
Definition: stm32f4xx_hal_uart.h:256
__HAL_PWR_VOLTAGESCALING_CONFIG
#define __HAL_PWR_VOLTAGESCALING_CONFIG(__REGULATOR__)
macros configure the main internal regulator output voltage.
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h:135
PV_COM_TX_Pin
#define PV_COM_TX_Pin
Definition: pv_st_h735.c:26
PV_COM_IRQn
#define PV_COM_IRQn
Definition: pv_st_h735.c:25
UART_InitTypeDef::Parity
uint32_t Parity
Definition: stm32f4xx_hal_uart.h:61
RCC_APB1_DIV2
#define RCC_APB1_DIV2
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:436
pv_uart_init
static pv_status_t pv_uart_init(void)
Definition: pv_st_h735.c:150
GPIO_InitTypeDef::Pin
uint32_t Pin
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:49
PV_COM_RX_Pin
#define PV_COM_RX_Pin
Definition: pv_st_h735.c:28


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:50