DSPRelated.com
Forums

C6415 PCI Woes :|

Started by Steve Sharp September 9, 2002
Hi DSP'ers,

I am currently trying to build a dsp driver for linux to work with our
c6415. I have managed to load some code into the dsp's memory over the PCI
interface and can verify the code is correct, however the old (hex5x)
conversion utility used to have a start address flag, but the newer version
(hex6x) seems to have this missing.

Anyone any ideas how to set register values / program counter over the pci
interface, or does anyone have any documentation about how to load code over
the pci interface, as i cannot find any on the ti site :(

Kind Regards,

--
Steve.




Steve wrote :
> I am currently trying to build a dsp driver for linux to work with our
> c6415. I have managed to load some code into the dsp's memory over the PCI
...
> Anyone any ideas how to set register values / program counter over the pci
> interface, or does anyone have any documentation about how to load code over
> the pci interface, as i cannot find any on the ti site :(

You can't force the PC.
To boot your code from the PCI you must :

- Have your DSP in PCI mode so that it doesn't run after
a hard-reset and keep waiting for a start command
- link you code with a correct vector table in 0x0000000
Your RESET vector should include a Branch to _c_int00
See below on how to do this.
- download your code AND CHECK it
You must check what you have downloaded because of
the current 11-burst-length bug in chip (check errata)
- Start the DSP code by generating an interrupt
(bit DSPINT in HDCR register in BAR-3)
As a start command, this will not run the INT13
interrupt vector but run the RESET vector.

1) If you are using DSP/Bios, DSP/Bios already provide
a vector table with a correct reset vector.
In your MEM settings, reserve a VECTORS area located
at address 0x00000000 with 512 bytes
Correct the ISRAM start address and length
Ensure that the .hwi_vec section is directed to VECTORS

2) If you are not using DSP/Bios, add a asm file with the
content below :

.ref _c_int00 ;code entry point
.sect ".hwi_vec"

_RESET: mvk _c_int00,b0
mvkh _c_int00,b0
b .s2 b0
nop 5
nop
nop
nop
nop

In your CMD file, add a VECTORS area in the MEMORY
block at address 0x00000000 with 512 bytes length
Adjust the start address and length of the ISRAM
In the SECTION block, have the .hwi_vec section mapped to
VECTORS
MEMORY
{
VECTORS : o=0x00000000 lQ2
ISRAM : o=0x00000200 l48064 /* 1MB - 512 */
}
SECTION
{
.hwi_sec > VECTORS
}
I hope this is clear and helpfull Jean-Michel MERCIER


Thank you for you responses :) more than i have got from ti...

I have checked the errata about the 11 word burst problem (ti document
SPRZ011G for those interested) , but how is it possible to to check that the
loaded code is correct ? CRC ? if the code that is loaded is to be executed
? It seems like a catch-22 to me ?

Any help would be gratefully accepted, as im v. new to DSP's and ti's docs
seem less than verbose :(

Kind Regards.

--
Steve.

-----Original Message-----
From: Jean-Michel MERCIER [mailto:]
Sent: 09 September 2002 16:32
To:
Subject: RE: [c6x] C6415 PCI Woes :|
Steve wrote :
> I am currently trying to build a dsp driver for linux to work with our
> c6415. I have managed to load some code into the dsp's memory over the PCI
...
> Anyone any ideas how to set register values / program counter over the pci
> interface, or does anyone have any documentation about how to load code
over
> the pci interface, as i cannot find any on the ti site :(

You can't force the PC.
To boot your code from the PCI you must :

- Have your DSP in PCI mode so that it doesn't run after
a hard-reset and keep waiting for a start command
- link you code with a correct vector table in 0x0000000
Your RESET vector should include a Branch to _c_int00
See below on how to do this.
- download your code AND CHECK it
You must check what you have downloaded because of
the current 11-burst-length bug in chip (check errata)
- Start the DSP code by generating an interrupt
(bit DSPINT in HDCR register in BAR-3)
As a start command, this will not run the INT13
interrupt vector but run the RESET vector.

1) If you are using DSP/Bios, DSP/Bios already provide
a vector table with a correct reset vector.
In your MEM settings, reserve a VECTORS area located
at address 0x00000000 with 512 bytes
Correct the ISRAM start address and length
Ensure that the .hwi_vec section is directed to VECTORS

2) If you are not using DSP/Bios, add a asm file with the
content below :

.ref _c_int00 ;code entry point
.sect ".hwi_vec"

_RESET: mvk _c_int00,b0
mvkh _c_int00,b0
b .s2 b0
nop 5
nop
nop
nop
nop

In your CMD file, add a VECTORS area in the MEMORY
block at address 0x00000000 with 512 bytes length
Adjust the start address and length of the ISRAM
In the SECTION block, have the .hwi_vec section mapped to
VECTORS
MEMORY
{
VECTORS : o=0x00000000 lQ2
ISRAM : o=0x00000200 l48064 /* 1MB - 512 */
}
SECTION
{
.hwi_sec > VECTORS
}
I hope this is clear and helpfull Jean-Michel MERCIER
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you
want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join: Send an email to

To Post: Send an email to

To Leave: Send an email to

Archives: http://www.yahoogroups.com/group/c6x

Other Groups: http://www.dsprelated.com ">http://docs.yahoo.com/info/terms/



Steve wrote :
> I have checked the errata about the 11 word burst problem (ti document
> SPRZ011G for those interested) , but how is it possible to to check that the
> loaded code is correct ? CRC ? if the code that is loaded is to be executed
> ? It seems like a catch-22 to me ?

The bug appears as a slave write problem where the eleventh word is
not written at the correct address. It does not concern read.

So if you read back what you have written it is ok.

You can also secure your download code by placing
a dummy read on the board every 8 or 10 words to
be sure that burst of writes are never longer than 8/10 words.
Jean-Michel MERCIER