DSPRelated.com
Forums

Please help me about C6713 HPI problem?

Started by jyzh...@sina.com December 18, 2007
Dear all;
The prolem entangle me two weeks!
I am working on a C6713 based board , the host is C5402 and the DSP is C6713.
Connecting the C6713 to a Host processor C5402 and bootloader program are very like to
"Implementing the C6xxx HPI Boot Process"(spra512).
if I load following program through HPI:
// timer1 set; The output wave can been seen in pin13 "pin_name = tout1".
#define CTL1 (unsigned int*) 0x01980000
#define PRD1 (unsigned int*) 0x01980004
#define CNT1 (unsigned int*) 0x01980008
main()
{
*CTL1= 0x311;
*PRD1=0xffff;
*CTL1= 0x3d1;
while(1);
}
the program runs fine.

But if i load following program through HPI:
// timer set program provided by 2003 Texas Instruments.
// in c:\CCStudio_v3.1\examples\dsk6713\csl\timer
void main() {

/* Initialize the chip support library, must when using CSL */
CSL_init();

/* Open TIMER1 device, and reset them to power-on default state */
hTimer1 = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);

/* Configure the timer devices */
TIMER_configArgs(hTimer1,
TimerControl, /* use predefined control value */
0x00100000, /* set period */
0x00000000 /* start count value at zero */
);

/* Start the timers */
TIMER_start(hTimer1);

while(1); /* waiting for interrupt*/
}

Nothing happened !

if I connect the JTAG and then start above program from the JTAG to C6713 (in Code Composer), all is good!

Why? Many thanks!
jiangyuzhong.
Jiang-

> The prolem entangle me two weeks!
> I am working on a C6713 based board , the host is C5402 and the DSP is C6713.
> Connecting the C6713 to a Host processor C5402 and bootloader program are very like to
> "Implementing the C6xxx HPI Boot Process"(spra512).

Before you try bootloading, you should run basic memory tests. You should write some
small C5402 code that:

1) Writes a pattern to location A (try 0x1000) in C6713 internal memory. For
example, write 0x100 locations with different values.

2) Writes another pattern to location B (try 0x2110).

3) Goes back and reads first pattern from location A -- is it correct?

Furthermore you should repeat the above tests using both auto-increment and
non-autoincrement HPI modes, and you should try many combinations of locations A and
B.

Can your C5402 code do this? If your C5402 EMIF interface can't do this, then it
can't do reliable bootload.

-Jeff
> if I load following program through HPI:
> // timer1 set; The output wave can been seen in pin13 "pin_name = tout1".
> #define CTL1 (unsigned int*) 0x01980000
> #define PRD1 (unsigned int*) 0x01980004
> #define CNT1 (unsigned int*) 0x01980008
> main()
> {
> *CTL1= 0x311;
> *PRD1=0xffff;
> *CTL1= 0x3d1;
> while(1);
> }
> the program runs fine.
>
> But if i load following program through HPI:
> // timer set program provided by 2003 Texas Instruments.
> // in c:\CCStudio_v3.1\examples\dsk6713\csl\timer
> void main() {
>
> /* Initialize the chip support library, must when using CSL */
> CSL_init();
>
> /* Open TIMER1 device, and reset them to power-on default state */
> hTimer1 = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);
>
> /* Configure the timer devices */
> TIMER_configArgs(hTimer1,
> TimerControl, /* use predefined control value */
> 0x00100000, /* set period */
> 0x00000000 /* start count value at zero */
> );
>
> /* Start the timers */
> TIMER_start(hTimer1);
>
> while(1); /* waiting for interrupt*/
> }
>
> Nothing happened !
>
> if I connect the JTAG and then start above program from the JTAG to C6713 (in Code Composer), all is good!
>
> Why? Many thanks!
> jiangyuzhong
Dear jiangyuzhong,

are you sure all initialized sections of the second program (using the
CSL) are transferred correctly during bootload? I recommend to generate a
linker map file and check the 6713 memory against the map file after
bootloading.

Does the reset vector jump to the correct program entry point (typically
c_int00) ?

Best Regards,
Adolf Klemenz, D.SignT
Dear Adolf Klemenz,jeff
I solve this problem.
remove link cmd file "-cr" item.
thank your helps!
best regards!
jiangyuzhong

Dear all;
>The prolem entangle me two weeks!
>I am working on a C6713 based board , the host is C5402 and the DSP is C6713.
>Connecting the C6713 to a Host processor C5402 and bootloader program are very like to
>"Implementing the C6xxx HPI Boot Process"(spra512).
>if I load following program through HPI:
>// timer1 set; The output wave can been seen in pin13 "pin_name = tout1".
>#define CTL1 (unsigned int*) 0x01980000
>#define PRD1 (unsigned int*) 0x01980004
>#define CNT1 (unsigned int*) 0x01980008
>main()
>{
>*CTL1= 0x311;
>*PRD1=0xffff;
>*CTL1= 0x3d1;
>while(1);
>}
>the program runs fine.
>
>But if i load following program through HPI:
>// timer set program provided by 2003 Texas Instruments.
>// in c:\CCStudio_v3.1\examples\dsk6713\csl\timer
>void main() {
>
>/* Initialize the chip support library, must when using CSL */
>CSL_init();
>
>/* Open TIMER1 device, and reset them to power-on default state */
>hTimer1 = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);
>
>/* Configure the timer devices */
>TIMER_configArgs(hTimer1,
>TimerControl, /* use predefined control value */
>0x00100000, /* set period */
>0x00000000 /* start count value at zero */
>);
>
>/* Start the timers */
>TIMER_start(hTimer1);
>
>while(1); /* waiting for interrupt*/
>}
>
>Nothing happened !
>
>if I connect the JTAG and then start above program from the JTAG to C6713 (in Code Composer), all is good!
>
>Why? Many thanks!
>jiangyuzhong.
Jiang-

> I solve this problem.
> remove link cmd file "-cr" item.
> thank your helps!

If you remove -cr option, then your project will use -c option, which means "load-time" initialization. In this case
your C5402 host program has to initialize all C variables via HPI, as the C6713 code won't do it at run-time (run-time
= "r" in cr option).

Your problem may be Ok for now, but I think it will come back when you increase the compexity of the C6713 code.

-Jeff

> Dear all;
>>The prolem entangle me two weeks!
>>I am working on a C6713 based board , the host is C5402 and the DSP is C6713.
>>Connecting the C6713 to a Host processor C5402 and bootloader program are very like to
>>"Implementing the C6xxx HPI Boot Process"(spra512).
>>if I load following program through HPI:
>>// timer1 set; The output wave can been seen in pin13 "pin_name = tout1".
>>#define CTL1 (unsigned int*) 0x01980000
>>#define PRD1 (unsigned int*) 0x01980004
>>#define CNT1 (unsigned int*) 0x01980008
>>main()
>>{
>>*CTL1= 0x311;
>>*PRD1=0xffff;
>>*CTL1= 0x3d1;
>>while(1);
>>}
>>the program runs fine.
>>
>>But if i load following program through HPI:
>>// timer set program provided by 2003 Texas Instruments.
>>// in c:\CCStudio_v3.1\examples\dsk6713\csl\timer
>>void main() {
>>
>>/* Initialize the chip support library, must when using CSL */
>>CSL_init();
>>
>>/* Open TIMER1 device, and reset them to power-on default state */
>>hTimer1 = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);
>>
>>/* Configure the timer devices */
>>TIMER_configArgs(hTimer1,
>>TimerControl, /* use predefined control value */
>>0x00100000, /* set period */
>>0x00000000 /* start count value at zero */
>>);
>>
>>/* Start the timers */
>>TIMER_start(hTimer1);
>>
>>while(1); /* waiting for interrupt*/
>>}
>>
>>Nothing happened !
>>
>>if I connect the JTAG and then start above program from the JTAG to C6713 (in Code Composer), all is good!
>>
>>Why? Many thanks!
>>jiangyuzhong.