ADC SAMPLING WITHIN TIMER GROUP INTERRUPT

rinripper
Posts: 8
Joined: Wed Jun 28, 2017 3:52 am

ADC SAMPLING WITHIN TIMER GROUP INTERRUPT

Postby rinripper » Sat Jul 22, 2017 12:16 am

Hi, I`m trying to use timer groups to make a interrupt to take a sample from ADC with a regular interval. But code hangs without a error in console.

Thanks in advance.
Mauricio

ESP_Sprite
Posts: 8999
Joined: Thu Nov 26, 2015 4:08 am

Re: ADC SAMPLING WITHIN TIMER GROUP INTERRUPT

Postby ESP_Sprite » Sat Jul 22, 2017 2:09 am

...okay, and what exactly are you trying to do and what is the error exactly?

rinripper
Posts: 8
Joined: Wed Jun 28, 2017 3:52 am

Re: ADC SAMPLING WITHIN TIMER GROUP INTERRUPT

Postby rinripper » Tue Jul 25, 2017 3:04 pm

Hi ESP_Sprite, I'm trying to sampling music. I need to sampling at least 50 KHz. I'm using the timer group because it´s accurate. So,I´m trying to make an ADC sample every timer group´s interrupt. The results the program crash or ADC sampling rate vary. The manual says something about a fast ADC: DIG SAR ADC, but iI can´t find it. What can I do to ADC sampling in regular intervals at 50KHz ?

Sorry for my bad english and Thanks.

ESP_Sprite
Posts: 8999
Joined: Thu Nov 26, 2015 4:08 am

Re: ADC SAMPLING WITHIN TIMER GROUP INTERRUPT

Postby ESP_Sprite » Wed Jul 26, 2017 2:21 am

There is a way to connect the ADC to the I2S peripheral, to get fully automatic sampling using DMA. It's documented in the TRM IIRC, but the I2S driver does not support it yet.

Who is online

Users browsing this forum: Google [Bot], thefury and 105 guests