More Design Topics
Serial Port Baud Rate
The baud rate of serial port is generated
by a 16-bit prescaler which uses an internal clock source at 937,500 Hz. (15
MHz / 16). Most speeds between 300 bps to 230400 bps can be generated with
minor errors.
Baud Rate |
Actual |
Error % |
300 bps |
300 bps |
0.00 |
600 bps |
600 bps |
0.00 |
1,200 bps |
1,200 bps |
0.00 |
2,400 bps |
2,403 bps |
0.12 |
4,800 bps |
4,807 bps |
0.15 |
9,600 bps |
9,664 bps |
0.67 |
19,200 bps |
19,531 bps |
1.72 |
38,400 bps |
39,062 bps |
1.72 |
57,600 bps |
58,593 bps |
1.72 |
76,800 bps |
78,125 bps |
1.73 |
115,200 bps |
117,187 bps |
1.72 |
230,400 bps |
234,375 bps |
1.73 |
Stack Size
The stack size for applications is fixed at
4 KB. When using auto variables, special care should be taken for ensuring not
to exceed this limit. To avoid possible problems with stack overflow, using
auto variables should be more conservative:
Not recommended
int
function() { char buf[1024]; //
in stack ….. } |
Ok
int
function() { char *buf; buf=(char *)malloc(1024); // use
heap memory ….. free(buf); } |
CGI Timeout
The timeout of CGI has been set to 300 seconds
(5 minutes). When operating over Internet, web-based firmware updating may
exceed this timeout limit. Therefore, it is not recommended to upgrade firmware
over Internet which could make your device unusable.