DSPRelated.com
Forums

HPI memory configuration

Started by aine_canby August 30, 2003
Hi all,

I'm working with the C6711DSK. I'm currently trying to load a dsp
program to my board using a PC windows program - via HPI. I have had
success with this but I had to configure the memory in a strange
manner. I'd now like to configure the memory in the correct manner.

In order to get my program working, I configured my SDRAM segment
from a base of 0x80000000 to 0x00000000.

So my windows app. loads the following code -

#include "audiocfg.h"
#include <csl_cache.h>

#define HOST_RECEIVE_HAND_SHAKING_INFO 0x55555555

#define HS_BUFFER_LEN 6
#define ID_0 0x12345678
#define ID_1 0xf1f2f3f4
#define ID_2 0x08070605

#pragma DATA_SECTION(handShakingBuffer, "my_DataSect")
int handShakingBuffer[HS_BUFFER_LEN];

Void main()
{
handShakingBuffer[0] = ID_0;
handShakingBuffer[1] = ID_1;
handShakingBuffer[2] = ID_2;

CACHE_flush(CACHE_L2ALL, (void *)0, 0);

while(handShakingBuffer[4] != HOST_RECEIVE_HAND_SHAKING_INFO);

return;
}

And succesfully reads the values -

0x12345678
0xf1f2f3f4
0x08070605

using HPI.

I'm now trying to configure the memory as - ENTRY POINT SYMBOL: "_c_int00" address: 800009a0 MEMORY CONFIGURATION

name origin length used
attr fill
---------------------- -------- --------- -------- ----
--------
ResetVector 00000000 00000020 00000020 RWIX
HandShake 00000020 00000018 00000018 RWIX
SDRAM 80000000 10000000 00005ebd RWIX SECTION ALLOCATION MAP

output attributes/
section page origin length input sections
-------- ---- ---------- ---------- ----------------
.vers 0 00000000 00000038 COPY SECTION
00000000 00000038 audiocfg.obj (.vers)

.clk 0 and I've added the pragma -

#pragma DATA_SECTION(handShakingBuffer, "HandShake")
int handShakingBuffer[HS_BUFFER_LEN];

When I upload this program, I get the values -

[0] 0200C069
[1] 027FFFEA
[2] 02100277
[3] 02000C29
[4] 0238002A
[5] 020388EB

at 0x00000020 (handShakingBuffer). When I should be getting -

handShakingBuffer[0] = ID_0; //0x12345678
handShakingBuffer[1] = ID_1;
handShakingBuffer[2] = ID_2;

I then used CCS to upload the following program to my dsp board -

Void main()
{
CACHE_flush(CACHE_L2ALL, (void *)0, 0);

while(handShakingBuffer[4] != HOST_RECEIVE_HAND_SHAKING_INFO);

return;
}

I watched the values in handShakingBuffer, before and after the flush
and they didn't change, the were -

[0] 0200C069
[1] 027FFFEA
[2] 02100277
[3] 02000C29
[4] 0238002A
[5] 020388EB

same as above. I think this means that I am loading the dsp program
correctly with my windows app, but that the dsp code is not
executing. This might be because HWI_reset is not correctly
configured.

I have 3 way caching enabled, and HWI is set to generate reset vector
at address 0. In the memory section manager, I have -

BIOS data - all set for SDRAM
BIOS code - all set for SDRAM
Compiler Sections - all set for SDRAM
Load Address - no options highlighted.

Remember also that I can actually get this to work with my
application by simply deleting the memory segments -

ResetVector
HandShake

and setting SDRAM's base to 0, but this is not good practice.

What might the issue be here?

Thanks very much for your help,

Aine.



Hello Aine,
 
It appears that your code is performing is performing a reset.  When a reset is performed and ROM boot is enabled [the default config of the DSK is ROM], the first 1024 locations of ROM are DMA'd into internal memory beginning at address 0.  [You can verify this by doing a memory fill of some pattern beginning at zero with CCS.  View address 0 and observe the pattern. Perform debug->reset CPU and watch the contents change - you will see your observed pattern at 0x20.]
 
If you are going to use a reset, it should be executed first.
 
You then must initialize the EMIF before you load your code [when using CCS the dsk GEL file does this for you].
 
Good luck,
 
mikedunn
aine_canby <a...@yahoo.com> wrote:
Hi all,

I'm working with the C6711DSK. I'm currently trying to load a dsp
program to my board using a PC windows program - via HPI. I have had
success with this but I had to configure the memory in a strange
manner. I'd now like to configure the memory in the correct manner.

In order to get my program working, I configured my SDRAM segment
from a base of 0x80000000 to 0x00000000.

So my windows app. loads the following code -

#include "audiocfg.h"
#include

#define HOST_RECEIVE_HAND_SHAKING_INFO 0x55555555

#define HS_BUFFER_LEN 6
#define ID_0 0x12345678
#define ID_1 0xf1f2f3f4
#define ID_2 0x08070605

#pragma DATA_SECTION(handShakingBuffer, "my_DataSect")
int handShakingBuffer[HS_BUFFER_LEN];

Void main()
{
handShakingBuffer[0] = ID_0;
handShakingBuffer[1] ID_1;
handShakingBuffer[2] = ID_2;

CACHE_flush(CACHE_L2ALL, (void *)0, 0);

while(handShakingBuffer[4] != HOST_RECEIVE_HAND_SHAKING_INFO);

return;
}

And succesfully reads the values -

0x12345678
0xf1f2f3f4
0x08070605

using HPI.

I'm now trying to configure the memory as -ENTRY POINT SYMBOL: "_c_int00" address: 800009a0MEMORY CONFIGURATION

name origin length used
attr fill
---------------------- -------- --------- -------- ----
--------
ResetVector 00000000 00000020 00000020 RWIX
HandShake 00000020 00000018 00000018 RWIX
SDRAM 80000000 10000000 00005ebd RWIXSECTION ALLOCATION MAP

output attributes/
section page origin length input sections
-------- ---- ---------- ---------- ----------------
.vers 0 00000000 00000038 COPY SECTION
00000000 00000038 audiocfg.obj (.vers)

.clk 0and I've added the pragma -

#pragma DATA_SECTION(handShakingBuffer, "HandShake")
int handShakingBuffer[HS_BUFFER_LEN];

When I upload this program, I get the values -

[0] 0200C069
[1] 027FFFEA
[2] 02100277
[3] 02000C29
[4] 0238002A
[5] 020388EB

at 0x00000020 (handShakingBuffer). When I should be getting -

handShakingBuffer[0] = ID_0; //0x12345678
handShakingBuffer[1] = ID_1;
handShakingBuffer[2] = ID_2;

I then used CCS to upload the following program to my dsp board -

Void main()
{
CACHE_flush(CACHE_L2ALL, (void *)0, 0);

while(handShakingBuffer[4] != HOST_RECEIVE_HAND_SHAKING_INFO);

return;
}

I watched the values in handShakingBuffer, before and after the flush
and they didn't change, the were -

[0] 0200C069
[1] 027FFFEA
[2] 02100277
[3] 02000C29
[4] 0238002A
[5] 020388EB

same as above. I think this means that I am loading the dsp program
correctly with my windows app, but that the dsp code is not
executing. This might be because HWI_reset is not correctly
configured.

I have 3 way caching enabled, and HWI is set to generate reset vector
at address 0. In the memory section manager, I have -

BIOS data - all set for SDRAM
BIOS code - all set for SDRAM
Compiler Sections - all set for SDRAM
Load Address - no options highlighted.

Remember also that I can actually get this to work with my
application by simply deleting the memory segments -

ResetVector
HandShake

and setting SDRAM's base to 0, but this is not good practice.

What might the issue be here?

Thanks very much for your help,

Aine.
_____________________________________
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 c...@yahoogroups.com

To Post: Send an email to c...@yahoogroups.com

To Leave: Send an email to c...@yahoogroups.com

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

Other Groups: http://www.dsprelated.com