I have bought TMS320C6657 board. I installed CCS5.1.x. I am looking for some example project through which I can control GPIO and Timers. In the technical resource, I do not see any example project available. Any help will be appreciated.
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.
I have bought TMS320C6657 board. I installed CCS5.1.x. I am looking for some example project through which I can control GPIO and Timers. In the technical resource, I do not see any example project available. Any help will be appreciated.
Hi Shuja,
Regarding Timers, if you don't need to access a hardware timer directly, Clock module of SYS/BIOS provides some timer and clock related functionality. You will find an example code of BIOS Clock module as following.
Regarding the GPIO, I'm afraid that I don't know if we provide an example code (colleagues may help), but my opinion is it is comparably easy to control GPIO by registers directly. You will see GPIO User Guide here (http://www.ti.com/lit/ug/sprugv1/sprugv1.pdf) and Table 2-2 of the Data Manual (http://www.ti.com/lit/ds/symlink/tms320c6657.pdf) covers GPIO registers address.
Best Regards,
Atsushi
Hi Shuja,
to use the GPIO you just have to open it with
CSL_GpioHandle ghGpio = CSL_GPIO_open(0);
then you can configure each pin as either input or output.
For example, to configure bit 15 (pin 80 on the connector) as output, you make
CSL_GPIO_setPinDirOutput (ghGpio, 15);
and now, to put a 1 on this bit you make
CSL_GPIO_setOutputData(ghGpio, 15);
and to put a 0 you make
CSL_GPIO_clearOutputData(ghGpio, 15);
I only use it as output, but using it as input may be pretty similar.
Best regards,
Alejandro
Hi,
Thanks for your reply.
I was able run one of NotifyExample project successfully.
In its code, I tried using GPIO function using the following command.
CSL_GpioHandle ghGpio = CSL_GPIO_open(0);
I also included the following header file
#include <ti/csl/csl_gpio.h>
But, it get compilation error that "csl_gpio.h" file not found.
I am using SYS/BIOS. I dont know if CSL can be used with SYS/BIOS...
Any help would be appreciated.