cancel
Showing results for 
Search instead for 
Did you mean: 

The device resets and stops responding when PWR_EN is raised high

Rituraj
Associate II

I am using TOF vl53l8cx with stm32wb5mm-dk. I have used this sensor earlier with f407 and it worked completely fine . Now that I am working with a new mcu which only has 1 USART.  I am trying to LPUART for BLE and USART1 for tof BSP.

When the function CUSTOM_RANGING_SENSOR_Init(CUSTOM_VL53L8CX)

int32_t CUSTOM_RANGING_SENSOR_Init(uint32_t Instance)
{
int32_t ret;

if (Instance >= CUSTOM_RANGING_INSTANCES_NBR)
{
ret = BSP_ERROR_WRONG_PARAM;
}
else
{
reset_device();

switch (Instance)
{
#if (USE_CUSTOM_RANGING_VL53L8CX == 1U)
case CUSTOM_VL53L8CX:
if (VL53L8CX_Probe(Instance) != BSP_ERROR_NONE)
{
ret = BSP_ERROR_NO_INIT;
}
else
{
ret = BSP_ERROR_NONE;
}
break;
#endif /* Use custom ranging */
default:
ret = BSP_ERROR_UNKNOWN_COMPONENT;
break;
}
}

return ret;
} is called . The code reaches resetdevice(); function but the inside this function as soon as PWR_EN is raised high the device stops responding. 

0 REPLIES 0