2018-10-31 08:07 PM
I wanted to output Vrefint to PB1 from stm32l100 in one of my project. I followed the procedure in RM0038 Reference manual Page 201
So I did the configuration in my applicaiton as following
void VrefOutEnable(void)
{
GPIO_InitTypeDef GPIO_InitStruct;
__HAL_RCC_GPIOB_CLK_ENABLE();
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
__HAL_RCC_COMP_CLK_ENABLE();
__HAL_SYSCFG_VREFINT_OUT_ENABLE();
// __HAL_RI_SWITCHCONTROLMODE_ENABLE();
// __HAL_RI_SWITCHCONTROLMODE_DISABLE();
__HAL_RI_IOSWITCH_CLOSE(RI_ASCR1_CH_8|RI_ASCR1_CH_9);
}
But I couldn't get the result .
2018-10-31 10:14 PM
__HAL_RI_IOSWITCH_CLOSE(RI_IOSWITCH_CH9);