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,
I am using a custom F28335 board with external SRAM (256 kB x16). The off chip SRAM is mapped to Zone 6 (origin=0x100000, length=0x40000).
The size of the variables used in the program is well within the SRAM and FLASH capacity of the board.
When i debug the code in SRAM, the code is working fine. Similarly when i debug the code in FLASH it is also working fine.
But, when i disconnect the DSP board from emulator, the programming is not running in DSP.
I am initializing the external memory in DSP2833x_CodeStartBranch.asm using InitExtMemIf
I have got InitExtMemIf. asm (David M. Alter) file from my previous post in TI community and have modified it. i have attached the assembly file for reference.
I have done modifications in the InitExtMemIf. asm file based on the value of GPCMUX1, GPCMUX2, GPBMUX1, GPAMUX2 and XTIMING6 given in the gel file.
As the program works well in debug mode, i just used the value present in the gel file to initialize the GPCMUX1, GPCMUX2, GPBMUX1, GPAMUX2 and XTIMING6 in InitExtMemIf. asm file.
Kindly help me in identifying the issue.
Regards,
subash
Hi Subash,
Could you explain a bit more about the flow for your program? What is the use case of SRAM in this case and how the code/data is getting loaded into SRAM?
I assume you are BOOTING the device from Flash in this case and you have set the BOOTMODE pins appropriately for the same.
Regards,
Vivek Singh
Hi Vivek Singh,
i just mapped the .ebss section to external memory. My .cmd file is as follows,
MEMORY
{
PAGE 0:
BEGINRAM: origin=0x0, length=0x2
RAMM0: origin=0x2, length=0x3fe
OTP: origin=0x380400, length=0x400
FLASH: origin=0x300000, length=0x3fff6 (On chip FLASH)
BEGINFLASH: origin=0x33fff6, length=0x2
CSM_PWL: origin=0x3f7ff8, length=0x8
IQTABLES: origin=0x3fe000, length=0xb50
IQTABLES2: origin=0x3feb50, length=0x8c
FPUTABLES: origin=0x3febdc, length=0x6a0
ROM: origin=0x3ff27c, length=0xd44
RESET: origin=0x3fffc0, length=0x2
VECTORS: origin=0x3fffc2, length=0x3e
//RAML4L7: origin=0xc000, length=0x4000
ADC_CAL: origin=0x380080, length=0x9
ZONE7P: origin=0x100000, length=0x40000 (OFF chip SRAM)
PAGE 1:
RAML0L3: origin=0x8000, length=0x8000
RAMM1: origin=0x400, length=0x400
ZONE7D: origin=0x210000, length=0x10000
}
SECTIONS
{
.vectors: load = 0x000000000
.text: > FLASH, PAGE = 0
.switch: > FLASH, PAGE = 0
.bss: > RAML0L3, PAGE = 1
.ebss: > ZONE7P, PAGE = 0
.far: > RAML0L3, PAGE = 1
.cinit: > FLASH, PAGE = 0
.pinit: > FLASH, PAGE = 0
.const: > FLASH, PAGE = 0
.econst: > FLASH, PAGE = 0
.reset: > RESET, PAGE = 0, TYPE = DSECT
.data: > RAML0L3, PAGE = 1
.cio: > RAML0L3, PAGE = 1
.sysmem: > RAML0L3, PAGE = 1
.esysmem: > RAML0L3, PAGE = 1
.stack: > RAMM1, PAGE = 1
.rtdx_text: > FLASH, PAGE = 0
.rtdx_data: > RAML0L3, PAGE = 1
IQmath: > FLASH, PAGE = 0
codestart: > BEGINFLASH, PAGE = 0
csmpasswds: > CSM_PWL, PAGE = 0
csm_rsvd: > RAMM0, PAGE = 0
ramfuncs: LOAD = FLASH,
RUN = RAMM0,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
PAGE = 0
.adc_cal: > ADC_CAL, PAGE = 0 , TYPE = NOLOAD
IQmathTables: > IQTABLES, PAGE = 0 , TYPE = NOLOAD
IQmathTables2: > IQTABLES2, PAGE = 0 , TYPE = NOLOAD
FPUmathTables: > FPUTABLES, PAGE = 0 , TYPE = NOLOAD
}
The corresponding linker file is as follows,
MEMORY CONFIGURATION
name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
PAGE 0:
BEGINRAM 00000000 00000002 00000000 00000002 RWIX
RAMM0 00000002 000003fe 0000001f 000003df RWIX
ZONE7P 00100000 00040000 0003eaaa 00001556 RWIX (length is within the OFF Chip SRAM)
FLASH 00300000 0003fff6 00007437 00038bbf RWIX (length is within the On Chip FLASH)
BEGINFLASH 0033fff6 00000002 00000002 00000000 RWIX
ADC_CAL 00380080 00000009 00000007 00000002 RWIX
OTP 00380400 00000400 00000000 00000400 RWIX
CSM_PWL 003f7ff8 00000008 00000000 00000008 RWIX
IQTABLES 003fe000 00000b50 00000000 00000b50 RWIX
IQTABLES2 003feb50 0000008c 00000000 0000008c RWIX
FPUTABLES 003febdc 000006a0 00000000 000006a0 RWIX
ROM 003ff27c 00000d44 00000000 00000d44 RWIX
RESET 003fffc0 00000002 00000000 00000002 RWIX
VECTORS 003fffc2 0000003e 00000000 0000003e RWIX
As you can see the variables sizes are well within the memory. If i run in Debug mode and map the appropriate sections to SRAM, the programming is working fine. If i map the appropriate sections to as FLASH as given above and run in debug mode still it is working. But if i map to FLASH memory and disconnect the emulator it is not working.
It is something to do with initialization of external memory, but i have already initialized the external memory using the InitExtMemIf.asm in DSP2833x_CodeStartBranch.asm. It is nothing to do with the hardware, as it works fine in both SRAM and FLASH programming when i do not use external SRAM. It is something related to initializing the external RAM when the DSP board is disconnected from emulator. Correct me if i am wrong.