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.

TMS320F280049C: SPRACO3 SysCtl_delay()

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE, LAUNCHXL-F280049C

Hi there, I’m trying to evaluate a TMS320F280049C launchpad with a 3PhGaNInv booster board. I’ve been going through the document SPRCO3 (found at this TI link): https://www.ti.com/lit/an/spraco3/spraco3.pdf?ts=1629130699832&ref_url=https%253A%252F%252F

I'm getting the following error:

“No source available for "SysCtl_delay() at C:/Users\danie\dual_axis_drive\dual_axis_servo_drive_fcl_qep_f28004x\F28004x_RAM\dual_axis_servo_drive_fcl_qep_f28004x.out:{3} 0x3fb02a{4}"

Dan

  • SysCtl_delay() is an assembly macro, so CCS is having trouble displaying the source like it would a normal C function. You can find the code in the driverlib sysctl.c file though if you want to look at it.

    Regardless, there's no ESTOP0 instruction in SysCtl_delay(), so it appears that's not actually what's being executed here. From the address, I can tell it's the "wait boot" mode in the boot ROM.

    Is this happening immediately after loading the program? If you hit the reset and restart buttons in CCS, can you get it to go to main() or does it keep getting stuck at 0x3fb02a?

    Whitney

  • Hi Whitney, it gets stuck on this line immediately after loading. If I do a restart and then a reset it goes to another line of code (however I can only see the line in the disassembly view). I can then step through the code, but if I hit resume it gets stuck on this instruction again.

    Is the issue displaying the source code related to what you mentioned about assembly macros? (I may just be misunderstanding something here)

    Also, when I do a 'rebuild' on the code I get the following:

    After the clean it builds successfully. Could this be causing an issue? I checked the location and it looks like these files exist, but the second to last line of the file path in between the forward and back slash (\sources/, \src_device/, \src_driver/, etc.) is not part of the actual file path.

    Thanks so much for the response, let me know if there's any more info I could get you.

    Dan

  • Errors during the clean step of a rebuild aren't a problem as long as the project builds in the end.

    It seems like you're getting an extra reset that's landing you back in the boot ROM. Can you go to Tools -> Debugger Options -> Program/Memory Load Options and try it with the "Reset the target on a program load or restart" box unchecked (if it's not already unchecked)?

    Whitney

  • Hi Whitney, here are the options I have selected. I deselected 'reset the target on a program load or restart' (which the document instructions had told me to select), but got the same results. Here's the debug screen:

    I apologize for the delayed response, I've been ill the past couple of weeks.

    Daniel

  • In the debug perspective if you go to Scripts -> EMU Boot Mode Select -> EMU_BOOT_RAM and then try reseting and restarting, does that make a difference?

    In the registers view, can you look up CpuSysRegs.RESC and see what bits are set?

    What version of the MotorControl SDK are you using? Have you tried some other C2000Ware examples and confirmed its just this application that has this problem?

    Whitney

  • I think that may have resolved the issue with the extra reset instruction. However I still am not able to see any kind of wave generated in the imported plot. I can spend some more time playing with this tomorrow and give you some more details.

    My Motor control SDK version is 3.02.00.00. Here's the register you wanted to see.

    I had gone through a few sample projects a month or so ago for getting familiar with the launchpad (without the booster board). However this I believe is the only project available with files configured for our combination of boards and haven't been able to make it past the first build phase. We aren't interested in the dual motor application but just want to figure out how to get a motor running off of this. 

  • Thanks for sharing the RESC reg. It still seems like it's something CCS is doing to reset the device--not a watchdog or hardware issue. I'm a little surprised "Reset the target on a program load or restart" wasn't the culprit (that instruction should be removed from the document).

    The EMU_BOOT_RAM sets the emulation boot configuration to boot from RAM, so even if it does get a reset it will start executing your application from RAM instead of getting stuck in wait boot. So it doesn't really explain where the extra reset is coming from but it is a work around.

    Can you see the isrTicker incrementing?

    Whitney

  • Yes - the Isr ticker is incrementing.

    I had previously gone through a lab on system initialization in another document (TMS320F28004x Microcontroller Workshop) which involved the watchdog. But I don't think that would affect what we are doing here?

    I have an oscilloscope hooked up to check whether it just wasn't displaying in ccs. The power is on and going to the booster board but no pwm..

    On page 28 of the document there's a warning about the proper reset procedure for real time options (it seems like it would be better to have this at the beginning of the instructions haha). I can't imagine I've done the procedure correctly every time in the time that I've spent fiddling with this. Could the issue be related to this (would there be a way for me to check)?

    Thanks again!

  • Hi Daniel,

    Now that you have got the ISR ticking, what issue are you referring to.

  • Hi Daniel,

    Yes - the Isr ticker is incrementing.

    Have you reduce the project optimization to 0 or 1 and speed 1 or 2? CCS debug F5 or F6 will often jump over app code with optimizations set to global. Click on view to add and check the break points tab inside debug.  

  • Hi Ramesh, as per the posts above the issue has been generating the pwm wave and having it display in the imported graph. Am I wrong to assume the code should be doing this at this point? Are there more values in addition to enableFlag in the expressions window I should be setting? (I tried editing the expressions associated with the variables mentioned at the bottom of p 24).

    When I run the code, CCS first freezes up for a couple of minutes and displays these values:

    I'm not sure where these numbers are coming from. After a few minutes I am able to edit the enable flag to set it back to 1 and the voltage in the graph drops to 0.

  • Hi GI, The optimization level in the compiler (if this is what you mean) was set to 4, and 'speed vs size trade off' 5. I'll try varying this (but the compiling optimization shouldn't affect the output file (or is there another setting for project optimization)?

  • Daniel,

    What is the build level you are evaluating? I assume you are at LEVEL 1.

    The user guide is supposed to help you with evaluation. Are the instructions in the user guide not clear? 

  • Hi Ramesh, that's correct I'm at build level 1. The instructions are clear enough; what isn't clear is what is going wrong when I don't end up with the anticipated result from the instructions. I've tried to follow these closely and have gone through them multiple times, but it's possible I've missed or failed to understand something. By the user guide are you referring to the document mentioned above (SPRACO3) or to a different document?

  • Hi Daniel, pls give us a few days to see how we can help.

  • Thank you, I very much appreciate it. Please let me know if there's more detailed information I could get you.

  • 1. Please make sure that dual BOOSTXL-3PHGAN inverter board are connected to the LAUNCHXL-F280049C as described in the user's guide.

    2. Please check if motorVars[0].isrTicker and motorVars[1].isrTicker is increasing after setting "enableFlag" to "1".

    3. Please check if motorVars[0].tripFlagDMC and motorVars[1].tripFlagDMC equal to "0", if not, that means the BOOSTXL-3PHGAN is not connected correctly.

    BTW, please don't need to enable the silicon Real Time mode to run the code on F28004x.

  • Both isrtickers increment. MotorVars[0].tripFlagDMC has a value of 0 and motorVars[1].tripFlagDMC has a value of 3. I think I had been assuming this would run with only one inverter board connected. Thanks!

  • Yes. You can just run one motor with this example if you don't have two boostxl boards although it's for dual motor control.

  • Great, I'm using this because it's the motor control example code I was able to locate and not because it is for dual motor control.