Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

uCOS + LWIP limit TCP/IP to 60% of cpu power

Altera_Forum
Honored Contributor II
1,672 Views

Dear All, 

 

I want to use Nios II with the RTOS and have it running as TCP/IP server. 

BUT I want to limit the processing power used by the TCP/IP server to 60%. 

 

Is this possible and if so can someone give me a small intro how it is done (I'll 

dig up the details myself). 

I am new to OS systems. 

 

If you know how to do it without the OS, OK for me, just explain how. 

 

 

 

Thank you all, 

Greg
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
856 Views

Hello Greg, 

 

MicroC-OS/II is a pre-emptive multi-tasking kernel. You can set the priority of the TCP and RX LWIP tasks to be lower than more important tasks. So, if you have a task which you want to run 40% of the time, leaving the remaining LWIP tasks to run during the remaining 60% time, simply create your higher priority task with a priority level above the LWIP tasks. If this higher priority 40% CPU consuming task would otherwise execute constantly, you can have that task give up CPU control by delaying for a fixed time period, thus allowing the MicroC-OS/II RTOS to schedule some time for the lower priority LWIP tasks to run.  

 

Best regards, 

Stephen O'Reilly 

Altera Embedded Applications Engineering
0 Kudos
Reply