MOD54415 StartHTTP()

Discussion to talk about software related topics only.
Post Reply
GeneralUser
Posts: 17
Joined: Mon Apr 21, 2014 4:49 am

MOD54415 StartHTTP()

Post by GeneralUser »

Hey guys, I am using the DEV-70 development board and everything is running perfect; utilizing the LED's and 4 UARTS. The LED's blink at various rates defined by the UART traffic commands, however, when I add the function call StartHTTP(), the LED's stop flashing (specifically LED 6,7,8). What could possibly be the connection between the LED's and StartHTTP()? Did I miss something in the documentation?

Thanks in advance!

Just an added note: Actually, UART2 does not work either the minute I uncomment StartHTTP(). My program is very simple so I doubt its a through put thing...
GeneralUser
Posts: 17
Joined: Mon Apr 21, 2014 4:49 am

Re: MOD54415 StartHTTP()

Post by GeneralUser »

Problem solved and no surprise, it was on my end :oops: :oops: :oops: . I had setup a task with the same PRIO as the HTTP. Calling StartHTTP() before my other tasked was created caused HTTP to not work. Moving StartHTTP() after of course solved it, and ultimately, I picked a new PRIO for my task and made sure it did not conflict with any other uC tasks...
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: MOD54415 StartHTTP()

Post by dciliske »

Ah the great 'Doctor it hurts when I shoot myself in the foot'. We've all been there at one time or another... XD

Glad to hear you figured it out, 'cause I was kinda stumped...

-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: MOD54415 StartHTTP()

Post by tod »

I picked a new PRIO for my task and made sure it did not conflict with any other uC tasks
Did you do this by checking that the return value of OSTaskCreate is OS_NO_ERR? I think it's a shame that so much example code just shows the call without checking for the returned error code. Easy enough to add a specific error message when the value that comes back is OS_PRIO_EXIST.
User avatar
Chris Ruff
Posts: 222
Joined: Thu Apr 24, 2008 4:09 pm
Location: topsail island, nc
Contact:

Re: MOD54415 StartHTTP()

Post by Chris Ruff »

This is how I have been doing it for years

in the .h
#define AUX_PORT_TASK_ID 22

and in the .cpp

int osPrio = AUX_PORT_TASK_ID;
while (OS_PRIO_EXIST == OSTaskCreate(AuxPortTask,NULL,&AuxPortStk[USER_TASK_STK_SIZE] ,AuxPortStk,osPrio--));
if (osPrio != AUX_PORT_TASK_ID) printf("\nAux Port Final Prio:%d",osPrio+1);

Chris
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

Re: MOD54415 StartHTTP()

Post by Ridgeglider »

In addition to checking the return values when tasks are created, I find it useful to have a single ProjectTasks.h file that defines all the task prios in one place so it's easy to see (and occasionally reorder) the relative importance of all the tasks together. In the same file, I have a commented section from constants.h that shows me the standard NB system task prios too.

Another reason why checking the return value is not always done is that unfortunately OSSimpleTaskCreate() and OSSimpleTaskCreatewName() are macros w/o return value.
GeneralUser
Posts: 17
Joined: Mon Apr 21, 2014 4:49 am

Re: MOD54415 StartHTTP()

Post by GeneralUser »

Honestly, everything that Ridgeglider said is exactly my comments. I used the SimpleTaskCreate() so no return value which is a bummer. Therefore, again as Ridgeglider said, I created a H file that has all the task priority constants including the core priority constants. I comment out all the core constants so its really just a reference where I can see every single task priority whether or not I use them....much better way going forward.....
Post Reply