Forum: µC & Digital Electronics FreeRTOS on LPC 1768

von Matthias (Guest)

Rate this post
0 useful
not useful

Before i begin i have to say that my english isn't very well.

Ok, i'am working on a project in school, with FreeRTOS on a LPC1768 
Stick. I downloaded the Demo from FreeRTOS.org and tried to run it on 
the hardware.

By Now i can already execute some demo tasks but not more. (Like switch 
a LED on and so on..) But now i want to try the webserver:

But there i have a problem. I call the function xCreateTask(vuIP_Task, 
..) but the ethernet ports isn't working at all. I monitor the 
connection through wireshark but i get no answer.

I also changed the priority of the uIP Task. But still it doesnt work.

The Debugger enters this function:

if( xSchedulerRunning == pdFalse){
if( pxCurrentTCB->uxPriotizy <= uxPriority){
pxCurrentTCB = pxNewTCB;

So this task(uIP) becomes the currentTask. So i think the task must 
start but i doesnt. Is there anything special to config?

And there is another problem maybe it has to do with this. Because when 
i click "run" in the debugger and then "stop" it halts in the 
HardFaultException or anywhere in the TaskScheduler.

It think i make basically something wrong, i hope thats enough 
information for you to help me, but if you need something more i will 
post it as soon as possible.

Thanks very much!

von Dominik C. (Guest)

Rate this post
0 useful
not useful
Hi Matthias,

I had the same problem (tasks not starting, hardfaulterror...).
On my system the problem was the heap. It was too small to start all the 
tasks. You can check if a task is created successfuly by checking the 
return value of the createTask function.
I had the problem, that the error happened when creating the idle task. 
And the FreeRTOS does not check if the idle task is created properly. So 
I was on the search for the error for some time :(...

Maybe this helps.


von Christoph Z. (Guest)

Rate this post
0 useful
not useful
Hello Dominik,

I know this is quite a while ago you write this, but you helped me a 
lot. I searched two days for the error till I found your solution with 
the heap...

Thanks and have a very nice day!


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.