Prusa MINI Firmware overview
Collaboration diagram for HSI Configuration:

Macros

#define __HAL_RCC_HSI_ENABLE()   (*(__IO uint32_t *) RCC_CR_HSION_BB = ENABLE)
 Macros to enable or disable the Internal High Speed oscillator (HSI). More...
 
#define __HAL_RCC_HSI_DISABLE()   (*(__IO uint32_t *) RCC_CR_HSION_BB = DISABLE)
 
#define __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(__HSICalibrationValue__)
 Macro to adjust the Internal High Speed oscillator (HSI) calibration value. More...
 

Detailed Description

Macro Definition Documentation

◆ __HAL_RCC_HSI_ENABLE

#define __HAL_RCC_HSI_ENABLE ( )    (*(__IO uint32_t *) RCC_CR_HSION_BB = ENABLE)

Macros to enable or disable the Internal High Speed oscillator (HSI).

Note
The HSI is stopped by hardware when entering STOP and STANDBY modes. It is used (enabled by hardware) as system clock source after startup from Reset, wake-up from STOP and STANDBY mode, or in case of failure of the HSE used directly or indirectly as system clock (if the Clock Security System CSS is enabled).
HSI can not be stopped if it is used as system clock source. In this case, you have to select another source of the system clock then stop the HSI.
After enabling the HSI, the application software should wait on HSIRDY flag to be set indicating that HSI clock is stable and can be used as system clock source. This parameter can be: ENABLE or DISABLE.
When the HSI is stopped, HSIRDY flag goes low after 6 HSI oscillator clock cycles.

◆ __HAL_RCC_HSI_DISABLE

#define __HAL_RCC_HSI_DISABLE ( )    (*(__IO uint32_t *) RCC_CR_HSION_BB = DISABLE)

◆ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST

#define __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST (   __HSICalibrationValue__)
Value:
(MODIFY_REG(RCC->CR,\
RCC_CR_HSITRIM, (uint32_t)(__HSICalibrationValue__) << RCC_CR_HSITRIM_Pos))

Macro to adjust the Internal High Speed oscillator (HSI) calibration value.

Note
The calibration is used to compensate for the variations in voltage and temperature that influence the frequency of the internal HSI RC.
Parameters
<strong>HSICalibrationValue</strong>specifies the calibration trimming value. (default is RCC_HSICALIBRATION_DEFAULT). This parameter must be a number between 0 and 0x1F.