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.

TMS320F28075: Making BLINKY toggle using the most simplest interrupt the c28x has to offer. Please help.

Part Number: TMS320F28075
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Tool/software:

Hi Guys, I'd like to make a LED toggle continuously regardless of whatever the CPU is doing. Obviously it has to be in a ISR.

Can someone PLEASE PLEASE PLEASE show me some code ( preferably in assembler ) on how to do this? I've attempted it so many times and it just doesn't work for me so I'm asking for help.

I just need the most simplest of code to flash ( toggle ) an LED using a basic interrupt. It does not have to be a time critical interrupt.

I really hope someone can help.

Thanks guys, hope to hear from you soon.

Pete. Slight smile

  • Hi Pete,

    If you are just looking to toggle the LED at a specific frequency, I would suggest using the ePWM module - documentation here. The module can run without CPU intervention once it is configured since it's a hardware peripheral on the device. Would this satisfy your requirement?

    Best Regards,

    Delaney

  • Hi Pete,

    If you are just looking to toggle the LED at a specific frequency, I would suggest using the ePWM module - documentation here. ePWM is a built in hardware peripheral on the device. The module can toggle a pin at a specific frequency and do so without CPU intervention (after initial configuration). Would this satisfy your requirement?

    I don't know of many examples we offer in assembly. I would suggest using one of our high-level drivers to configure the Sysconfig settings in another project and looking at View >> Disassembly with the debugger connected to see the generated assembly code. 

    Best Regards,

    Delaney

  • Hi Delaney, thank you for your reply . The C language never likes me. Every time I load up a C program in CCS and then build it, CCS can't find this library or this include file and it really gets up my nerves that's why I program in Assembler. I've tried many times to load C programs but with out any luck at all.

    It's a good idea to load up one of your examples and then look at the disassembly but as I said, loading a C program NEVER builds with no errors. There is ALWAYS something it can't find or the code is looking for some other C file or library and it can't find it. Grrrrrrrrr. 

    I'll try again with one of your examples but I'm pretty sure I won't get anywhere.

    ePWM I've already looked into and its not what I'm looking for. I need an interrupt that will run a piece of my assembler code non stop while the C28x is working on other none important tasks. 

    Do you think you could build a C program that just runs an interrupt and then download the disassembly to me, would that be ok? You would NOT believe how much I would super appreciate it. 

    Please let me know and thank you so much for replying.

    Cheers

    Peter.

  • Hi Peter,

    Every time I load up a C program in CCS and then build it, CCS can't find this library or this include file and it really gets up my nerves that's why I program in Assembler.

    That is quite strange - are you starting by importing an example project from the C2000ware SDK? This will make sure all the proper files and paths are included automatically. We have an empty project in the path: [C2000ware path]/driverlib/f2807x/examples/cpu1/empty_projects/. I would highly suggest getting your setup working with C especially for any sort of complex application behavior. Please send any issues you have with this, and I can try to help. 

    ePWM I've already looked into and its not what I'm looking for. I need an interrupt that will run a piece of my assembler code non stop while the C28x is working on other none important tasks.

    There is only one C28x core on this device which can only run one line of code at a time (whether it be code in an interrupt or the main loop). If by "nonstop" you mean just when the C28x is not working on important tasks inside of interrupts, then this could be achieved by putting your lower priority code in the main loop. Another option is the CLA core which is available on this device, it can certainly be used to toggle a GPIO. Although for this, I would again highly suggest getting your setup working with C. 

     Best Regards,

    Delaney

  • Hi Delaney, thank you for all that. When I return to my office I'll create an empty project in C and then import your C2000ware programs and hope it works. If it doesn't then I'll let you know. In fact I'll let you know either way if it worked for me or not.

    Thanks Delaney, have a great day. Cheers Slight smile

    Peter

  • Hi Peter,

    Sounds good, hopefully the process goes smoothly. I will keep this thread open and await your response then.

    Best Regards,

    Delaney