ok i gotta look into that cause i AM using HAL. but that's for the usb, not for the ADC.
the essential code goes like this:
uint8_t i, v;
uint8_t word[8] = { 'w', 'o', 'r', 'd', 32, 32, 32 };
int main(void)
{
// usb setup-----------------
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_USB_DEVICE_Init();
// ADC setup-----------------
ADC1_Config();
v = 1;
while (1)
{
i = checkVcap(); // <--ADC routine where it hangs
if(v++ % 25 == 0) VCP_write(word, strlen((const char *)word);// <- usb send word
HAL_Delay(10);
v++;
}
}
the ADC1_Config() came from the standard peripheral library. the usb setup routines came from the (puke) stm32CubeMX library. it didn't occur to me that the HAL functions could interfere.
i'll go back and try that.
thanx.