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.
Tool/software: Code Composer Studio
Hi,
I look for an advice. My circuit has on board f28379D MCU. Everything works well, however, I try to do some standalone tests and I want the processor to boot to flash memory after reset/power down it fails. The GPIO72/84 are "1" and TRST is 0 when debugger (XDS100) is disconnected. This should by default chose the GetMode as a boot option? My application doesn't start after power down. However, when I run blink example from controlSuite it toogles the pin after power down.
The RAM/FLASH target configurations change the linker file true? So with both options I should be able to boot to flash? (Of course when running from flash memory particular functions need to be copied and run from RAM).
Thanks a lot for any clue.
Hi Rajaravi Krishna Katta,
Thank you for the response. Of course I have reviewed this resource before. I have debugged this problem a bit and it looks like the FLASH build configuration works. However, in my application I track the fundamental frequency of a signal and modulate properly a discrete time filter. Without any details, what happens is after powering down or resetting MCU it boots to flash (if FLASH configuration is chosen) but stays in a PWM frequency that peripheral is initialized to at the beginning of main(). It means it doesn't follow the update of PWM period which is done in the interrupt routine of Ecap module (which is responsible for tracing the frequency).
The routine is here for reference:
__interrupt void ecap1_isr(void) { result1=ECap1Regs.CAP2/20; EALLOW; CpuSysRegs.PCLKCR0.bit.TBCLKSYNC = 0; EDIS; EPwm2Regs.TBPRD = (result1)/fratio; // Set timer period EPwm2Regs.CMPA.bit.CMPA = (result1)/fratio/2; // Set compare A value EALLOW; CpuSysRegs.PCLKCR0.bit.TBCLKSYNC = 1; EDIS; ECap1Regs.ECCLR.bit.CEVT2 = 1; ECap1Regs.ECCLR.bit.INT = 1; // // Acknowledge this __interrupt to receive more __interrupts from group 4 // PieCtrlRegs.PIEACK.all = PIEACK_GROUP4; }
If I use RAM build configuration after power down nothing happens what is expected. This looks good.
I have 2 questions:
- How can I disable RAM/FLASH configurations and use other .cmd linker file? If I create a project based on provided examples most of them have default build configurations allowing to chose between FLASH/RAM. How can I see which linker file is used by a given configuration?
-Is it possible thay the existing linker file doesn't assign some critical section to flash what causes this strange behavior?
Thanks a lot.
HI,
Thank you for the response, I see the linker file. I have seen it in the controlSuite folders but couldn't see the link in CCS.
Basically the update of PWM period ( routine in my previous reply) doesn't happen. It look like the code doesn't enter the interrup routine. Is there anything additional that should be done to the PIE vector when booting to flash? Something like copying to RAM flash related functions before FlashInit() call is made?
Lukasz
In the document SPRA958L (Running from Internal Flash) there is a routine :
/*** Initialize the PIE_RAM ***/ PieCtrlRegs.PIECTRL.bit.ENPIE = 0; // Disable the PIE asm(" EALLOW"); // Enable EALLOW protected register access memcpy((void *)0x000D00, &PieVectTableInit, 256); asm(" EDIS"); // Disable EALLOW protected register access
for copying PIEVect to RAM. However, in the existing example codes inside of InitPieVectTable() function, the content is copied using pointers to the section PieVectTableFile.
Do I understand correctly that it already takes care of copying PieVEct to proper RAM locations independently if from FLASH or RAM? So I do not need to use the routine from SPRA958L (Running from Internal Flash) ?