cancel
Showing results for 
Search instead for 
Did you mean: 

Filtered data value is so long

lokesh
Associate II
Posted on May 25, 2015 at 08:16

I am using stm32f4 discovery board.

from ADC I take 1ksample/sec and accumulate it.

after accumulation of 30Ksamples, process it through band pass filter.

output of band pass filter is very large +ve and -ve values ex.3267832. it is not in range of voltage level i fed for filtering.

any idea?? how can i get filter output in my input range?

do i need to divide it with some fix value?

and can i send that filtered data 30K values to output (DAC) for understanding of filter output. this 30K value need to send every 1sec.

thanks in advance

#adc #stm32f4 #dac #filter
8 REPLIES 8
raptorhal2
Lead
Posted on May 25, 2015 at 21:48

There is much you are not telling us.

Which bandpass filter ? Does it expect to have floating point inputs ? What is the expected peak gain ?

and can i send that filtered data 30K values to output (DAC) for understanding of filter output. this 30K value need to send every 1sec.

Of course you can. But if the values exceed the DAC range, not much intelligence can be gained. And if the 1sec is not a typo, you will be staring at that output for 8.33+ hours.

Cheers, Hal

lokesh
Associate II
Posted on May 26, 2015 at 07:51

Thanks hal for reply.

I am using IIR band pass filter api's from CMSIS.

It has single precision floating point unit support.

sample vtg level is max 3.0v.

raptorhal2
Lead
Posted on May 26, 2015 at 15:21

I can find only iir lattice filters in the DSP library. Is that the filter you are using ?

Show your code.

Cheers, Hal

Posted on May 27, 2015 at 00:35

Suggest you build yourself a small example with know values, and run the functions, confirming you know how to use them properly, and the expected values.

Make sure your data is correctly cast to the types the functions are using.

The STM32 ADC don't convert to negative values.

Provide examples of what you're doing, with input data sets, and commentary about what you're observing at each stage.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
lokesh
Associate II
Posted on May 27, 2015 at 13:12

Thanks clive1,

I agree ADC doesn't convert, but adc sample feed to filter api, and filtered output is

+ & -ve values as shown in attached images.

So i just wanted to output the filtered data to DAC at the rate of 30Ksample/sec.

Is it possible with stm32f4?

and how to get the filtered output values in within range?

________________

Attachments :

ADC_Output.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I011&d=%2Fa%2F0X0000000bSE%2FX7g6ryoMXqEyA7aCCSQ1r_i8Jok9PXeOiSU1mM7HcnQ&asPdf=false

Filtered_Output.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I00w&d=%2Fa%2F0X0000000bSA%2F9yyKnz2L28sDfMNDbrsTlirPwQlBSQQOTSb9zsnACGE&asPdf=false
raptorhal2
Lead
Posted on May 27, 2015 at 15:06

The filtered values dump is coming from non-existant memory. Check your pointers.

Cheers, Hal

lokesh
Associate II
Posted on May 28, 2015 at 05:02

hal,

how did you know the filtered values are from non-existant memory?

want to clarify here, STM32F4 discovery has 4MB SDRAM and start address 0xD0000000.

My filtered pointer is pointing to SDRAM location.

Still it is wrong???

raptorhal2
Lead
Posted on May 28, 2015 at 15:22

The STM32F4 Discovery 407 processor has a FSMC that does not access 0xD0000000 and will not talk to SDRAMs. Do you actually have an STM32F429 Discovery with FMC and external SDRAM ?

I suggest you follow Clive1's advice and do a step by step progression to isolate where the problem is occurring.

Hal