Skip to main content
Explorer
November 7, 2025
Question

port the STEVAL-STWINBX1 firmware to my custom hardware

  • November 7, 2025
  • 1 reply
  • 263 views

Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code.

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

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    November 14, 2025

    Hello @dzf 

    I've just downloaded your example and started debugging. I'll come back to you in a few days.

     

    Best regards,

    Simone