2025-03-08 5:23 PM
We recently developed a custom STM32WL5MOCH-based board. The VREF+ output is not supplying anything right now. Also, the GPIOs all read 0V, they do not Push / Pull as configured.
We're using the Visual Studio Code environment and simply imported the CMake project created by CubeMX.
VDDA is measured at 3.3V. VREF+ output is measured at 0.008V.
VREF+ is not connected to anything except the required bypass capacitors (0.1 uF, 4.7uF).
The GPIOs are wired to some LEDs as shown:
We have configured the GPIOs to push and pull.
Occasionally (when it's feeling less buggy), the Visual Studio Code + STLink-V3SET debugger allows us to step through the lines one by one. So we assume the code is executing on the target.
The main.c file is attached, as well as the project configuration file.
We inserted the HAL_GPIO writes inside the default task to test for blinking lights.
void StartDefaultTask(void *argument)
{
/* init code for SubGHz_Phy */
MX_SubGHz_Phy_Init();
/* USER CODE BEGIN 5 */
HAL_GPIO_WritePin(PIN_LED0_GPIO_Port, PIN_LED0_Pin, 1);
HAL_GPIO_WritePin(PIN_LED1_GPIO_Port, PIN_LED1_Pin, 0);
/* Infinite loop */
for(;;)
{
HAL_GPIO_TogglePin(PIN_LED0_GPIO_Port, PIN_LED0_Pin);
HAL_GPIO_TogglePin(PIN_LED1_GPIO_Port, PIN_LED1_Pin);
//HAL_GPIO_WritePin(PIN_LED0_GPIO_Port, PIN_LED0_Pin, 1);
//HAL_GPIO_WritePin(PIN_LED1_GPIO_Port, PIN_LED1_Pin, 0);
osDelay(250);
}
/* USER CODE END 5 */
}
We have tried two different boards now with the same results. What are we missing here?
Thanks,
Damon