ADSP-21061 (SHARC) programming issue
I am programming for ADSP21061. The code was developed by other developer who left long time ago. I am trying to understand his code, but I don't have experience on DSP at all. The DSP is used as a slave that is listening to the command sent from the master Micro controller. These interface signals include IRQ0, dsp_data[31:0] SPR0I, etc. According to what I understand, IRQ0 is used to tell DSP to be ready to receive input data (dsp_data[31:0]). If IRQ0 is 1, then get_command( ) will kick off.
Same as SPR0I. If SPR01 is '1', then isr_handler( ) will kick off. That is what I understand from the following code. ================================================================================
Main ( )
} get_command(int sig_num)
dsp_command = dm_port.idata;
void isr_handler(int sig_num)
Since get_command ( ) is going to use dm_port data as a command. I assume the data on dm_port is dsp_data[31:0]. Does that mean dsp_data[31:0] should be available before IRQ0 becomes '1'? If dsp_data[31:0] come later then IRQ0, will these data not be latched into DSP?
According to what the master Micro-controller said, Micro-controller won't give the dsp_data[31:0] until RD and MS<1> signals from DSP is pulled down. Where is the DSP code to pull RD, MS<1> or WR up and down?
Is set_flag ( ) system function?
I attached a diagram in this email for your reference.
Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www.ers.ibm.com
> According to what the master Micro-controller said, Micro-controller
>won't give the dsp_data[31:0] until RD and MS<1> signals from DSP is
>pulled down. Where is the DSP code to pull RD, MS<1> or WR up and down?
Check to see if you use the ACK line too. Either the microcontroller has
to hold the data lines before it sends the irq, and then release them once
it sees ms1, or else it looks for ms1, sets the data lines and then pulls
ACK so the dsp knows the data can be read. Once ack clears, the micro can
release the data bus and the dsp can use it as well.
Can you scope the system with old code and see how it works? That will
help you understand what it is supposed to do.
Patience, persistence, truth,