Hello everybody
I tried to built my custom app by combining GPIO example and throughput demo provided by qualcomm using IAR embedded workbench . You could find second here : http://www.freescale.com/webapp/connect/displayPartnerProfile.sp?partnerId=5640
What I changed : 1- clear MQX_AUTO_START_TASK for "WMICONFIG_TASK1" and "WMICONFIG_TASK2" and "SHELL_TASK" in the tasks.c of throughput demo and I add my main task as MQX_AUTO_START_TASK .
Here is my main_task code :
void main_task(uint32_t initial_data){
/* Structures holding information about specific pin */
LWGPIO_STRUCT btn1;
_task_id wmiconfig1_task_id , wmiconfig2_task_id , shell_task_id ;
if (!lwgpio_init(&btn1, BSP_BUTTON1, LWGPIO_DIR_INPUT, LWGPIO_VALUE_NOCHANGE))
{
printf("Initializing button GPIO as input failed.\n");
_task_block();
}
lwgpio_set_functionality(&btn1, BSP_BUTTON1_MUX_GPIO);
lwgpio_set_attribute(&btn1, LWGPIO_ATTR_PULL_UP, LWGPIO_AVAL_ENABLE);
while (TRUE)
{
if (LWGPIO_VALUE_LOW == lwgpio_get_value(&btn1)){
_task_create(0,WMICONFIG_TASK1,0);
_task_create(0,WMICONFIG_TASK2,0);
_task_create(0,SHELL_TASK,0);
if (wmiconfig1_task_id == MQX_NULL_TASK_ID){printf("wmiconfig_task1 can't be created\n");}
if (wmiconfig2_task_id == MQX_NULL_TASK_ID){printf("wmiconfig_task2 can't be created\n");}
if (shell_task_id == MQX_NULL_TASK_ID){printf("shell_task can't be created\n");}
}
}
}
when I load my application to my FRDM_K22F and run it it tells me in the tera term console :
wmiconfig_task1 can't be created
wmiconfig_task2 can't be created
shell_task can't be created
Hello Hossein,
Could you please add the complete project?
Regards
Soledad
Hello,
Sorry but I can't see the TASK_TEMPLATE_STRUCT neither the
WMICONFIG_TASK1,
WMICONFIG_TASK2
,SHELL_TASK functions
Regards
Sol
Hello
You could find TASK_TEMPLATE_STRUCT here : Dropbox - Tasks.c
WMICONFIG_TASK1 and WMICONFIG_TASK2 here : Dropbox - task_manager.c
and SHELL_TASK here : Dropbox - Shell_Task.c
Best regards