NetBurner 3.5.0
PDF Version
 
Constants

NetBurner System Constants. More...

Macros

#define TICK_IRQ_LEVEL   (5)
 System clock IRQ level.
 
#define SERIAL_IRQ_LEVEL   (3)
 
 
#define SERIAL_VECTOR_BASE   (64)
 
 
#define TICKS_PER_SECOND   (20)
 System clock ticks per second.
 
#define OS_MAX_TASKS   32
 Max number of system tasks.
 
#define OS_MAX_PRIOS   64
 Maximum number of system priorities.
 
#define SSH_TASK_PRIORITY   (56)
 ief SSH server must be lower than main for progress displays
 

Ethernet buffer defines

OS Maximum Interrupt Level

OS_MAX_IRQ_MASK - Optional, Maximum IRQ level that the RTOS is allowed to mask. RTOS objects may not be used in ISRs above this level.

#define ETHER_BUFFER_SIZE   1548
 
 
#define ETH_MAX_PAYLOAD   (1500)
 
 
#define ETH_MAX_SIZE   (1522)
 
 
#define ETH_MIN_SIZE   (46)
 
 
#define IP_HEADER_SIZE   (20)
 
 
#define UDP_HEADER_SIZE   (8)
 
 
#define MAX_UDPDATA   (ETH_MAX_PAYLOAD - (IP_HEADER_SIZE + UDP_HEADER_SIZE))
 
 
#define SERIAL_TX_BUFFERS   (2)
 ETHERN_BUFFER_SIZE = bytes of serial TX fifo.
 
#define SERIAL_RX_BUFFERS   (2)
 ETHERN_BUFFER_SIZE = bytes of serial RX fifo.
 
#define stdin_buffer_size   (200)
 
 

System task priorities

Restating the NBRTOS RTOS Library document (NBRtosLibrary.pdf) Lowest priority is OS_MAX_PRIOS-1, 1 is the highest. There can only be one task at each priority level. Idle task is created at priority 63.

UserMain is created at priority 10. It is recommended and is supported by examples and default projects that a call to OSChangePrio( MAIN_PRIO ); be made to lower the priority to the range recommended for the main application.

Factory applications use priorities 46 through 56.

Netburner Runtime library support and driver tasks use 36 through 45.

Care should be taken in use of priorities it can affect reliability and performance.

#define MAIN_PRIO   (50)
 Recommend UserMain priority.
 

Runtime library driver and support task priorities

#define USB_HW_PRIO   (45)
 
 
#define PPP_PRIO   (44)
 
 
#define SECURITY_TASK_PRIO   (43)
 
 
#define WIFI_STATION_TASK_PRIO   (42)
 
 
#define WIFI_TASK_PRIO   (41)
 
 
#define CONFIG_SERVER_PRIO   (40)
 
 
#define HTTP_PRIO   (39)
 
 
#define ETHER_SEND_PRIO   (38)
 
 

Detailed Description

NetBurner System Constants.

#include< constants.h >

Macro Definition Documentation

◆ TICKS_PER_SECOND

#define TICKS_PER_SECOND   (20)

#include <constants.h>

System clock ticks per second.

PLEASE READ THIS BEFORE MODIFYING TICKS_PER_SECOND

Before you change this value understand what changing it does. Making it faster only slows things down. It does not speed up task switches, If only changes the granularity of time delays and timeouts. Task switches happen much much faster than the tick interval. They happen as soon as one task blocks or an interrupt /or task causes a higher priority task to be unblocked. The Time tick has NOTHING to do with task switches.

If you change it to the maximum 200 you have increased the RTOS overhead by a factor of 10 and have actually slowed your system.