Part Number: TMS320F2802
Other Parts Discussed in Thread: CONTROLSUITE, , ENERGIA, C2000-GANG
Tool/software: Code Composer Studio
Hi everybody,
I am new to CCS and I need to program TMS320F28026 microcontroller. For this task, I need to use controlSUITE Software Driver Model because I don't have time for Direct Register Access. The first thing I want to do is simply control a GPIO pin as General Purpose mode. I referred to controlSUITE example "gpio_setup" and to "spruhx9" F2802x Peripheral Driver Library user's guide to make a first sketch shown below:
#include "DSP28x_Project.h"
#include <gpio.h>
GPIO_Handle myGpio;
int main(void) {
myGpio = GPIO_init((void *)GPIO_BASE_ADDR, sizeof(GPIO_Obj));
GPIO_setDirection(myGpio, GPIO_Number_3, GPIO_Direction_Output);
GPIO_setMode(myGpio, GPIO_Number_3, GPIO_3_Mode_GeneralPurpose);
GPIO_setHigh(myGpio, GPIO_Number_3);
GPIO_setPullUp(myGpio, GPIO_Number_3, GPIO_PullUp_Enable);
GPIO_setQualification(myGpio, GPIO_Number_3, GPIO_Qual_ASync);
return 0;
}
GPIO3 doesn't go high.
No errors, no warnings. Everything seems to be right at compilation.
I use CCS 6.2.0, TI v15.12.3.LTS compiler, and C2000-GANG programmer. Before using controlSUITE, I tried Energia library and GPIO and other peripherals were working fine.
Is my code correct? Should I do modifications in controlSUITE library to make this work?
Regards,
Sébastien