TI E2E Community
MSP430 Ultra-Low Power 16-bit Microcontroller Forum
FIR filtering using MSP430F5438A
I am using MSP430F5438A based system, and as a part of it I need to perform FIR filtering on it. Where I am using 3 eight tap filters one after the other, with certain processing involved in between. Can anyone suggest a way to use it with hardware multiplier as I need to perform it on 32 bit inputs with result being truncated to 32 bits.
If you use assembly code, you should have no problem at all.
But you are probably using c. In that case, you could tell the c-compiler to not use the hardware multiplier. And you use c statements to read/write to the hardware multiplier registers directly.
Is it possible for you to just write a demo snippet? That would really help!!
Examples in c can be found in slac357a.zip. But you really should read the users guide slau208j.pdf Chapter 23. Notes:1. The hardware registers are at most 16 bits wide. If your variables or constants in c are 32 bits wild and you try to split them to two halves to load the register, the code generated can be inefficient. You could use union to create 16 bits wide names for the lower and upper halves of those 32 bits wide names. Same precaution goes with unloading the 64 bit wide results.2. The MACS operation is very useful for DSP applications such as what you want to do. In one operation, it can do a signed 32-bit multiple another signed 32-bit and add the signed 64-bit result to a 65-bit signed accumulator (the 65th bit is an overflow/saturation indicator).
Have you seen this: http://www.ti.com/mcu/docs/litabsmultiplefilelist.tsp?sectionId=96&tabId=1502&literatureNumber=slaa228&docCategoryId=1&familyId=914
It was written for the old 16-bit HW multiplier, but the concepts are all the same. This example even uses DMA, which is very nice because it increases performance of the filter and also frees the CPU for other tasks.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.