This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
resources:tools-software:sigmastudio:toolbox:filters:firfilter [16 Jun 2020 03:14] – Added example microcontroller code Joshua Berlin | resources:tools-software:sigmastudio:toolbox:filters:firfilter [16 Jun 2020 03:15] (current) – Minor clarifications Joshua Berlin | ||
---|---|---|---|
Line 96: | Line 96: | ||
void write_FIR_coeffs(int fir_start_addr, | void write_FIR_coeffs(int fir_start_addr, | ||
for (int i = 0; i < fir_filter_length; | for (int i = 0; i < fir_filter_length; | ||
- | // DSP memory holds FIR coefficients in reverse order so fill the fir_coeffs array from first to last. | + | |
SIGMA_WRITE_REGISTER_FLOAT(fir_start_addr + i, coefficients[fir_filter_length - i - 1]); | SIGMA_WRITE_REGISTER_FLOAT(fir_start_addr + i, coefficients[fir_filter_length - i - 1]); | ||
} | } |