cancel
Showing results for 
Search instead for 
Did you mean: 

port the STEVAL-STWINBX1 firmware to my custom hardware

dzf
Associate II

Hi,

I’m now trying to port the STEVAL-STWINBX1 firmware to my custom hardware whose MCU is STM32U575VGT6. 
I started by porting the data logging application:

fp-sns-datalog2\STM32CubeFunctionPack_DATALOG2_V3.1.0\Projects\STM32U585AI-STWIN.box\Applications\DATALOG2
During execution the following code gets stuck,and eventually returns HAL_ERROR.

/* Wait for calibration completion */
while (LL_ADC_IsCalibrationOnGoing(hadc->Instance) != 0UL)
{
wait_loop_index++;
if (wait_loop_index >= ADC_CALIBRATION_TIMEOUT)
{
/* Update ADC state machine to error */
ADC_STATE_CLR_SET(hadc->State, HAL_ADC_STATE_BUSY_INTERNAL, HAL_ADC_STATE_ERROR_INTERNAL);

__HAL_UNLOCK(hadc);

return HAL_ERROR;
}

I’ve verified that the hardware is fine with my own test program (DAC generates a sine wave, ADC samples it, and I print the data over USART).  I’m not sure what’s wrong—could you give me some suggestions?

zefang

0 REPLIES 0