Hello All,
I am having a strange problem with booting f28335. I have seen alot discussion about it but as i am starter so reading them isn't helping much.
I am programming through Matlab Simulink with CCS toolchain. So actually I only have blocks and I dont write any C++ code in CCS. Matlab creates it itself.
I had been using the f28335 for smaller and less complex application and it was working fine.
As the new application involves Fourier Transforms so my .ebss object became big to fit in old memory map.I increased the RAM0L3 for data (origin=0x8000, length=0x6000 which was previously origin=0x8000, length=0x4000). It reduced the portion for RAM4L7 where it is specified code(origin=0xe000, length=0x2000 which was previously origin=0xc000, length=0x4000)
Now when i program through emulator, it works fine. But when i power off/on again, it is stuck somewhere. But while it is stuck, I connect through emulator to CCS and RUN code again, it starts working again. Also if I press the reset button on the board with emulator disconnected , it starts working which ensures that atleast the RESET button knows where is the start of code. But on Power on/off, it doesn't work.
Here is my .cmd file made in CCS.
MEMORY { PAGE 0: BEGINRAM: origin=0x0, length=0x2 RAMM0: origin=0x2, length=0x3fe OTP: origin=0x380400, length=0x400 FLASH: origin=0x300000, length=0x3fff6 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=0xe000, length=0x2000 ADC_CAL: origin=0x380080, length=0x9 ZONE7P: origin=0x200000, length=0x10000 PAGE 1: RAML0L3: origin=0x8000, length=0x6000 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: > RAML0L3, PAGE = 1 .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 } -l "C:\MATLAB\R2012b\toolbox\idelink\extensions\ticcs\c2000\c2833xPeripherals.cmd"
and my CodeStartBranch.asm code is:
*********************************************************************** WD_DISABLE .set 1 ;set to 1 to disable WD, else set to 0 .ref _c_int00 .global code_start *********************************************************************** * Function: codestart section * * Description: Branch to code starting point *********************************************************************** .sect "codestart" code_start: .if WD_DISABLE == 1 LB wd_disable ;Branch to watchdog disable code .else LB _c_int00 ;Branch to start of boot.asm in RTS library .endif ;end codestart section *********************************************************************** * Function: wd_disable * * Description: Disables the watchdog timer *********************************************************************** .if WD_DISABLE == 1 .text wd_disable: SETC OBJMODE ;Set OBJMODE for 28x object code EALLOW ;Enable EALLOW protected register access MOVZ DP, #7029h>>6 ;Set data page for WDCR register MOV @7029h, #0068h ;Set WDDIS bit in WDCR to disable WD EDIS ;Disable EALLOW protected register access LB _c_int00 ;Branch to start of boot.asm in RTS library .endif ;end wd_disable .end ;//=========================================================================== ;// End of file. ;//===========================================================================
Hope its not a big problem for a lot of you out there :)
Regards,
Adil