I'm trying to kick off the ADC via Timer1 at 9600 sps for 4 channels.
I have it all working -- once, but I think I'm (ab)using the HAL wrong;
I tried to put the kick off code in a function in main called
I then relocated it to the TIM1_BRK_UP_TRG_COM_IRQHandler like this:
/* USER CODE BEGIN TIM1_BRK_UP_TRG_COM_IRQn 0 */
//--This only gets called once?
//Trigger a LED Pin so I can see the frequency (should be 9600)
//Tell the ADC to start a scan and populate it.
HAL_ADC_Start_DMA(&hadc, (uint32_t *)&adc, 4);
//We catch the end of AD Conversion in the ADCScanCompleted interrupt.
/* USER CODE END TIM1_BRK_UP_TRG_COM_IRQn 0 */
/* USER CODE BEGIN TIM1_BRK_UP_TRG_COM_IRQn 1 */
/* USER CODE END TIM1_BRK_UP_TRG_COM_IRQn 1 */
But that only gets called once (when I execute HAL_TIM_Base_Start_IT(&htim1) in main), not every 5000 counts.
What am I missing (Keil uVision 5.3)?
Update: I got it repeating (I had Prescalar and Period mixed up from the cube). But I still don't know why I have to put the code in the ISR and not in a Callback...