Custom DFB FIR filter coefficients

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi all,

   

Im working on some existing code that takes a PDM signal from a digi MEMS mic and Im looking to edit the 128 filter coefficients in the DFB (Droop filter) component. I came across this post: http://www.cypress.com/forum/psoc-3-architecture/digital-filter-block which goes some way to explain how to do this but Im stumped on the conversion from my custom floating point filter coefficients (between -1 and +1) to the required uint32 hex values required in the file "Filter_RAM_Data.c", variable "CYCODE Filter_data_b[]". These values are in the form: 0x00FFF293u.

   

Im trying to re-purpose the DFB that is already present in the firmware rather than bring in a Filter component.

   

Any help would be much appreciated, and push my project nicely!

   

Charlie

0 Likes
3 Replies
Anonymous
Not applicable

Hi Charlie,

   

To clarify your query, would you like to know about adding custom coefficients in the Filter Component? If you add the custom coefficients in the component, you need not worry about converting them to uint32 hex and Creator by itself does that. We recommend to use Filter component for this.

   

Could you please clarify the requirement in more detail?

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi BMAH,

   

The filter component does seem to make life easy by handling the coefficient conversion, but Im working on an existing code base that implements the DFB component to perform a CIC droop compensation. Ive attached a cysch shot for info. Replacing the DFB with a Filter component would be great, but that may be punching above my PSoC weight. Help on doing this would be much appreciated or a way to do it using the existing DFB would also be fantastic.

   

Charlie

   

   

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

cmydlarz,

   

please check this thread for possible solution ("Change filter coefficients of the DFB in runtime"):

   

http://www.cypress.com/forum/psoc-5-device-programming/change-filter-coefficients-dfb-runtime?source...

0 Likes