STM32H735xx HAL User Manual
|
00001 /** 00002 ****************************************************************************** 00003 * @file stm32h7xx_ll_fmac.h 00004 * @author MCD Application Team 00005 * @brief Header file of FMAC LL module. 00006 ****************************************************************************** 00007 * @attention 00008 * 00009 * Copyright (c) 2017 STMicroelectronics. 00010 * All rights reserved. 00011 * 00012 * This software is licensed under terms that can be found in the LICENSE file 00013 * in the root directory of this software component. 00014 * If no LICENSE file comes with this software, it is provided AS-IS. 00015 * 00016 ****************************************************************************** 00017 */ 00018 00019 /* Define to prevent recursive inclusion -------------------------------------*/ 00020 #ifndef STM32H7xx_LL_FMAC_H 00021 #define STM32H7xx_LL_FMAC_H 00022 00023 #ifdef __cplusplus 00024 extern "C" { 00025 #endif 00026 00027 /* Includes ------------------------------------------------------------------*/ 00028 #include "stm32h7xx.h" 00029 00030 /** @addtogroup STM32H7xx_LL_Driver 00031 * @{ 00032 */ 00033 00034 #if defined(FMAC) 00035 00036 /** @defgroup FMAC_LL FMAC 00037 * @{ 00038 */ 00039 00040 /* Exported types ------------------------------------------------------------*/ 00041 00042 /* Exported constants --------------------------------------------------------*/ 00043 /** @defgroup FMAC_LL_Exported_Constants FMAC Exported Constants 00044 * @{ 00045 */ 00046 00047 /** @defgroup FMAC_LL_EC_GET_FLAG Get Flag Defines 00048 * @brief Flag defines which can be used with LL_FMAC_ReadReg function 00049 * @{ 00050 */ 00051 #define LL_FMAC_SR_SAT FMAC_SR_SAT /*!< Saturation Error Flag (this helps in debugging a filter) */ 00052 #define LL_FMAC_SR_UNFL FMAC_SR_UNFL /*!< Underflow Error Flag */ 00053 #define LL_FMAC_SR_OVFL FMAC_SR_OVFL /*!< Overflow Error Flag */ 00054 #define LL_FMAC_SR_X1FULL FMAC_SR_X1FULL /*!< X1 Buffer Full Flag */ 00055 #define LL_FMAC_SR_YEMPTY FMAC_SR_YEMPTY /*!< Y Buffer Empty Flag */ 00056 /** 00057 * @} 00058 */ 00059 00060 /** @defgroup FMAC_LL_EC_IT IT Defines 00061 * @brief IT defines which can be used with LL_FMAC_ReadReg and LL_FMAC_WriteReg functions 00062 * @{ 00063 */ 00064 #define LL_FMAC_CR_SATIEN FMAC_CR_SATIEN /*!< Saturation Error Interrupt Enable (this helps in debugging a filter) */ 00065 #define LL_FMAC_CR_UNFLIEN FMAC_CR_UNFLIEN /*!< Underflow Error Interrupt Enable */ 00066 #define LL_FMAC_CR_OVFLIEN FMAC_CR_OVFLIEN /*!< Overflow Error Interrupt Enable */ 00067 #define LL_FMAC_CR_WIEN FMAC_CR_WIEN /*!< Write Interrupt Enable */ 00068 #define LL_FMAC_CR_RIEN FMAC_CR_RIEN /*!< Read Interrupt Enable */ 00069 /** 00070 * @} 00071 */ 00072 00073 /** @defgroup FMAC_LL_EC_WM FMAC watermarks 00074 * @brief Watermark defines that can be used for buffer full (input) or buffer empty (output) 00075 * @{ 00076 */ 00077 #define LL_FMAC_WM_0_THRESHOLD_1 0x00000000U /*!< Buffer full/empty flag set if there is less than 1 free/unread space. */ 00078 #define LL_FMAC_WM_1_THRESHOLD_2 0x01000000U /*!< Buffer full/empty flag set if there are less than 2 free/unread spaces. */ 00079 #define LL_FMAC_WM_2_THRESHOLD_4 0x02000000U /*!< Buffer full/empty flag set if there are less than 4 free/unread spaces. */ 00080 #define LL_FMAC_WM_3_THRESHOLD_8 0x03000000U /*!< Buffer full/empty flag set if there are less than 8 free/empty spaces. */ 00081 /** 00082 * @} 00083 */ 00084 00085 /** @defgroup FMAC_LL_EC_FUNC FMAC functions 00086 * @{ 00087 */ 00088 #define LL_FMAC_FUNC_LOAD_X1 (FMAC_PARAM_FUNC_0) /*!< Load X1 buffer */ 00089 #define LL_FMAC_FUNC_LOAD_X2 (FMAC_PARAM_FUNC_1) /*!< Load X2 buffer */ 00090 #define LL_FMAC_FUNC_LOAD_Y (FMAC_PARAM_FUNC_1 | FMAC_PARAM_FUNC_0) /*!< Load Y buffer */ 00091 #define LL_FMAC_FUNC_CONVO_FIR (FMAC_PARAM_FUNC_3) /*!< Convolution (FIR filter) */ 00092 #define LL_FMAC_FUNC_IIR_DIRECT_FORM_1 (FMAC_PARAM_FUNC_3 | FMAC_PARAM_FUNC_0) /*!< IIR filter (direct form 1) */ 00093 /** 00094 * @} 00095 */ 00096 00097 /** @defgroup FMAC_LL_EC_PROCESSING FMAC processing 00098 * @{ 00099 */ 00100 #define LL_FMAC_PROCESSING_STOP 0x00U /*!< Stop FMAC Processing */ 00101 #define LL_FMAC_PROCESSING_START 0x01U /*!< Start FMAC Processing */ 00102 /** 00103 * @} 00104 */ 00105 00106 /** 00107 * @} 00108 */ 00109 00110 /* External variables --------------------------------------------------------*/ 00111 /* Exported macros -----------------------------------------------------------*/ 00112 /** @defgroup FMAC_LL_Exported_Macros FMAC Exported Macros 00113 * @{ 00114 */ 00115 00116 /** @defgroup FMAC_LL_EM_WRITE_READ Common Write and read registers Macros 00117 * @{ 00118 */ 00119 00120 /** 00121 * @brief Write a value in FMAC register 00122 * @param __INSTANCE__ FMAC Instance 00123 * @param __REG__ Register to be written 00124 * @param __VALUE__ Value to be written in the register 00125 * @retval None 00126 */ 00127 #define LL_FMAC_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) 00128 00129 /** 00130 * @brief Read a value in FMAC register 00131 * @param __INSTANCE__ FMAC Instance 00132 * @param __REG__ Register to be read 00133 * @retval Register value 00134 */ 00135 #define LL_FMAC_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) 00136 /** 00137 * @} 00138 */ 00139 00140 /** 00141 * @} 00142 */ 00143 00144 00145 /* Exported functions --------------------------------------------------------*/ 00146 00147 /** @defgroup FMAC_LL_Exported_Functions FMAC Exported Functions 00148 * @{ 00149 */ 00150 00151 /** @defgroup FMAC_LL_EF_Configuration FMAC Configuration functions 00152 * @{ 00153 */ 00154 00155 /** 00156 * @brief Configure X1 full watermark. 00157 * @rmtoll X1BUFCFG FULL_WM LL_FMAC_SetX1FullWatermark 00158 * @param FMACx FMAC instance 00159 * @param Watermark This parameter can be one of the following values: 00160 * @arg @ref LL_FMAC_WM_0_THRESHOLD_1 00161 * @arg @ref LL_FMAC_WM_1_THRESHOLD_2 00162 * @arg @ref LL_FMAC_WM_2_THRESHOLD_4 00163 * @arg @ref LL_FMAC_WM_3_THRESHOLD_8 00164 * @retval None 00165 */ 00166 __STATIC_INLINE void LL_FMAC_SetX1FullWatermark(FMAC_TypeDef *FMACx, uint32_t Watermark) 00167 { 00168 MODIFY_REG(FMACx->X1BUFCFG, FMAC_X1BUFCFG_FULL_WM, Watermark); 00169 } 00170 00171 /** 00172 * @brief Return X1 full watermark. 00173 * @rmtoll X1BUFCFG FULL_WM LL_FMAC_GetX1FullWatermark 00174 * @param FMACx FMAC instance 00175 * @retval uint32_t Returned value can be one of the following values: 00176 * @arg @ref LL_FMAC_WM_0_THRESHOLD_1 00177 * @arg @ref LL_FMAC_WM_1_THRESHOLD_2 00178 * @arg @ref LL_FMAC_WM_2_THRESHOLD_4 00179 * @arg @ref LL_FMAC_WM_3_THRESHOLD_8 00180 */ 00181 __STATIC_INLINE uint32_t LL_FMAC_GetX1FullWatermark(FMAC_TypeDef *FMACx) 00182 { 00183 return (uint32_t)(READ_BIT(FMACx->X1BUFCFG, FMAC_X1BUFCFG_FULL_WM)); 00184 } 00185 00186 /** 00187 * @brief Configure X1 buffer size. 00188 * @rmtoll X1BUFCFG X1_BUF_SIZE LL_FMAC_SetX1BufferSize 00189 * @param FMACx FMAC instance 00190 * @param BufferSize Number of 16-bit words allocated to the input buffer (including the optional "headroom"). 00191 * This parameter must be a number between Min_Data=0x01 and Max_Data=0xFF. 00192 * @retval None 00193 */ 00194 __STATIC_INLINE void LL_FMAC_SetX1BufferSize(FMAC_TypeDef *FMACx, uint8_t BufferSize) 00195 { 00196 MODIFY_REG(FMACx->X1BUFCFG, FMAC_X1BUFCFG_X1_BUF_SIZE, ((uint32_t)BufferSize) << FMAC_X1BUFCFG_X1_BUF_SIZE_Pos); 00197 } 00198 00199 /** 00200 * @brief Return X1 buffer size. 00201 * @rmtoll X1BUFCFG X1_BUF_SIZE LL_FMAC_GetX1BufferSize 00202 * @param FMACx FMAC instance 00203 * @retval uint8_t Number of 16-bit words allocated to the input buffer 00204 * (including the optional "headroom") (value between Min_Data=0x01 and Max_Data=0xFF). 00205 */ 00206 __STATIC_INLINE uint8_t LL_FMAC_GetX1BufferSize(FMAC_TypeDef *FMACx) 00207 { 00208 return (uint8_t)(READ_BIT(FMACx->X1BUFCFG, FMAC_X1BUFCFG_X1_BUF_SIZE) >> FMAC_X1BUFCFG_X1_BUF_SIZE_Pos); 00209 } 00210 00211 /** 00212 * @brief Configure X1 base. 00213 * @rmtoll X1BUFCFG X1_BASE LL_FMAC_SetX1Base 00214 * @param FMACx FMAC instance 00215 * @param Base Base address of the input buffer (X1) within the internal memory. 00216 * This parameter must be a value between Min_Data=0x00 and Max_Data=0xFF. 00217 * @retval None 00218 */ 00219 __STATIC_INLINE void LL_FMAC_SetX1Base(FMAC_TypeDef *FMACx, uint8_t Base) 00220 { 00221 MODIFY_REG(FMACx->X1BUFCFG, FMAC_X1BUFCFG_X1_BASE, ((uint32_t)Base) << FMAC_X1BUFCFG_X1_BASE_Pos); 00222 } 00223 00224 /** 00225 * @brief Return X1 base. 00226 * @rmtoll X1BUFCFG X1_BASE LL_FMAC_GetX1Base 00227 * @param FMACx FMAC instance 00228 * @retval uint8_t Base address of the input buffer (X1) within the internal memory 00229 * (value between Min_Data=0x00 and Max_Data=0xFF). 00230 */ 00231 __STATIC_INLINE uint8_t LL_FMAC_GetX1Base(FMAC_TypeDef *FMACx) 00232 { 00233 return (uint8_t)(READ_BIT(FMACx->X1BUFCFG, FMAC_X1BUFCFG_X1_BASE) >> FMAC_X1BUFCFG_X1_BASE_Pos); 00234 } 00235 00236 /** 00237 * @brief Configure X2 buffer size. 00238 * @rmtoll X2BUFCFG X2_BUF_SIZE LL_FMAC_SetX2BufferSize 00239 * @param FMACx FMAC instance 00240 * @param BufferSize Number of 16-bit words allocated to the coefficient buffer. 00241 * This parameter must be a number between Min_Data=0x01 and Max_Data=0xFF. 00242 * @retval None 00243 */ 00244 __STATIC_INLINE void LL_FMAC_SetX2BufferSize(FMAC_TypeDef *FMACx, uint8_t BufferSize) 00245 { 00246 MODIFY_REG(FMACx->X2BUFCFG, FMAC_X2BUFCFG_X2_BUF_SIZE, ((uint32_t)BufferSize) << FMAC_X2BUFCFG_X2_BUF_SIZE_Pos); 00247 } 00248 00249 /** 00250 * @brief Return X2 buffer size. 00251 * @rmtoll X2BUFCFG X2_BUF_SIZE LL_FMAC_GetX2BufferSize 00252 * @param FMACx FMAC instance 00253 * @retval uint8_t Number of 16-bit words allocated to the coefficient buffer 00254 * (value between Min_Data=0x01 and Max_Data=0xFF). 00255 */ 00256 __STATIC_INLINE uint8_t LL_FMAC_GetX2BufferSize(FMAC_TypeDef *FMACx) 00257 { 00258 return (uint8_t)(READ_BIT(FMACx->X2BUFCFG, FMAC_X2BUFCFG_X2_BUF_SIZE) >> FMAC_X2BUFCFG_X2_BUF_SIZE_Pos); 00259 } 00260 00261 /** 00262 * @brief Configure X2 base. 00263 * @rmtoll X2BUFCFG X2_BASE LL_FMAC_SetX2Base 00264 * @param FMACx FMAC instance 00265 * @param Base Base address of the coefficient buffer (X2) within the internal memory. 00266 * This parameter must be a value between Min_Data=0x00 and Max_Data=0xFF. 00267 * @retval None 00268 */ 00269 __STATIC_INLINE void LL_FMAC_SetX2Base(FMAC_TypeDef *FMACx, uint8_t Base) 00270 { 00271 MODIFY_REG(FMACx->X2BUFCFG, FMAC_X2BUFCFG_X2_BASE, ((uint32_t)Base) << FMAC_X2BUFCFG_X2_BASE_Pos); 00272 } 00273 00274 /** 00275 * @brief Return X2 base. 00276 * @rmtoll X2BUFCFG X2_BASE LL_FMAC_GetX2Base 00277 * @param FMACx FMAC instance 00278 * @retval uint8_t Base address of the coefficient buffer (X2) within the internal memory 00279 * (value between Min_Data=0x00 and Max_Data=0xFF). 00280 */ 00281 __STATIC_INLINE uint8_t LL_FMAC_GetX2Base(FMAC_TypeDef *FMACx) 00282 { 00283 return (uint8_t)(READ_BIT(FMACx->X2BUFCFG, FMAC_X2BUFCFG_X2_BASE) >> FMAC_X2BUFCFG_X2_BASE_Pos); 00284 } 00285 00286 /** 00287 * @brief Configure Y empty watermark. 00288 * @rmtoll YBUFCFG EMPTY_WM LL_FMAC_SetYEmptyWatermark 00289 * @param FMACx FMAC instance 00290 * @param Watermark This parameter can be one of the following values: 00291 * @arg @ref LL_FMAC_WM_0_THRESHOLD_1 00292 * @arg @ref LL_FMAC_WM_1_THRESHOLD_2 00293 * @arg @ref LL_FMAC_WM_2_THRESHOLD_4 00294 * @arg @ref LL_FMAC_WM_3_THRESHOLD_8 00295 * @retval None 00296 */ 00297 __STATIC_INLINE void LL_FMAC_SetYEmptyWatermark(FMAC_TypeDef *FMACx, uint32_t Watermark) 00298 { 00299 MODIFY_REG(FMACx->YBUFCFG, FMAC_YBUFCFG_EMPTY_WM, Watermark); 00300 } 00301 00302 /** 00303 * @brief Return Y empty watermark. 00304 * @rmtoll YBUFCFG EMPTY_WM LL_FMAC_GetYEmptyWatermark 00305 * @param FMACx FMAC instance 00306 * @retval uint32_t Returned value can be one of the following values: 00307 * @arg @ref LL_FMAC_WM_0_THRESHOLD_1 00308 * @arg @ref LL_FMAC_WM_1_THRESHOLD_2 00309 * @arg @ref LL_FMAC_WM_2_THRESHOLD_4 00310 * @arg @ref LL_FMAC_WM_3_THRESHOLD_8 00311 */ 00312 __STATIC_INLINE uint32_t LL_FMAC_GetYEmptyWatermark(FMAC_TypeDef *FMACx) 00313 { 00314 return (uint32_t)(READ_BIT(FMACx->YBUFCFG, FMAC_YBUFCFG_EMPTY_WM)); 00315 } 00316 00317 /** 00318 * @brief Configure Y buffer size. 00319 * @rmtoll YBUFCFG Y_BUF_SIZE LL_FMAC_SetYBufferSize 00320 * @param FMACx FMAC instance 00321 * @param BufferSize Number of 16-bit words allocated to the output buffer (including the optional "headroom"). 00322 * This parameter must be a number between Min_Data=0x01 and Max_Data=0xFF. 00323 * @retval None 00324 */ 00325 __STATIC_INLINE void LL_FMAC_SetYBufferSize(FMAC_TypeDef *FMACx, uint8_t BufferSize) 00326 { 00327 MODIFY_REG(FMACx->YBUFCFG, FMAC_YBUFCFG_Y_BUF_SIZE, ((uint32_t)BufferSize) << FMAC_YBUFCFG_Y_BUF_SIZE_Pos); 00328 } 00329 00330 /** 00331 * @brief Return Y buffer size. 00332 * @rmtoll YBUFCFG Y_BUF_SIZE LL_FMAC_GetYBufferSize 00333 * @param FMACx FMAC instance 00334 * @retval uint8_t Number of 16-bit words allocated to the output buffer 00335 * (including the optional "headroom" - value between Min_Data=0x01 and Max_Data=0xFF). 00336 */ 00337 __STATIC_INLINE uint8_t LL_FMAC_GetYBufferSize(FMAC_TypeDef *FMACx) 00338 { 00339 return (uint8_t)(READ_BIT(FMACx->YBUFCFG, FMAC_YBUFCFG_Y_BUF_SIZE) >> FMAC_YBUFCFG_Y_BUF_SIZE_Pos); 00340 } 00341 00342 /** 00343 * @brief Configure Y base. 00344 * @rmtoll YBUFCFG Y_BASE LL_FMAC_SetYBase 00345 * @param FMACx FMAC instance 00346 * @param Base Base address of the output buffer (Y) within the internal memory. 00347 * This parameter must be a value between Min_Data=0x00 and Max_Data=0xFF. 00348 * @retval None 00349 */ 00350 __STATIC_INLINE void LL_FMAC_SetYBase(FMAC_TypeDef *FMACx, uint8_t Base) 00351 { 00352 MODIFY_REG(FMACx->YBUFCFG, FMAC_YBUFCFG_Y_BASE, ((uint32_t)Base) << FMAC_YBUFCFG_Y_BASE_Pos); 00353 } 00354 00355 /** 00356 * @brief Return Y base. 00357 * @rmtoll YBUFCFG Y_BASE LL_FMAC_GetYBase 00358 * @param FMACx FMAC instance 00359 * @retval uint8_t Base address of the output buffer (Y) within the internal memory 00360 * (value between Min_Data=0x00 and Max_Data=0xFF). 00361 */ 00362 __STATIC_INLINE uint8_t LL_FMAC_GetYBase(FMAC_TypeDef *FMACx) 00363 { 00364 return (uint8_t)(READ_BIT(FMACx->YBUFCFG, FMAC_YBUFCFG_Y_BASE) >> FMAC_YBUFCFG_Y_BASE_Pos); 00365 } 00366 00367 /** 00368 * @brief Start FMAC processing. 00369 * @rmtoll PARAM START LL_FMAC_EnableStart 00370 * @param FMACx FMAC instance 00371 * @retval None 00372 */ 00373 __STATIC_INLINE void LL_FMAC_EnableStart(FMAC_TypeDef *FMACx) 00374 { 00375 SET_BIT(FMACx->PARAM, FMAC_PARAM_START); 00376 } 00377 00378 /** 00379 * @brief Stop FMAC processing. 00380 * @rmtoll PARAM START LL_FMAC_DisableStart 00381 * @param FMACx FMAC instance 00382 * @retval None 00383 */ 00384 __STATIC_INLINE void LL_FMAC_DisableStart(FMAC_TypeDef *FMACx) 00385 { 00386 CLEAR_BIT(FMACx->PARAM, FMAC_PARAM_START); 00387 } 00388 00389 /** 00390 * @brief Check the state of FMAC processing. 00391 * @rmtoll PARAM START LL_FMAC_IsEnabledStart 00392 * @param FMACx FMAC instance 00393 * @retval uint32_t State of bit (1 or 0). 00394 */ 00395 __STATIC_INLINE uint32_t LL_FMAC_IsEnabledStart(FMAC_TypeDef *FMACx) 00396 { 00397 return ((READ_BIT(FMACx->PARAM, FMAC_PARAM_START) == (FMAC_PARAM_START)) ? 1UL : 0UL); 00398 } 00399 00400 /** 00401 * @brief Configure function. 00402 * @rmtoll PARAM FUNC LL_FMAC_SetFunction 00403 * @param FMACx FMAC instance 00404 * @param Function This parameter can be one of the following values: 00405 * @arg @ref LL_FMAC_FUNC_LOAD_X1 00406 * @arg @ref LL_FMAC_FUNC_LOAD_X2 00407 * @arg @ref LL_FMAC_FUNC_LOAD_Y 00408 * @arg @ref LL_FMAC_FUNC_CONVO_FIR 00409 * @arg @ref LL_FMAC_FUNC_IIR_DIRECT_FORM_1 00410 * @retval None 00411 */ 00412 __STATIC_INLINE void LL_FMAC_SetFunction(FMAC_TypeDef *FMACx, uint32_t Function) 00413 { 00414 MODIFY_REG(FMACx->PARAM, FMAC_PARAM_FUNC, Function); 00415 } 00416 00417 /** 00418 * @brief Return function. 00419 * @rmtoll PARAM FUNC LL_FMAC_GetFunction 00420 * @param FMACx FMAC instance 00421 * @retval uint32_t Returned value can be one of the following values: 00422 * @arg @ref LL_FMAC_FUNC_LOAD_X1 00423 * @arg @ref LL_FMAC_FUNC_LOAD_X2 00424 * @arg @ref LL_FMAC_FUNC_LOAD_Y 00425 * @arg @ref LL_FMAC_FUNC_CONVO_FIR 00426 * @arg @ref LL_FMAC_FUNC_IIR_DIRECT_FORM_1 00427 */ 00428 __STATIC_INLINE uint32_t LL_FMAC_GetFunction(FMAC_TypeDef *FMACx) 00429 { 00430 return (uint32_t)(READ_BIT(FMACx->PARAM, FMAC_PARAM_FUNC)); 00431 } 00432 00433 /** 00434 * @brief Configure input parameter R. 00435 * @rmtoll PARAM R LL_FMAC_SetParamR 00436 * @param FMACx FMAC instance 00437 * @param Param Parameter R (gain, etc.). 00438 * This parameter must be a value between Min_Data=0x00 and Max_Data=0xFF. 00439 * @retval None 00440 */ 00441 __STATIC_INLINE void LL_FMAC_SetParamR(FMAC_TypeDef *FMACx, uint8_t Param) 00442 { 00443 MODIFY_REG(FMACx->PARAM, FMAC_PARAM_R, ((uint32_t)Param) << FMAC_PARAM_R_Pos); 00444 } 00445 00446 /** 00447 * @brief Return input parameter R. 00448 * @rmtoll PARAM R LL_FMAC_GetParamR 00449 * @param FMACx FMAC instance 00450 * @retval uint8_t Parameter R (gain, etc.) (value between Min_Data=0x00 and Max_Data=0xFF). 00451 */ 00452 __STATIC_INLINE uint8_t LL_FMAC_GetParamR(FMAC_TypeDef *FMACx) 00453 { 00454 return (uint8_t)(READ_BIT(FMACx->PARAM, FMAC_PARAM_R) >> FMAC_PARAM_R_Pos); 00455 } 00456 00457 /** 00458 * @brief Configure input parameter Q. 00459 * @rmtoll PARAM Q LL_FMAC_SetParamQ 00460 * @param FMACx FMAC instance 00461 * @param Param Parameter Q (vector length, etc.). 00462 * This parameter must be a value between Min_Data=0x00 and Max_Data=0xFF. 00463 * @retval None 00464 */ 00465 __STATIC_INLINE void LL_FMAC_SetParamQ(FMAC_TypeDef *FMACx, uint8_t Param) 00466 { 00467 MODIFY_REG(FMACx->PARAM, FMAC_PARAM_Q, ((uint32_t)Param) << FMAC_PARAM_Q_Pos); 00468 } 00469 00470 /** 00471 * @brief Return input parameter Q. 00472 * @rmtoll PARAM Q LL_FMAC_GetParamQ 00473 * @param FMACx FMAC instance 00474 * @retval uint8_t Parameter Q (vector length, etc.) (value between Min_Data=0x00 and Max_Data=0xFF). 00475 */ 00476 __STATIC_INLINE uint8_t LL_FMAC_GetParamQ(FMAC_TypeDef *FMACx) 00477 { 00478 return (uint8_t)(READ_BIT(FMACx->PARAM, FMAC_PARAM_Q) >> FMAC_PARAM_Q_Pos); 00479 } 00480 00481 /** 00482 * @brief Configure input parameter P. 00483 * @rmtoll PARAM P LL_FMAC_SetParamP 00484 * @param FMACx FMAC instance 00485 * @param Param Parameter P (vector length, number of filter taps, etc.). 00486 * This parameter must be a value between Min_Data=0x00 and Max_Data=0xFF. 00487 * @retval None 00488 */ 00489 __STATIC_INLINE void LL_FMAC_SetParamP(FMAC_TypeDef *FMACx, uint8_t Param) 00490 { 00491 MODIFY_REG(FMACx->PARAM, FMAC_PARAM_P, ((uint32_t)Param)); 00492 } 00493 00494 /** 00495 * @brief Return input parameter P. 00496 * @rmtoll PARAM P LL_FMAC_GetParamP 00497 * @param FMACx FMAC instance 00498 * @retval uint8_t Parameter P (vector length, number of filter taps, etc.) 00499 * (value between Min_Data=0x00 and Max_Data=0xFF). 00500 */ 00501 __STATIC_INLINE uint8_t LL_FMAC_GetParamP(FMAC_TypeDef *FMACx) 00502 { 00503 return (uint8_t)(READ_BIT(FMACx->PARAM, FMAC_PARAM_P)); 00504 } 00505 00506 /** 00507 * @} 00508 */ 00509 00510 /** @defgroup FMAC_LL_EF_Reset_Management Reset_Management 00511 * @{ 00512 */ 00513 00514 /** 00515 * @brief Start the FMAC reset. 00516 * @rmtoll CR RESET LL_FMAC_EnableReset 00517 * @param FMACx FMAC instance 00518 * @retval None 00519 */ 00520 __STATIC_INLINE void LL_FMAC_EnableReset(FMAC_TypeDef *FMACx) 00521 { 00522 SET_BIT(FMACx->CR, FMAC_CR_RESET); 00523 } 00524 00525 /** 00526 * @brief Check the state of the FMAC reset. 00527 * @rmtoll CR RESET LL_FMAC_IsEnabledReset 00528 * @param FMACx FMAC instance 00529 * @retval uint32_t State of bit (1 or 0). 00530 */ 00531 __STATIC_INLINE uint32_t LL_FMAC_IsEnabledReset(FMAC_TypeDef *FMACx) 00532 { 00533 return ((READ_BIT(FMACx->CR, FMAC_CR_RESET) == (FMAC_CR_RESET)) ? 1UL : 0UL); 00534 } 00535 00536 /** 00537 * @} 00538 */ 00539 00540 /** @defgroup FMAC_LL_EF_Configuration FMAC Configuration functions 00541 * @{ 00542 */ 00543 00544 /** 00545 * @brief Enable Clipping. 00546 * @rmtoll CR CLIPEN LL_FMAC_EnableClipping 00547 * @param FMACx FMAC instance 00548 * @retval None 00549 */ 00550 __STATIC_INLINE void LL_FMAC_EnableClipping(FMAC_TypeDef *FMACx) 00551 { 00552 SET_BIT(FMACx->CR, FMAC_CR_CLIPEN); 00553 } 00554 00555 /** 00556 * @brief Disable Clipping. 00557 * @rmtoll CR CLIPEN LL_FMAC_DisableClipping 00558 * @param FMACx FMAC instance 00559 * @retval None 00560 */ 00561 __STATIC_INLINE void LL_FMAC_DisableClipping(FMAC_TypeDef *FMACx) 00562 { 00563 CLEAR_BIT(FMACx->CR, FMAC_CR_CLIPEN); 00564 } 00565 00566 /** 00567 * @brief Check Clipping State. 00568 * @rmtoll CR CLIPEN LL_FMAC_IsEnabledClipping 00569 * @param FMACx FMAC instance 00570 * @retval uint32_t State of bit (1 or 0). 00571 */ 00572 __STATIC_INLINE uint32_t LL_FMAC_IsEnabledClipping(FMAC_TypeDef *FMACx) 00573 { 00574 return ((READ_BIT(FMACx->CR, FMAC_CR_CLIPEN) == (FMAC_CR_CLIPEN)) ? 1UL : 0UL); 00575 } 00576 00577 /** 00578 * @} 00579 */ 00580 00581 /** @defgroup FMAC_LL_EF_DMA_Management DMA_Management 00582 * @{ 00583 */ 00584 00585 /** 00586 * @brief Enable FMAC DMA write channel request. 00587 * @rmtoll CR DMAWEN LL_FMAC_EnableDMAReq_WRITE 00588 * @param FMACx FMAC instance 00589 * @retval None 00590 */ 00591 __STATIC_INLINE void LL_FMAC_EnableDMAReq_WRITE(FMAC_TypeDef *FMACx) 00592 { 00593 SET_BIT(FMACx->CR, FMAC_CR_DMAWEN); 00594 } 00595 00596 /** 00597 * @brief Disable FMAC DMA write channel request. 00598 * @rmtoll CR DMAWEN LL_FMAC_DisableDMAReq_WRITE 00599 * @param FMACx FMAC instance 00600 * @retval None 00601 */ 00602 __STATIC_INLINE void LL_FMAC_DisableDMAReq_WRITE(FMAC_TypeDef *FMACx) 00603 { 00604 CLEAR_BIT(FMACx->CR, FMAC_CR_DMAWEN); 00605 } 00606 00607 /** 00608 * @brief Check FMAC DMA write channel request state. 00609 * @rmtoll CR DMAWEN LL_FMAC_IsEnabledDMAReq_WRITE 00610 * @param FMACx FMAC instance 00611 * @retval uint32_t State of bit (1 or 0). 00612 */ 00613 __STATIC_INLINE uint32_t LL_FMAC_IsEnabledDMAReq_WRITE(FMAC_TypeDef *FMACx) 00614 { 00615 return ((READ_BIT(FMACx->CR, FMAC_CR_DMAWEN) == (FMAC_CR_DMAWEN)) ? 1UL : 0UL); 00616 } 00617 00618 /** 00619 * @brief Enable FMAC DMA read channel request. 00620 * @rmtoll CR DMAREN LL_FMAC_EnableDMAReq_READ 00621 * @param FMACx FMAC instance 00622 * @retval None 00623 */ 00624 __STATIC_INLINE void LL_FMAC_EnableDMAReq_READ(FMAC_TypeDef *FMACx) 00625 { 00626 SET_BIT(FMACx->CR, FMAC_CR_DMAREN); 00627 } 00628 00629 /** 00630 * @brief Disable FMAC DMA read channel request. 00631 * @rmtoll CR DMAREN LL_FMAC_DisableDMAReq_READ 00632 * @param FMACx FMAC instance 00633 * @retval None 00634 */ 00635 __STATIC_INLINE void LL_FMAC_DisableDMAReq_READ(FMAC_TypeDef *FMACx) 00636 { 00637 CLEAR_BIT(FMACx->CR, FMAC_CR_DMAREN); 00638 } 00639 00640 /** 00641 * @brief Check FMAC DMA read channel request state. 00642 * @rmtoll CR DMAREN LL_FMAC_IsEnabledDMAReq_READ 00643 * @param FMACx FMAC instance 00644 * @retval uint32_t State of bit (1 or 0). 00645 */ 00646 __STATIC_INLINE uint32_t LL_FMAC_IsEnabledDMAReq_READ(FMAC_TypeDef *FMACx) 00647 { 00648 return ((READ_BIT(FMACx->CR, FMAC_CR_DMAREN) == (FMAC_CR_DMAREN)) ? 1UL : 0UL); 00649 } 00650 00651 /** 00652 * @} 00653 */ 00654 00655 /** @defgroup FMAC_LL_EF_IT_Management IT_Management 00656 * @{ 00657 */ 00658 00659 /** 00660 * @brief Enable FMAC saturation error interrupt. 00661 * @rmtoll CR SATIEN LL_FMAC_EnableIT_SAT 00662 * @param FMACx FMAC instance 00663 * @retval None 00664 */ 00665 __STATIC_INLINE void LL_FMAC_EnableIT_SAT(FMAC_TypeDef *FMACx) 00666 { 00667 SET_BIT(FMACx->CR, FMAC_CR_SATIEN); 00668 } 00669 00670 /** 00671 * @brief Disable FMAC saturation error interrupt. 00672 * @rmtoll CR SATIEN LL_FMAC_DisableIT_SAT 00673 * @param FMACx FMAC instance 00674 * @retval None 00675 */ 00676 __STATIC_INLINE void LL_FMAC_DisableIT_SAT(FMAC_TypeDef *FMACx) 00677 { 00678 CLEAR_BIT(FMACx->CR, FMAC_CR_SATIEN); 00679 } 00680 00681 /** 00682 * @brief Check FMAC saturation error interrupt state. 00683 * @rmtoll CR SATIEN LL_FMAC_IsEnabledIT_SAT 00684 * @param FMACx FMAC instance 00685 * @retval uint32_t State of bit (1 or 0). 00686 */ 00687 __STATIC_INLINE uint32_t LL_FMAC_IsEnabledIT_SAT(FMAC_TypeDef *FMACx) 00688 { 00689 return ((READ_BIT(FMACx->CR, FMAC_CR_SATIEN) == (FMAC_CR_SATIEN)) ? 1UL : 0UL); 00690 } 00691 00692 /** 00693 * @brief Enable FMAC underflow error interrupt. 00694 * @rmtoll CR UNFLIEN LL_FMAC_EnableIT_UNFL 00695 * @param FMACx FMAC instance 00696 * @retval None 00697 */ 00698 __STATIC_INLINE void LL_FMAC_EnableIT_UNFL(FMAC_TypeDef *FMACx) 00699 { 00700 SET_BIT(FMACx->CR, FMAC_CR_UNFLIEN); 00701 } 00702 00703 /** 00704 * @brief Disable FMAC underflow error interrupt. 00705 * @rmtoll CR UNFLIEN LL_FMAC_DisableIT_UNFL 00706 * @param FMACx FMAC instance 00707 * @retval None 00708 */ 00709 __STATIC_INLINE void LL_FMAC_DisableIT_UNFL(FMAC_TypeDef *FMACx) 00710 { 00711 CLEAR_BIT(FMACx->CR, FMAC_CR_UNFLIEN); 00712 } 00713 00714 /** 00715 * @brief Check FMAC underflow error interrupt state. 00716 * @rmtoll CR UNFLIEN LL_FMAC_IsEnabledIT_UNFL 00717 * @param FMACx FMAC instance 00718 * @retval uint32_t State of bit (1 or 0). 00719 */ 00720 __STATIC_INLINE uint32_t LL_FMAC_IsEnabledIT_UNFL(FMAC_TypeDef *FMACx) 00721 { 00722 return ((READ_BIT(FMACx->CR, FMAC_CR_UNFLIEN) == (FMAC_CR_UNFLIEN)) ? 1UL : 0UL); 00723 } 00724 00725 /** 00726 * @brief Enable FMAC overflow error interrupt. 00727 * @rmtoll CR OVFLIEN LL_FMAC_EnableIT_OVFL 00728 * @param FMACx FMAC instance 00729 * @retval None 00730 */ 00731 __STATIC_INLINE void LL_FMAC_EnableIT_OVFL(FMAC_TypeDef *FMACx) 00732 { 00733 SET_BIT(FMACx->CR, FMAC_CR_OVFLIEN); 00734 } 00735 00736 /** 00737 * @brief Disable FMAC overflow error interrupt. 00738 * @rmtoll CR OVFLIEN LL_FMAC_DisableIT_OVFL 00739 * @param FMACx FMAC instance 00740 * @retval None 00741 */ 00742 __STATIC_INLINE void LL_FMAC_DisableIT_OVFL(FMAC_TypeDef *FMACx) 00743 { 00744 CLEAR_BIT(FMACx->CR, FMAC_CR_OVFLIEN); 00745 } 00746 00747 /** 00748 * @brief Check FMAC overflow error interrupt state. 00749 * @rmtoll CR OVFLIEN LL_FMAC_IsEnabledIT_OVFL 00750 * @param FMACx FMAC instance 00751 * @retval uint32_t State of bit (1 or 0). 00752 */ 00753 __STATIC_INLINE uint32_t LL_FMAC_IsEnabledIT_OVFL(FMAC_TypeDef *FMACx) 00754 { 00755 return ((READ_BIT(FMACx->CR, FMAC_CR_OVFLIEN) == (FMAC_CR_OVFLIEN)) ? 1UL : 0UL); 00756 } 00757 00758 /** 00759 * @brief Enable FMAC write interrupt. 00760 * @rmtoll CR WIEN LL_FMAC_EnableIT_WR 00761 * @param FMACx FMAC instance 00762 * @retval None 00763 */ 00764 __STATIC_INLINE void LL_FMAC_EnableIT_WR(FMAC_TypeDef *FMACx) 00765 { 00766 SET_BIT(FMACx->CR, FMAC_CR_WIEN); 00767 } 00768 00769 /** 00770 * @brief Disable FMAC write interrupt. 00771 * @rmtoll CR WIEN LL_FMAC_DisableIT_WR 00772 * @param FMACx FMAC instance 00773 * @retval None 00774 */ 00775 __STATIC_INLINE void LL_FMAC_DisableIT_WR(FMAC_TypeDef *FMACx) 00776 { 00777 CLEAR_BIT(FMACx->CR, FMAC_CR_WIEN); 00778 } 00779 00780 /** 00781 * @brief Check FMAC write interrupt state. 00782 * @rmtoll CR WIEN LL_FMAC_IsEnabledIT_WR 00783 * @param FMACx FMAC instance 00784 * @retval uint32_t State of bit (1 or 0). 00785 */ 00786 __STATIC_INLINE uint32_t LL_FMAC_IsEnabledIT_WR(FMAC_TypeDef *FMACx) 00787 { 00788 return ((READ_BIT(FMACx->CR, FMAC_CR_WIEN) == (FMAC_CR_WIEN)) ? 1UL : 0UL); 00789 } 00790 00791 /** 00792 * @brief Enable FMAC read interrupt. 00793 * @rmtoll CR RIEN LL_FMAC_EnableIT_RD 00794 * @param FMACx FMAC instance 00795 * @retval None 00796 */ 00797 __STATIC_INLINE void LL_FMAC_EnableIT_RD(FMAC_TypeDef *FMACx) 00798 { 00799 SET_BIT(FMACx->CR, FMAC_CR_RIEN); 00800 } 00801 00802 /** 00803 * @brief Disable FMAC read interrupt. 00804 * @rmtoll CR RIEN LL_FMAC_DisableIT_RD 00805 * @param FMACx FMAC instance 00806 * @retval None 00807 */ 00808 __STATIC_INLINE void LL_FMAC_DisableIT_RD(FMAC_TypeDef *FMACx) 00809 { 00810 CLEAR_BIT(FMACx->CR, FMAC_CR_RIEN); 00811 } 00812 00813 /** 00814 * @brief Check FMAC read interrupt state. 00815 * @rmtoll CR RIEN LL_FMAC_IsEnabledIT_RD 00816 * @param FMACx FMAC instance 00817 * @retval uint32_t State of bit (1 or 0). 00818 */ 00819 __STATIC_INLINE uint32_t LL_FMAC_IsEnabledIT_RD(FMAC_TypeDef *FMACx) 00820 { 00821 return ((READ_BIT(FMACx->CR, FMAC_CR_RIEN) == (FMAC_CR_RIEN)) ? 1UL : 0UL); 00822 } 00823 00824 /** 00825 * @} 00826 */ 00827 00828 /** @defgroup FMAC_LL_EF_FLAG_Management FLAG_Management 00829 * @{ 00830 */ 00831 00832 /** 00833 * @brief Check FMAC saturation error flag state. 00834 * @rmtoll SR SAT LL_FMAC_IsActiveFlag_SAT 00835 * @param FMACx FMAC instance 00836 * @retval uint32_t State of bit (1 or 0). 00837 */ 00838 __STATIC_INLINE uint32_t LL_FMAC_IsActiveFlag_SAT(FMAC_TypeDef *FMACx) 00839 { 00840 return ((READ_BIT(FMACx->SR, FMAC_SR_SAT) == (FMAC_SR_SAT)) ? 1UL : 0UL); 00841 } 00842 00843 /** 00844 * @brief Check FMAC underflow error flag state. 00845 * @rmtoll SR UNFL LL_FMAC_IsActiveFlag_UNFL 00846 * @param FMACx FMAC instance 00847 * @retval uint32_t State of bit (1 or 0). 00848 */ 00849 __STATIC_INLINE uint32_t LL_FMAC_IsActiveFlag_UNFL(FMAC_TypeDef *FMACx) 00850 { 00851 return ((READ_BIT(FMACx->SR, FMAC_SR_UNFL) == (FMAC_SR_UNFL)) ? 1UL : 0UL); 00852 } 00853 00854 /** 00855 * @brief Check FMAC overflow error flag state. 00856 * @rmtoll SR OVFL LL_FMAC_IsActiveFlag_OVFL 00857 * @param FMACx FMAC instance 00858 * @retval uint32_t State of bit (1 or 0). 00859 */ 00860 __STATIC_INLINE uint32_t LL_FMAC_IsActiveFlag_OVFL(FMAC_TypeDef *FMACx) 00861 { 00862 return ((READ_BIT(FMACx->SR, FMAC_SR_OVFL) == (FMAC_SR_OVFL)) ? 1UL : 0UL); 00863 } 00864 00865 /** 00866 * @brief Check FMAC X1 buffer full flag state. 00867 * @rmtoll SR X1FULL LL_FMAC_IsActiveFlag_X1FULL 00868 * @param FMACx FMAC instance 00869 * @retval uint32_t State of bit (1 or 0). 00870 */ 00871 __STATIC_INLINE uint32_t LL_FMAC_IsActiveFlag_X1FULL(FMAC_TypeDef *FMACx) 00872 { 00873 return ((READ_BIT(FMACx->SR, FMAC_SR_X1FULL) == (FMAC_SR_X1FULL)) ? 1UL : 0UL); 00874 } 00875 00876 /** 00877 * @brief Check FMAC Y buffer empty flag state. 00878 * @rmtoll SR YEMPTY LL_FMAC_IsActiveFlag_YEMPTY 00879 * @param FMACx FMAC instance 00880 * @retval uint32_t State of bit (1 or 0). 00881 */ 00882 __STATIC_INLINE uint32_t LL_FMAC_IsActiveFlag_YEMPTY(FMAC_TypeDef *FMACx) 00883 { 00884 return ((READ_BIT(FMACx->SR, FMAC_SR_YEMPTY) == (FMAC_SR_YEMPTY)) ? 1UL : 0UL); 00885 } 00886 00887 /** 00888 * @} 00889 */ 00890 00891 /** @defgroup FMAC_LL_EF_Data_Management Data_Management 00892 * @{ 00893 */ 00894 00895 /** 00896 * @brief Write 16-bit input data for the FMAC processing. 00897 * @rmtoll WDATA WDATA LL_FMAC_WriteData 00898 * @param FMACx FMAC instance 00899 * @param InData 16-bit value to be provided as input data for FMAC processing. 00900 * This parameter must be a number between Min_Data=0x0000 and Max_Data=0xFFFF. 00901 * @retval None 00902 */ 00903 __STATIC_INLINE void LL_FMAC_WriteData(FMAC_TypeDef *FMACx, uint16_t InData) 00904 { 00905 WRITE_REG(FMACx->WDATA, InData); 00906 } 00907 00908 /** 00909 * @brief Return 16-bit output data of FMAC processing. 00910 * @rmtoll RDATA RDATA LL_FMAC_ReadData 00911 * @param FMACx FMAC instance 00912 * @retval uint16_t 16-bit output data of FMAC processing (value between Min_Data=0x0000 and Max_Data=0xFFFF). 00913 */ 00914 __STATIC_INLINE uint16_t LL_FMAC_ReadData(FMAC_TypeDef *FMACx) 00915 { 00916 return (uint16_t)(READ_REG(FMACx->RDATA)); 00917 } 00918 00919 /** 00920 * @} 00921 */ 00922 00923 /** @defgroup FMAC_LL_EF_Configuration FMAC Configuration functions 00924 * @{ 00925 */ 00926 00927 /** 00928 * @brief Configure memory for X1 buffer. 00929 * @rmtoll X1BUFCFG FULL_WM LL_FMAC_ConfigX1\n 00930 * X1BUFCFG X1_BASE LL_FMAC_ConfigX1\n 00931 * X1BUFCFG X1_BUF_SIZE LL_FMAC_ConfigX1 00932 * @param FMACx FMAC instance 00933 * @param Watermark This parameter can be one of the following values: 00934 * @arg @ref LL_FMAC_WM_0_THRESHOLD_1 00935 * @arg @ref LL_FMAC_WM_1_THRESHOLD_2 00936 * @arg @ref LL_FMAC_WM_2_THRESHOLD_4 00937 * @arg @ref LL_FMAC_WM_3_THRESHOLD_8 00938 * @param Base Base address of the input buffer (X1) within the internal memory. 00939 * This parameter must be a value between Min_Data=0x00 and Max_Data=0xFF. 00940 * @param BufferSize Number of 16-bit words allocated to the input buffer (including the optional "headroom"). 00941 * This parameter must be a number between Min_Data=0x01 and Max_Data=0xFF. 00942 * @retval None 00943 */ 00944 __STATIC_INLINE void LL_FMAC_ConfigX1(FMAC_TypeDef *FMACx, uint32_t Watermark, uint8_t Base, uint8_t BufferSize) 00945 { 00946 MODIFY_REG(FMACx->X1BUFCFG, FMAC_X1BUFCFG_FULL_WM | FMAC_X1BUFCFG_X1_BASE | FMAC_X1BUFCFG_X1_BUF_SIZE, 00947 Watermark | (((uint32_t)Base) << FMAC_X1BUFCFG_X1_BASE_Pos) | 00948 (((uint32_t)BufferSize) << FMAC_X1BUFCFG_X1_BUF_SIZE_Pos)); 00949 } 00950 00951 /** 00952 * @brief Configure memory for X2 buffer. 00953 * @rmtoll X2BUFCFG X2_BASE LL_FMAC_ConfigX2\n 00954 * X2BUFCFG X2_BUF_SIZE LL_FMAC_ConfigX2 00955 * @param FMACx FMAC instance 00956 * @param Base Base address of the coefficient buffer (X2) within the internal memory. 00957 * This parameter must be a value between Min_Data=0x00 and Max_Data=0xFF. 00958 * @param BufferSize Number of 16-bit words allocated to the coefficient buffer. 00959 * This parameter must be a number between Min_Data=0x01 and Max_Data=0xFF. 00960 * @retval None 00961 */ 00962 __STATIC_INLINE void LL_FMAC_ConfigX2(FMAC_TypeDef *FMACx, uint8_t Base, uint8_t BufferSize) 00963 { 00964 MODIFY_REG(FMACx->X2BUFCFG, FMAC_X2BUFCFG_X2_BASE | FMAC_X2BUFCFG_X2_BUF_SIZE, 00965 (((uint32_t)Base) << FMAC_X2BUFCFG_X2_BASE_Pos) | 00966 (((uint32_t)BufferSize) << FMAC_X2BUFCFG_X2_BUF_SIZE_Pos)); 00967 } 00968 00969 /** 00970 * @brief Configure memory for Y buffer. 00971 * @rmtoll YBUFCFG EMPTY_WM LL_FMAC_ConfigY\n 00972 * YBUFCFG Y_BASE LL_FMAC_ConfigY\n 00973 * YBUFCFG Y_BUF_SIZE LL_FMAC_ConfigY 00974 * @param FMACx FMAC instance 00975 * @param Watermark This parameter can be one of the following values: 00976 * @arg @ref LL_FMAC_WM_0_THRESHOLD_1 00977 * @arg @ref LL_FMAC_WM_1_THRESHOLD_2 00978 * @arg @ref LL_FMAC_WM_2_THRESHOLD_4 00979 * @arg @ref LL_FMAC_WM_3_THRESHOLD_8 00980 * @param Base Base address of the output buffer (Y) within the internal memory. 00981 * This parameter must be a value between Min_Data=0x00 and Max_Data=0xFF. 00982 * @param BufferSize Number of 16-bit words allocated to the output buffer (including the optional "headroom"). 00983 * This parameter must be a number between Min_Data=0x01 and Max_Data=0xFF. 00984 * @retval None 00985 */ 00986 __STATIC_INLINE void LL_FMAC_ConfigY(FMAC_TypeDef *FMACx, uint32_t Watermark, uint8_t Base, uint8_t BufferSize) 00987 { 00988 MODIFY_REG(FMACx->YBUFCFG, FMAC_YBUFCFG_EMPTY_WM | FMAC_YBUFCFG_Y_BASE | FMAC_YBUFCFG_Y_BUF_SIZE, 00989 Watermark | (((uint32_t)Base) << FMAC_YBUFCFG_Y_BASE_Pos) | 00990 (((uint32_t)BufferSize) << FMAC_YBUFCFG_Y_BUF_SIZE_Pos)); 00991 } 00992 00993 /** 00994 * @brief Configure the FMAC processing. 00995 * @rmtoll PARAM START LL_FMAC_ConfigFunc\n 00996 * PARAM FUNC LL_FMAC_ConfigFunc\n 00997 * PARAM P LL_FMAC_ConfigFunc\n 00998 * PARAM Q LL_FMAC_ConfigFunc\n 00999 * PARAM R LL_FMAC_ConfigFunc 01000 * @param FMACx FMAC instance 01001 * @param Start This parameter can be one of the following values: 01002 * @arg @ref LL_FMAC_PROCESSING_STOP 01003 * @arg @ref LL_FMAC_PROCESSING_START 01004 * @param Function This parameter can be one of the following values: 01005 * @arg @ref LL_FMAC_FUNC_LOAD_X1 01006 * @arg @ref LL_FMAC_FUNC_LOAD_X2 01007 * @arg @ref LL_FMAC_FUNC_LOAD_Y 01008 * @arg @ref LL_FMAC_FUNC_CONVO_FIR 01009 * @arg @ref LL_FMAC_FUNC_IIR_DIRECT_FORM_1 01010 * @param ParamP Parameter P (vector length, number of filter taps, etc.). 01011 * This parameter must be a value between Min_Data=0x00 and Max_Data=0xFF. 01012 * @param ParamQ Parameter Q (vector length, etc.). 01013 * This parameter must be a value between Min_Data=0x00 and Max_Data=0xFF. 01014 * @param ParamR Parameter R (gain, etc.). 01015 * This parameter must be a value between Min_Data=0x00 and Max_Data=0xFF. 01016 * @retval None 01017 */ 01018 __STATIC_INLINE void LL_FMAC_ConfigFunc(FMAC_TypeDef *FMACx, uint8_t Start, uint32_t Function, uint8_t ParamP, 01019 uint8_t ParamQ, uint8_t ParamR) 01020 { 01021 MODIFY_REG(FMACx->PARAM, FMAC_PARAM_START | FMAC_PARAM_FUNC | FMAC_PARAM_P | FMAC_PARAM_Q | FMAC_PARAM_R, 01022 (((uint32_t)Start) << FMAC_PARAM_START_Pos) | Function | (((uint32_t)ParamP) << FMAC_PARAM_P_Pos) | 01023 (((uint32_t)ParamQ) << FMAC_PARAM_Q_Pos) | (((uint32_t)ParamR) << FMAC_PARAM_R_Pos)); 01024 } 01025 01026 /** 01027 * @} 01028 */ 01029 01030 01031 01032 #if defined(USE_FULL_LL_DRIVER) 01033 /** @defgroup FMAC_LL_EF_Init Initialization and de-initialization functions 01034 * @{ 01035 */ 01036 ErrorStatus LL_FMAC_Init(FMAC_TypeDef *FMACx); 01037 ErrorStatus LL_FMAC_DeInit(FMAC_TypeDef *FMACx); 01038 01039 01040 /** 01041 * @} 01042 */ 01043 #endif /* USE_FULL_LL_DRIVER */ 01044 01045 /** 01046 * @} 01047 */ 01048 01049 /** 01050 * @} 01051 */ 01052 01053 #endif /* defined(FMAC) */ 01054 01055 /** 01056 * @} 01057 */ 01058 01059 #ifdef __cplusplus 01060 } 01061 #endif 01062 01063 #endif /* STM32H7xx_LL_FMAC_H */