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.

CCS/TIDM-1000: TIDM-1000 sample project, boot from flash

Part Number: TIDM-1000
Other Parts Discussed in Thread: TMDSCNCD28379D,

Tool/software: Code Composer Studio

Hello,I'm doing some preliminary tests with the TIDM-1000 development kit. I'm using a TMDSCNCD28379D controlCARD. By following the document TIDUCJ0G I've set up the project pfc3phvienna_F2837x and I am able to debug the code from Code Composer Studio 10 without problems. However, I'm not able to boot the code from flash: if I power cycle the board, the diagnostics LEDs on the controlCARD stay off and also the current drain indicates that the code does not run. The diagnostics LEDs should be switched on in the main() function, therefore apparently the execution does not even get to main().

I believe that the controlCARD is configured correctly: I've loaded the sample project led_ex1_blinky and it boots fine from flash.

I suppose there is some section in the pfc3phvienna_F2837x project that does not get copied correctly from flash to RAM. The initialization is done in device.c in the function Device_init(void), see code below. Obviously _FLASH is defined.

Do you have any idea? Thank you!

L.

#ifdef _FLASH
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);

// now copy any additional code that needs to be copied from flash to ram
memcpy(&isrcodefuncsRunStart, &isrcodefuncsLoadStart,(size_t)&isrcodefuncsLoadSize);
#endif

  • Hi Larry,

    Just want to confirm you are using TIDM-1000 in our latest DPSDK(v3.01.00.00), correct?

    Are you saying D2 and D3 are not blinking in the controlcard?  

    Regards,

    Chen

  • Hello Chen, that is correct.

    The main() function switches on D2 and D3, then during the code execution D3 stays on and D2 blinks. This is what happens when I load or debug the code from CCS. Instead if I start the board with a power cycle, D2 and D3 stay off and the current drain is the same as when the CPU is halted (about 30-40 mA less than the normal execution).

    I've done some more testing, and I've discovered that this problem happens only with INCR_BUILD=1 and INCR_BUILD=2. With INCR_BUILD=3 or INCR_BUILD=4, the board boots correctly after a power on.

    Perhaps the execution does get to the main(), but then it hangs somewhere else due to some variable that does not get initialized when INCR_BUILD=1 or 2. 

    Thank you!

    L.

  • Hi Larry,

    Thank you very much for your detailed information. In our latest SDK, this should work theoretically. I am going to check it on my end and will get back to you ASAP.

    Regards,

    Chen

  • Ok, thank you. There is no rush however, since for my next tests I will mostly use INCR_BUILD=4. This is just to make sure that there aren't any "subtle" malfunctions due to uninitialized values. I've noticed some spurious behaviors in some conditions, for example when I remove the AC input voltage and then I re-apply it. Anyway if I find problems I will let you know.

    By the way, I've just noticed that you are one of the authors of the design guide! Congratulations, all the TIDM-1000 project (software, hardware and documentation) is very well made, I've been able to set it up and make it work literally in one day. Keep up the good work!

    L.