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.

TMS320F2800155-Q1: Bootleader Program load exception,PWM interrupt does not run。

Part Number: TMS320F2800155-Q1

Tool/software:

Dear Team:

When I downloaded the program and jumped to the APP,I found that my PWM interrupt would not trigger,At this point, I must power off again. After re-powering on, the program runs normally.And when I simulated it alone, the program worked fine.

At the same time, I compared the data downloaded into the RAM and found that it was consistent with the hex I downloaded. May I ask why this might be?At the same time,.

my CAN communication interruption and timer interruption are normal.

The PWM interrupt is the reference routine epwm ex2 updown aq.c.

At the same time, I would also like to ask what are the conditions for this interrupt to be triggered?

Looking forward to your reply。

Best Regards

Zhang

  • Correction, presentation error, nothing abnormal when comparing flash and hex data

  • Hi Zhang,

    The PWM interrupt in reference is generated when the TBCTR == ZRO.

    For ePWM1, ePWM2, and ePWM3 have the interrupt only get generated when a total of three TBCTR==ZRO events occur. This is the condition for the interrupt to be triggered.

    BEst,

    Ryan Ma

  • Hi Ryma Ma,

    Can you help me analyze why bootleader jump PWM interrupt cannot be triggered.Can you give me some ideas.thanks

    Best 

    Zhang

  • Hi Zhang,

    Few things to confirm.

    1. Is your EPWM running as expected that is generating the interrupt? (TBCTR incrementing in the live expression window in CCS?)

    2. Do you see the event trigger flags being set? ETFLG?

    3. Are you clearing the event trigger flags and interrupt flags like in the example?

    3. You mention the interrupt generates only after you do a power cycle?

    Best,

    Ryan Ma

  • Hi Ryan Ma,
    Thank you very much for your reply,But I don't think I'm being very clear,I'll say it again。When I simulate normally, my program is fine.

    The problem is that when I use bootleaer to write, I cannot trigger the PWM interrupt, and the power must be restarted to work normally, so if I do not simulate now, how can I confirm the above problem you said?

    Best 

    Zhang

  • Hi,

    The expert is out of office today, please expect a response back by Monday.

    Thank you,

    Luke

  • Hi Zhang,

    Understood, let me ask a bootloader expert on this as to why the PWM interrupt is not able to be generated and requires a restart for it to work normal.

    Best,

    Ryan Ma

  • Hi Zhang,

    When I simulate normally, my program is fine.
    1. By the above, do you mean you are running the program with CCS debugger connected? 
    2. Are you only running the application code with CCS? Or are you using Emulation Boot mode to simulate booting the device, loading program via the bootloader, etc.?
    3. Which boot mode are you using to load program?

    Best Regards,

    Allison

  • Hi Allison Nguyen,

    I'm repeating my question,When I use the emulator to burn, or when I use the emulator to simulate the program, the PWM interrupt is no problem,However, when I used the Bootloader to update the program, the PWM interrupt could not be triggered after the program ran to the APP.I have seen similar questions raised in the forum, but have not been resolved in response。

    Best Regards,

    Zhang

  • Hi Zhang,

    Please let me know the following information:

    1. What bootloader are you using? Are you booting via some communication peripheral such as SCI and using this to load program onto the device?
      1. Are you using a flash kernel for this?
    2. Have you used emulation boot mode to boot the device?
    3. After loading program to the device, can you connect to the CPU and load the symbols of the program .out so that you can step through and debug?

    It is hard to assess what is going on without having visibility into what the device is running and what the interrupt registers look like. If you are able to connect to the device while it's having issues with generating PWM interrupts, I'd like to see what specific values are in the registers. There is one interrupt path that the PWM interrupt generation takes through the PWM module, PIE module, and CPU -- hence I would like to see the CPU interrupt registers, PIE group registers, and the PWM Event Trigger registers are.

    Best Regards,

    Allison