DSPRelated.com
Forums

Fwd: extended addressing in 5416 : Loading problem in emulator

Started by Ritesh Patel July 20, 2005

Hi,
 
for internal SARAM to be used, MP/MC need to be 0.
Only for external memory it must be 1. this small thing was missed out by my reading.
Thanks all you guys helping.
 
Ritesh

 
On 7/20/05, Ritesh Patel <r...@gmail.com > wrote:
Hi dear all,
 
Thank you very much to all those who gave me very valuable support. Everybody's suggestions were right.
My memory map was right. which was also reflecting in options->memory map. in gel file extended addressing was enabled also.
 
but, what i see in my case is that it was MP/MC bit in pmst which was problem. If I make it 0 then only it enables extended addressing and loads program at 38000 and 28000 locations.
 
is it that extended addressing is possible in micro computer mode.. nowhere I could see in any document like this.
Could be some hardware problem ?? I think it should work in any mode.
 
Can any experienced person put some light on this.
 
Ritesh


---------- Forwarded message ----------
From: Ritesh Patel < r...@gmail.com>
Date: Jul 18, 2005 4:47 PM
Subject: Re: [c54x] extended addressing in 5416 : Loading problem in emulator
To: d...@gr-303.com

 
dear michael,
 
Thank you very much for your support. Program is being loaded and also run with your sent gel file.
the problem was with pmst register setting. is it that we have to be in mp/mc bit must be 0 for extended addressing. What I found is that it loads program or run well only in that case ( micro computer mode). I think it has to do with on chip ROM enabling. What it has to do with extended addressing.??
 
I am sending my gel file. almost same what came with CCS.This does not make code work but, if I make pmstA8 then it works fine.

 
On 7/15/05, Michael Dorin <d...@gr-303.com> wrote:

Ritesh,
Sorry, had to leave work for a bit.
Here you go.  Hope it helps.

Also, as, I said, don't forget to check your
memory map.  Options Menu --> Memory Map.
Make sure the region is marked as program
space.

Good luck.
-Mike

--- Ritesh Patel < r...@gmail.com > wrote:> Hi, I think the complete gel file as an inline text
> is not being obtained.
> could you please send it as an attachment.
>  However I am trying with what I got.
>  Ritesh
>
>  On 7/15/05, Michael Dorin <d...@gr-303.com> wrote:
>
> >
> > Ritesh,
> > Here is the GEL file. Don't forget to check your
> > memory map.
> > -Mike
> >
> >
> > * set PMST to: OVLY on; DROM on, CLKOUT off */
> > #define PMST_VAL 0x7facu
> >
> > /* set wait-state control reg for: 2 wait states,
> 4
> > for I/O */
> > #define SWWSR_VAL 0x4492u
> >
> > /* set external-banks switch control for: set
> CONSEC
> > and BH, CLKOUT/=2 */
> > #define BSCR_VAL 0xa002u
> >
> > /* Set Default Reset Initialization Value */
> > #define ZEROS 0x0000u
> >
> > /* Set CLKMD register to PLL multiplier of 10 */
> > #define CLKMD_VAL 0x9107u
> >
> > /* Set Peripheral Control Register Addresses for
> > DEV_RESET */
> > #define DMPREC 0x0054u
> > #define DMSA 0x0055u
> > #define DMSDI 0x0056u
> >
> > #define DMA_CH0_DMFSC_SUB_ADDR 0x0003u
> > #define DMA_CH1_DMFSC_SUB_ADDR 0x0008u
> > #define DMA_CH2_DMFSC_SUB_ADDR 0x000Du
> > #define DMA_CH3_DMFSC_SUB_ADDR 0x0012u
> > #define DMA_CH4_DMFSC_SUB_ADDR 0x0017u
> > #define DMA_CH5_DMFSC_SUB_ADDR 0x001cu
> >
> > #define MCBSP0_SPSA 0x0038u
> > #define MCBSP0_SPSD 0x0039u
> > #define MCBSP1_SPSA 0x0048u
> > #define MCBSP1_SPSD 0x0049u
> >
> > #define MCBSP2_SPSA 0x0034u
> > #define MCBSP2_SPSD 0x0035u
> >
> > #define MCBSP_SPCR1_SUB_ADDR 0x0000u
> > #define MCBSP_SPCR2_SUB_ADDR 0x0001u
> > #define MCBSP_SRGR1_SUB_ADDR 0x0006u
> > #define MCBSP_SRGR2_SUB_ADDR 0x0007u
> > #define MCBSP_MCR1_SUB_ADDR 0x0008u
> > #define MCBSP_MCR2_SUB_ADDR 0x0009u
> > #define SRGR1_INIT 0x0001u
> >
> > #define PRD0 0x0025u
> > #define TCR0 0x0026u
> >
> > #define PRD1 0x0031u
> > #define TCR1 0x0032u
> >
> > #define TIMER_STOP 0x0010u
> > #define TIMER_RESET 0x0020u
> > #define PRD_DEFAULT 0xFFFFu
> >
> > #define GPIOCR 0x0010u
> >
> >
> >
> >
> > /* The Startup() function is executed when the GEL
> > file is loaded. */
> >
> > StartUp()
> > {
> > C5416_DSK_Init();
> >
> > GEL_TextOut("Gel StartUp complete.\n");
> > }
> >
> >
> > menuitem "C5416_DSK_Configuration";
> > hotmenu CPU_Reset()
> > {
> > GEL_Reset();
> > PMST = PMST_VAL;
> >
> > /* don't change the wait states, let the
> application
> > code handle it */
> > /* note: at power up all wait states will be the
> > maximum (7) */
> > /* SWWSR = SWWSR_VAL;
> > */
> >
> > BSCR = BSCR_VAL;
> >
> > DSK5416_DisableFlash();
> >
> > GEL_TextOut("CPU Reset Complete.\n");
> > }
> >
> >
> > /* All memory maps are based on the PMST value of
> > 0xFFE0 */
> >
> > hotmenu C5416_DSK_Init()
> > {
> > GEL_Reset();
> > PMST = PMST_VAL;
> >
> > /* don't change the wait states, let the
> application
> > code handle it */
> > /* note: at power up all wait states will be the
> > maximum (7) */
> > /* SWWSR = SWWSR_VAL;
> > */
> >
> > BSCR = BSCR_VAL;
> >
> > DSK5416_DisableFlash();
> >
> > C5416_Periph_Reset();
> >
> > GEL_XMDef(0,0x1eu,1,0x8000u,0x7f);
> > GEL_XMOn();
> > GEL_MapOn();
> > GEL_MapReset();
> >
> > GEL_MapAdd(0x80u,0,0x7F80u,1,1); /* DARAM */
> > GEL_MapAdd(0x08000u,0,0x8000u,1,1); /* External */
> > GEL_MapAdd(0x18000u,0,0x8000u,1,1); /* DARAM */
> > GEL_MapAdd(0x18000u,0,0x8000u,1,1); /* SARAM */
> > GEL_MapAdd(0x28000u,0,0x8000u,1,1); /* SARAM */
> >
> > GEL_MapAdd(0x0u,1,0x60u,1,1); /* MMRs */
> > GEL_MapAdd(0x60u,1,0x7FA0u,1,1); /* DARAM */
> > GEL_MapAdd(0x08000u,1,0x8000u,1,1); /* DARAM */
> >
> > GEL_MapAdd(0x00000u,2,0x10000u,1,1);/* IO Space */
> >
> > GEL_TextOut("C5416_Init Complete.\n"); }
> >
> >
> > /* ****************************** */
> >
> > C5416_Periph_Reset()
> > {
> > IFR = 0xFFFFu;
> > IFR = 0x0000u;
> >
> > DMA_Reset();
> > MCBSP0_Reset();
> > MCBSP1_Reset();
> > MCBSP2_Reset();
> > TIMER0_Reset();
> > GPIO_Reset();
> > }
> >
> >
> > DMA_Reset()
> > {
> > *(int *)DMPREC = ZEROS;
> >
> > *(int *)DMSA = DMA_CH0_DMFSC_SUB_ADDR;
> > *(int *)DMSDI = ZEROS;
> > *(int *)DMSDI = ZEROS;
> > *(int *)DMSA = DMA_CH1_DMFSC_SUB_ADDR;
> > *(int *)DMSDI = ZEROS;
> > *(int *)DMSDI = ZEROS;
> >
> > *(int *)DMSA = DMA_CH2_DMFSC_SUB_ADDR;
> > *(int *)DMSDI = ZEROS;
> > *(int *)DMSDI = ZEROS;
> >
> > *(int *)DMSA = DMA_CH3_DMFSC_SUB_ADDR;
> > *(int *)DMSDI = ZEROS;
> > *(int *)DMSDI = ZEROS;
> >
> > *(int *)DMSA = DMA_CH4_DMFSC_SUB_ADDR;
> > *(int *)DMSDI = ZEROS;
> > *(int *)DMSDI = ZEROS;
> >
> > *(int *)DMSA = DMA_CH2_DMFSC_SUB_ADDR;
> > *(int *)DMSDI = ZEROS;
> > *(int *)DMSDI = ZEROS;
> > }
> >
> > MCBSP0_Reset()
> > {
> > *(int *)MCBSP0_SPSA = MCBSP_SPCR1_SUB_ADDR;
> > *(int *)MCBSP0_SPSD = ZEROS;
>
=== message truncated ===

--
Ritesh Patel
M.Tech. IIT-Bombay



--
Ritesh Patel
M.Tech. IIT-Bombay

--
Ritesh Patel
M.Tech . IIT-Bombay


--
Ritesh Patel
M.Tech. IIT-Bombay