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.

Compiler/TMS320F28035: Running Code as Stand Alone Application

Part Number: TMS320F28035

Tool/software: TI C/C++ Compiler

Hello I am trying to use the code as standalone application in 28035. I have been able to flash the code successfully on my custom board.

I have followed the this document -http://www.ti.com/lit/an/spra958l/spra958l.pdf 

I am able to flash code using JTAG. But it does not run as stand alone application.

memcpy((void *)0x000D06, (Uint16 *)&PieVectTableInit+6, 256-6) This causes error of PieVectTableInit not initialized.

So I have commented that line and it Runs in flash but not in standalone mode.

My Procedure is as followed:

 Remove the 28035_RAM_Ink.cmd from my project
 Add the F28035.cmd into my project (Right click on my project -> Add files -> F28035)
 Add the following piece of code into my main function:
 

1
2
3
4
5
/*** Initialize the PIE_RAM ***/
PieCtrlRegs.PIECTRL.bit.ENPIE = 0; // Disable the PIE
asm(" EALLOW"); // Enable EALLOW protected register access
memcpy(&PieVectTable, &PieVectTableInit, 256);
asm(" EDIS"); // Disable EALLOW protected register access
 

.

// Copied time critical code and Flash setup code to RAM
// This includes the following ISR functions: epwm1_timer_isr(), epwm2_timer_isr()
// epwm3_timer_isr and and InitFlash();
   memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (Uint32)&RamfuncsLoadSize);
  • Please check these suggestions out.
    processors.wiki.ti.com/.../FAQs

    Regards,
    Manoj
  • I referred that Still I am not sure why it is not working!
    Is there any Documentation available to refer the steps for it?
  • Thank you for your patience. Are you still having trouble with this issue?

    If so, can you give me a little more explanation? Did you try the debugging technique mentioned on the wiki page Manoj linked you to? What did you see?

    Thanks,
    Whitney
  • Hi Whitney,

    I am able to Run in standalone mode now. But I have a problem.
    The Epwm isr runs at slower rate in standalone mode than at flash using JTAG.
    So I have copied EPWM isr to ram but still it is taking long time to trigger in standalone mode.

    Can you explain what could be the cause?

    Thanks
    Sagar
  • Are you saying that the ISR is taking longer to execute or that the latency to get into the ISR is greater? The EPWM itself is running at the same frequency, correct?

    How are you measuring this? Toggling a GPIO in the ISR?

    Whitney

  • I mean there is latency to get into ISR. Yes I am toggling Gpio in ISR.
    Epwm is running at different value of Tbprd. But the same code in Emulation works fine. I mean there is no latency to get into ISR but when I use a standalone mode there is a latency to get into ISR. I have measured the Gpio timings in the scope too.

    Thanks

  • Hey Whitney-

    I still have this odd problem. The is latency in which epwm isr triggers. in Emulation mode there is no latency in epwm isr to trigger. But in standalone mode there is latency for the Epwm ISR to trigger for same code.

    So what should I do to reduce the latency? Also the epwm ISR exception time is constant but there is latency difference in both modes.
    I hope you understand the problem now.
  • Hey Whitney,

    Did you have a chance to look at my previous comment and understand the problem?

    Thansks
  • I noticed you made another post on your PWM issue:

    e2e.ti.com/.../2480007

    For the sake of not having duplicate threads going, I'm going to close this thread and we'll work on resolving your issue in the new one.

    Whitney
  • I am really having an issue and want to resolve this problem asap as I have product release soon. Is there any way I can have it someone view it in expedited?

    The problem is that I have been getting response very late. So whats the way to have that happen quickly resolved?

    Is there a way I can get hold of an expert directly and not going through so many things back and forth over a lot days? 


    Thanks

  • For those who may be following this thread, the issue was resolved here: e2e.ti.com/.../2488107

    Closing this thread.

    Whitney