yuvadm / tiva-c

Open source toolchain for the TI Tiva C dev board
185 stars 86 forks source link

using TIVA C tm4c123gh6pm ADC with Comparator and uDMA #7

Closed p-krishnat closed 7 years ago

p-krishnat commented 7 years ago

I have one pulse as shown in fig. Pulse width is 10 to 25 us. But next pulse will come after 100 ms.

I need to find peak of each pulse. I have reference peak value. I need to generate error send to DAC module. 1

In my current code,

If I take one sample and check whether peak or not, and calculate error send to DAC,

this code takes 35 us time.That means pulse is gone.

How should I tackle this situation

2

I have one solution, I want suggestion from you , whether it is feasible or not??

ADC0 and ADC1- same pulse as input

ADC0-Comparator

ADC1-uDMA module

I will configure my ADC0 module for digital comparator for HIGH band in always mode.

I will start my uDMA module to store ADC1 samples until my comparator output is High.

Once comparator output is LOW, I will start find peak out of stored samples & generate error send to DAC module.

yuvadm commented 7 years ago

@p-krishnat I have no idea how to help you with this, and this isn't an issue with the repository, sorry.

udif commented 7 years ago

I think your best shot are the 43oh forums: http://forum.43oh.com/