STM32L051K8 with timer triggered multiple ADC +USART (CubeMX + Keil) help needed:
Hello, I'm new to STM32 and I'm trying to use this MCU to do timer triggered multiple ADC sampling at 10Hz. I watched a few youtube guides on this matter which all use STM32F~ discovery boards, and have followed along, but got no good results so far.
I have set
1) enabled timer6 with update event every 100ms (baseclock 2.097mHz, prescaler 2097, counter period 100)
2) enabled ADC In 3-7
3) ADC_regular_conversionMode external trigger source timer6 trigger out event, trigger detection on rising edge
4) DMA continuous requests enabled
then in Keil:
1) uint16_t adcVar[5]
2) in main loop,
HAL_ADC_Start_DMA(&hadc, (uint32_t *)&adcVal, 5);
HAL_TIM_Base_Start(&htim6);
-----
Now I'm wondering how I could send each sample from each channel every 100ms through USART? I have tried using ADC interrupt to do so, but I can't get HAL_UART_Transmit to send the correct data.. any help please?
