Dear community members,
I am currently working on an application for my CC3200_LaunchPad, which allows me to run two tasks independently from each other. The first task should collect data from a sensor while the other task transfers the Data via WLAN to a notebook. Now, I wanted to include a GPIO connection to allow the tasks to write on the LED pins. But unfortunately, since about one week I am getting a lot of Errors without any success.
I did everything, as discribed in here : http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/2_14_01_20/exports/tirtos_full_2_14_01_20/docs/doxygen/html/index.htm
Enclosed, please find my source code :
//Standard_header
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//XDCtools_header
#include <xdc/std.h>
#include <xdc/cfg/global.h>
#include <xdc/runtime/System.h>
#include <xdc/runtime/Error.h>
//BIOS_header
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Clock.h>
//Board_header
#include "Board.h"
#include "ti/drivers/gpio/GPIOCC3200.h"
//Simplelink_header
#include "osi.h"
#include "common.h"
#include "simplelink.h"
//Global Variables
int icount;
//Task1 to collect Data
void Data(void)
{
while(icount < 4){
GPIO_toggle(Board_LED0);
}
icount++;
}
//Task2 for Data Transfer
void Transfer(UArg arg0, UArg arg1)
{
if (icount == 4){
GPIO_write(Board_LED1, 1);
icount = 0;
}
}
//Mainfunction
int main(void)
{
Task_Params task0Params, task1Params;
Task_Handle task0, task1;
Error_Block eb;
/**** Initialisations ****/
//Board
Board_initGeneral();
Board_initGPIO();
Error_init(&eb);
//LED
GPIO_write(Board_LED0, 0);
GPIO_write(Board_LED1, 0);
//Task_Transfer
Task_Params_init(&task0Params);
task0Params.priority = 5;
task0Params.stackSize = 512;
//Task_Data
Task_Params_init(&task1Params);
task1Params.priority = 15;
task1Params.stackSize = 512;
/**** Creation of Task_Threads ****/
task0 = Task_create((Task_FuncPtr)Transfer, &task0Params, &eb);
if (task0 == NULL) {
System_abort("Transfer create failed");
}
task1 = Task_create((Task_FuncPtr)Data, &task1Params, &eb);
if (task1 == NULL) {
System_abort("Data create failed");
}
//BIOS_Start
BIOS_start();
return (0);
}
In addition, I have copied "CC3200_LAUNCHXL.h" and "CC3200_LAUNCHXL.c" into my project folder, because otherwise the application couldn´t find Board_initGPIO(); !!!
Thank you very much in advance !
Christopher