Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Ads

Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | TMS320C54x | Using circular buffers on c54x dskplus

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

Using circular buffers on c54x dskplus - ching hor - Dec 5 22:33:00 2000

Hi,

I'm trying to implement a simple FIR filter using circular buffers on
c54x dskplus. Below is my code modified from original c54x EVM code.
The main problem of my code is there isn't any data stored in the
fir_coff_table & d_data_buffer after execution. Can someone tell me
what's wrong with my code. Appreciate if someone can correct my code.
Thanks in advance. --------------------- program ------------------------------
.width 86
.length 55
.mmregs

.setsect ".data", 0x400, 1
.setsect ".text", 0x1800, 0
.setsect "vectors", 0x180, 0
.setsect "coff_fir", 0x2700, 0

.sect "vectors"
.copy "firvecs.asm"

COFF_FIR_START .sect "coff_fir"
.word 6Fh
.word 0F3h
.word 269h
.word 50Dh
.word 8A9h
.word 0C99h
.word 0FF8h
.word 11EBh
.word 11EBh
.word 0FF8h
.word 0C99h
.word 8A9h
.word 50Dh
.word 269h
.word 0F3h
.word 6Fh
COFF_FIR_END

FIR_DP .usect "fir_vars", 0
fir_coff_table .usect "fir_coff", 20

.data
d_data_buffer .word 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

.asg AR0, FIR_INDEX_P
.asg AR4, FIR_DATA_P
.asg AR5, FIR_COFF_P

;---------------- Main program ------------
.text
start:
SSBX INTM
CALLD AC01INIT
STM 1A0h, PMST
STM 0FFAh, SP
LD #0, DP
STM 240h, IMR
RSBX INTM
NOP

;----- initialization ---------
STM #fir_coff_table, FIR_COFF_P
RPT #16-1 ;move FIR coeffs from program to data
MVPD #COFF_FIR_START, *FIR_COFF_P+

STM #1, FIR_INDEX_P
STM #(d_data_buffer+16-1), FIR_DATA_P
STM #fir_coff_table, FIR_COFF_P
WAIT
B WAIT

receive:
LD #FIR_DP, DP
STM #256-1, BRC
RPTBD fir_filter_loop-1
LDM trcv, A
STM #15, BK
STL A, *FIR_DATA_P+%
RPTZ A, 15
MAC *FIR_DATA_P+0%,*FIR_COFF_P+0%,A ;
AND #0FFFCh,A
STLM A, tdxr
fir_filter_loop
RETE

transmit: RETE
;****************************************************
.copy "firinit.asm"
.end



______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )