Skip to content

Commit

Permalink
Set ADC input pins to INPUT mode instead of ANALOG
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralim committed Nov 14, 2024
1 parent 3c54811 commit 24d7742
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/Core/BSP/MHP30/stm32f1xx_hal_msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) {
PB1 ------> ADC2_IN9
*/
GPIO_InitStruct.Pin = TIP_TEMP_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
HAL_GPIO_Init(TIP_TEMP_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = TMP36_INPUT_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
HAL_GPIO_Init(TMP36_INPUT_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = VIN_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
HAL_GPIO_Init(VIN_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = PLATE_SENSOR_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
HAL_GPIO_Init(PLATE_SENSOR_GPIO_Port, &GPIO_InitStruct);

/* ADC2 interrupt Init */
Expand Down

0 comments on commit 24d7742

Please sign in to comment.