cancel
Showing results for 
Search instead for 
Did you mean: 

Noisy ADC Channels and UART issues

Yash Gupte
Associate
Posted on April 24, 2018 at 12:43

Hello,

I have a Nucleo STM32L476RG board. I am using it to read time varying ADC values from 3 channels of ADC1 (PC_0,PC_1,PC_2) and print them as a single comma separated string. Eg. 100,134,130.

Here are a few details:

  1. STM Cube was used to initialize system clock, ADC and UART.
  2. The System Clock runs on HCI crystal at 16MHz.
  3. The ADC also runs on HCI Crystal at 16MHz.
  4. The USART2 is used which has a baud rate of 115200bps.

(STM32_ValuesIssues.png)

0690X0000060AkwQAE.png

The issue is that while printing the ADC values on UART, the data gets disorganized/shabby. 

  1. The waveforms have a lot of noise on them.

      0690X0000060Al1QAE.png

   2. The noise reduces at higher voltages.

         0690X0000060Al6QAE.png

         0690X0000060AhUQAU.png

The ADC uses interrupts to add data into the UART. => Specifications given below. (Query_Docs.docx)

I have attached the ADC,UART and System clock settings along with the HAL_ADC_ConvCplt() function.

Arduino UNO on the other hand provides very smooth waveforms of the same time varying signals

PS. I have tried introducing delays as well as tried to store the ADC Values first and then send the data seperately.

 

#stm32l476 #stm32-adc #stm32-uart
0 REPLIES 0