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.

TMS320F28335: Infinite while(1) loop in basic F28335 project eventually escapes the while(1) loop

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE

I am using the F28335 microcontroller with CCS Studio 12.5.  I have used the project wizard to make a simple main.c project, and then I have added this very simple main() function:


int rmt_counter = 0;
int main(void)
{
    while (1)
    {
        rmt_counter++;
    }

	return 0;
}

When I view the variable "rmt_counter" in the debugger, and with the graphing tool, I see that the variable eventually stops incrementing at a value of 9328:

After that, if I pause the debugger, I get en error tab:

No source available for "_system_post_cinit() at C:\Users\gtg25\Desktop\HIL_8_single_double_switch\rmt_rev8_HIL_28335\PI_Double_switch\uC_28335\Debug\controlller_rev1.out:{3} 0x3ff9fa{4}"

My question is: why is my while(1) loop escaping?  Shouldn't my rmt_counter variable keep incrementing until it rolls over?

  • No source available for "_system_post_cinit() at C:\Users\gtg25\Desktop\HIL_8_single_double_switch\rmt_rev8_HIL_28335\PI_Double_switch\uC_28335\Debug\controlller_rev1.out:{3} 0x3ff9fa{4}"

    This error comes about because the specific file/library is not included in the immediate project; I'm not sure if this is the case for you or not, but you can double-check the code that's being run by opening the Disassembly window and looking at the assembly code; C code should be mapped correctly if the file is being debugged.

    My question is: why is my while(1) loop escaping?  Shouldn't my rmt_counter variable keep incrementing until it rolls over?

    It should as long as you don't have any interrupts or errors occurring within your code. Is this project something you created from scratch or based off the empty example project in C2000Ware? As a recommendation, always start your project off an example that closely matches what you're trying to accomplish (the universal_project example can be used as a basic template for all projects).

  • Thank you for your help Omer!  I am looking at the C2000ware (version 5.01), and I can't seem to find the "universal_project" directory in the F2833x examples.  Can you point me to where I should look for this project?

  • Apologies, this is an older device so there is no universal project, instead you can use the cpu_timer project as a template since there is no empty project template provided.