Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 22215

CCS/MSP430FR5994: _Q15 variable

$
0
0

Part Number:MSP430FR5994

Tool/software: Code Composer Studio

Hi.

I'm working with FFT and FIR base on LEA. The variable FILTER_COEFFS_EX1 needed to use FIR has to be _q15. For example:

#pragma LOCATION(FILTER_COEFFS_EX1, 0x00002e00)
_q15 FILTER_COEFFS_EX1[SIGNAL_LENGTH];
_q15 FILTER_COEFFS_EX1[] = {_Q15(1),_Q15(2),_Q15(3),_Q15(4),_Q15(4),_Q15(3),_Q15(2),_Q15(1)};

Well, it works pefect, but now we want make FILTER_COEFFS_EX1 variable depending on other variables. For example:

((int16_t *)input)[i] = currentAdcBuffer[i];

status = msp_fft_fixed_q15(&FftParams,input);

FILTER_COEFFS_EX1=input;

I don't know if I'm explaining it well.

Summarizing, Can I transform a int variable like int16_t input={1,2,3,4,4,3,2,1} in to a _q15 variable like _q15 FILTER_COEFFS_EX1[] = {_Q15(1),_Q15(2),_Q15(3),_Q15(4),_Q15(4),_Q15(3),_Q15(2),_Q15(1)}? How?

Thank you.

Marcos.


Viewing all articles
Browse latest Browse all 22215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>