Hi C55x users,
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi C55x users,
Quick check: Is PLL used and programmed within the code? Is SARAM31 used? Is MPORT enabled?
Regards.
Hi Steve,
1. PLL is used and programmed within the code.
PLL freq. programmed is such that cpu/dsp runs at 120 MHz.
2. Is SARAM31 from byte addresses 0x04E000 to 0x004FE00 ? If yes I have modiifed the linker command file so that
nothing is assigned to this part of memory. Attached herewith the linker command file. (File renamed lnkx.txt from original lnkx.cmd for attachment purposes)
/******************************************************************************/
/* LNKX.CMD - COMMAND FILE FOR LINKING C PROGRAMS IN LARGE/HUGE MEMORY MODEL */
/* */
/* Usage: */
/* cl55 <src files> -z -o<out file> -m<map file> lnkx.cmd -l<RTS library> */
/* */
/* Description: This file is a sample command file that can be used for */
/* linking programs built with the C Compiler. Use it as a */
/* guideline; you may want to change the allocation scheme */
/* according to the size of your program and the memory layout */
/* of your target system. */
/* */
/* Notes: (1) You must specify the directory in which <RTS library> is */
/* located. Either add a "-i<directory>" line to this file */
/* file, or use the system environment variable C55X_C_DIR to */
/* specify a search path for the libraries. */
/* */
/******************************************************************************/
-stack 0x2000 /* Primary stack size */
-sysstack 0x1000 /* Secondary stack size */
-heap 0x3000 /* Heap area size */
-c /* Use C linking conventions: auto-init vars at runtime */
-u _Reset /* Force load of reset interrupt handler */
/* SPECIFY THE SYSTEM MEMORY MAP */
MEMORY
{
PAGE 0: /* ---- Unified Program/Data Address Space ---- */
MMR (RWIX): origin = 0x000000, length = 0x0000c0 /* MMRs */
DARAM0 (RWIX): origin = 0x0000c0, length = 0x001f40
DARAM1 (RWIX): origin = 0x002000, length = 0x002000
DARAM2 (RWIX): origin = 0x004000, length = 0x002000
DARAM3 (RWIX): origin = 0x006000, length = 0x00A000
SARAM0 (RWIX): origin = 0x010000, length = 0x010000 /* 64KB */
SARAM1 (RWIX): origin = 0x020000, length = 0x020000 /* 128KB */
SARAM2 (RWIX): origin = 0x040000, length = 0x00E000 /* 57344B*/
SARAM3 (RWIX): origin = 0x04E000, length = 0x001E00 /* 7680B */
VECS (RWIX): origin = 0x04FE00, length = 0x000200 /* 512B */
PDROM (RIX): origin = 0xff8000, length = 0x008000 /* 32KB */
PAGE 2: /* -------- 64K-word I/O Address Space -------- */
IOPORT (RWI) : origin = 0x000000, length = 0x020000
}
/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
SECTIONS
{
.text >> SARAM1|SARAM2|SARAM0 /* Code */
/* Both stacks must be on same physical memory page */
.stack > DARAM3 /* Primary system stack */
.sysstack > DARAM3 /* Secondary system stack */
.data >> DARAM0|SARAM0|SARAM1 /* Initialized vars */
.bss >> DARAM0|SARAM0|SARAM1 /* Global & static vars */
.const >> DARAM0|SARAM0|SARAM1 /* Constant data */
.sysmem > DARAM0|SARAM0|SARAM1 /* Dynamic memory (malloc) */
.switch > SARAM2 /* Switch statement tables */
.cinit > SARAM2 /* Auto-initialization tables */
.pinit > SARAM2 /* Initialization fn tables */
.cio > SARAM2 /* C I/O buffers */
.args > SARAM2 /* Arguments to main() */
vectors > DARAM3 /* Interrupt vectors */
.ioport > IOPORT PAGE 2 /* Global & static ioport vars */
context : > DARAM3 align=4
i2s_rcv_L : > DARAM3 align = 128
i2s_rcv_R : > DARAM3 align = 128
intvec : > DARAM3 ALIGN = 256
inbuffer : > DARAM3 align = 4
/* Memory Section requirement for Environment Sensor*/
amdf_circ_buffer > DARAM1
// The Bit-Reverse destination buffer data_br_buf requires an address with
// at least 4+log2(FFT_LENGTH) least significant binary zeros
FilterIn : > DARAM0 align = 4096
xip_freq_dom :> DARAM3 align = 4
RcvL1 : > DARAM3
RcvL2 : > DARAM3
RcvL3 : > DARAM3
RcvL4 : > DARAM3
RcvL5 : > DARAM1
Filter_RE : > DARAM3
RcvR1 : > DARAM2
RcvR2 : > DARAM2
RcvR3 : > DARAM2
RcvR4 : > DARAM2
RcvR5 : > DARAM2
OverlapL : > DARAM0
OverlapR : > DARAM0
XmitL1 : > DARAM3
XmitL2 : > DARAM3
XmitR1 : > DARAM1
XmitR2 : > DARAM1
}
3. MPORT is enabled.
This is evident from the fact that the value of Idle Configuration Register is 0x036F. This is the register located at I/O address 0x0001.
The weird part is that when the .bin is flashed to the memory and then device turned on, the output is sometimes noisy and at other times
clean. Then when this device is reset / restarted, after an arbitrary number of times (sometimes one sometimes five) the output flips
from noisy to clean or vice-a-versa.
Please advice further.
- AV
Hi Steve et. al,
I have also commented all function calls of the .gel file used (and listed below). The code runs fine using CCS 4.0 emulator. So gel file does not seem to be an issue.
/********************************************************************/
/* evm5515.gel */
/* Version 0.02 */
/* */
/* This GEL file is to be used with the 5515 EVM. */
/* Changes may be required to support specific hardware designs. */
/* */
/* Code Composer Studio supports six reserved GEL functions that */
/* automatically get executed if they are defined. They are: */
/* */
/* StartUp() - Executed whenever CCS is invoked */
/* OnReset() - Executed after Debug->Reset CPU */
/* OnRestart() - Executed after Debug->Restart */
/* OnPreFileLoaded() - Executed before File->Load Program */
/* OnFileLoaded() - Executed after File->Load Program */
/* OnTargetConnect() - Executed after Debug->Connect */
/* */
/* Version History */
/* v0.01 Initial Release */
/* v0.02 Corrected PLL settings */
/********************************************************************/
StartUp()
{
}
Thanks for checking. Looks like you are using DARAM3 for your audio data buffer, have you zero it out before storing data to it? Might be there are left over data in it?
Regards.
I have zeroed out all the data buffers in DARAM3 and DARAM2. No improvement.
Also following your other posts like: http://e2e.ti.com/support/dsp/c5000/f/109/t/258533.aspx?pi73834=3
Hi all,
There was a function call which needed this statement. Once this statement is included the issue is resolved.
*port(#IDLE_ICR) = #(RESERVED_ICR|IPORT_IDLE|HWA_IDLE|DPORT_IDLE)
idle
This was solved internally by our team.
Thanks all for your time.
AV.
Just one last word:
The following statement is also done as part of the initialization, just before the code goes into free run.
*port(#IDLE_ICR) = #(RESERVED_ICR | HWA_IDLE | IPORT_IDLE | XPORT_IDLE | DPORT_IDLE | CPU_IDLE)
In spite of this, the statement mentioned in the previous post needs to be done right at the beginning.
-AV.