Dear all,
I must be too clumsy, but I'm not succeeding and maybe you can help me. I think is a very simple question but for the moment I am not able go on.
I am trying to test GPIOs on TMDSEVM6678L using my own program. I would like to switch on/off GPIO15, which is on pin 80 of the connector TEST_PH1. With a polimeter in that pin, I am able to see if this GPIO switch.
The program I am using is the same as the "UART_BasicExample_C6678_C66xExampleProject" with minor modifications, basically I have added the lines to toggle GPIO15 and the includes I think are needed.
This is the full program:
***********************************************
#include "stdio.h"
#include "stdint.h"
#include "stdlib.h"
#include "string.h"
/* CSL Header files */
#include <ti/csl/csl_chip.h>
/* UART Header files */
#include <ti/drv/uart/UART.h>
#include <ti/drv/uart/UART_stdio.h>
#include <ti/drv/uart/test/src/UART_board.h>
#include <ti/csl/soc.h>
#include <ti/csl/hw_types.h>
/* TI-RTOS Header files */
#include <ti/drv/gpio/GPIO.h>
#include <ti/drv/gpio/soc/GPIO_soc.h>
#include <ti/board/board.h>
#include "GPIO_log.h"
#include "GPIO_board.h"
/* Length of the input in number of characters */
#define INPUT_LENGTH (16U)
char echoPrompt[]="\nuart driver and utils example test cases :\nEnter 150 characters or press the esc \n";
char echoPrompt1[]="DATA RECEIVED IS\n ";
/**********************************************************************
************************** Macros ************************************
**********************************************************************/
#define DELAY_VALUE (500U) /* 500 msec */
/**********************************************************************
************************** Internal functions ************************
**********************************************************************/
/* Delay function */
void AppDelay(unsigned int delayVal);
void Gpio_appC7xPreInit(void);
void Board_initUART(void)
{
Board_initCfg boardCfg;
GPIO_v0_HwAttrs gpio_cfg;
GPIO_socGetInitCfg(15, &gpio_cfg);
boardCfg = BOARD_INIT_MODULE_CLOCK |
BOARD_INIT_UART_STDIO;
Board_init(boardCfg);
}
//////////////////////////////////
//////////////////////////////////
void main()
{
char input = '\n';
char *buffPointer;
Board_initUART();
buffPointer = (char*)malloc(INPUT_LENGTH);
memset(buffPointer,0,INPUT_LENGTH);
UART_puts("\nuart driver and utils example test cases :\nEnter 16 characters or press the esc \n",sizeof("uart driver and utils example test cases : please enter 16 characters or press the esc or carriage return\n"));
memset(buffPointer,0,INPUT_LENGTH);
UART_gets(buffPointer, INPUT_LENGTH);
UART_puts(&input,1);
UART_printf("Data received is\n");
UART_puts(buffPointer, INPUT_LENGTH);
UART_printStatus("\nTest Passed\n");
UART_puts("\nuart driver and utils example test cases :\nEnter 16 characters or press the esc \n",sizeof("uart driver and utils example test cases : please enter 16 characters or press the esc or carriage return\n"));
UART_puts("\nGPIO15 Test \n",sizeof("GPIO15 Test\n"));
GPIO_write(15, GPIO_PIN_VAL_HIGH);
AppDelay(DELAY_VALUE);
GPIO_write(15, GPIO_PIN_VAL_LOW);
AppDelay(DELAY_VALUE);
} /* uart_test */
/*
* ======== AppDelay ========
*/
void AppDelay(unsigned int delayVal)
{
Osal_delay(delayVal);
}
*********************************************************
Next picture are the includes:
When building I get:
error #10234-D: unresolved symbols remain
I have tried many things but without succeed.
Doy you have an idea what I miss?
Are the lines to switch on/off the GPIO15 correct? Do I need anything else?
If you need any further information please let me know.
Thanks in advance,
Joaquin.