cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with DMA

sanjib
Associate III
Posted on January 23, 2014 at 06:12

The original post was too long to process during our migration. Please click on the attachment to read the original post.
13 REPLIES 13
sanjib
Associate III
Posted on January 24, 2014 at 12:25

.

Posted on January 24, 2014 at 16:20

I don't know how much special effort it takes to bottom post responses so they are invisible, but PLEASE STOP IT.  Use Ctrl-A clear out the post.

To your filter issue, build some unit-tests with data patterns you understand, and whose results you have a handle on.

This will allow you, and others, to evaluate the code without worrying about the sampling, and what's getting sampled.

Time those operations, and validate your solution.

Optimize your code, right now it looks pretty woeful and slow.

Get constant computation outside of the implementation, ideally in a fashion the compiler can optimize further.

Don't use DOUBLES in code you expect to be fast. If you must use floating point at all here, use FLOATS as this is the only type supported by the FPU, and execute rapidly.

Ideally don't use doubles/floats in interrupt code, it can be done, but if you have to push FPU context onto the stack it's still overly expensive for most tasks.

Do 32-bit math, 16-bit math may look more efficient, but it's almost always going to be slower on a part designed to do 32-bit math natively.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sanjib
Associate III
Posted on January 27, 2014 at 07:37

Thank you clive. Actually there is a strange behaviour . ADCDualConvertedValues after being  passed to the iir filter function(after half buffer completion) . Why the ADCDualConvertedValues values are getting updated . this is because for the unoptimized iir filter function or for some other issue?

sanjib
Associate III
Posted on January 31, 2014 at 10:55

Thanks clive . I am able to get the desired output I have optimized the code and it works well