Difference between revisions of "Microcontroller"
From NAS-Central Buffalo - The Linkstation Wiki
(→AVR Commands) |
m (→Features) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | [[Image:Atmel_AVR_AT90S2313-4SC.jpg|thumb|right|The Kurobox's AVR Microcontroller]] | |
The Kurobox and the Kurobox HG use an Atmel AVR AT90S2313-4SC microcontroller. | The Kurobox and the Kurobox HG use an Atmel AVR AT90S2313-4SC microcontroller. | ||
Line 7: | Line 7: | ||
* 128 bytes of Internal Ram | * 128 bytes of Internal Ram | ||
* 15 I/O lines | * 15 I/O lines | ||
− | * one 8 bit timer/counter | + | * one 8-bit timer/counter |
− | * | + | * one 16-bit timer/counter |
* Full Duplex UART | * Full Duplex UART | ||
− | * 10 bit PWM | + | * 10-bit PWM |
* Analog Comparator | * Analog Comparator | ||
− | * on chip oscillator and clock circuitry | + | * on chip oscillator and clock circuitry |
== AVR Commands == | == AVR Commands == | ||
Line 18: | Line 18: | ||
The AVR controls the Kurobox hardware, such as the power button and LEDs. The AVR is connected to /dev/ttyS1 and can be controlled by sending commands directly to it. | The AVR controls the Kurobox hardware, such as the power button and LEDs. The AVR is connected to /dev/ttyS1 and can be controlled by sending commands directly to it. | ||
− | The power button on the front of the case, and the red button on the rear of the case also send commands to the AVR, and is controlled by the ppc_uartd daemon. However, it is possible to control the Kurobox | + | The power button on the front of the case, and the red button on the rear of the case also send commands to the AVR, and is controlled by the ppc_uartd daemon. However, it is possible to control the Kurobox without the ppc_uartd daemon |
+ | *[[Survive_without_ppc_uartd|replacement scripts]]. | ||
+ | *[[Debian_avr_evtd|replacement program, avr_evtd]] | ||
− | == | + | === HOWTO Send AVR Commands === |
− | To send commands to the AVR, | + | To send commands to the AVR, use the syntax below. Replace ''command'' with a valid AVR command. |
− | + | # echo -n "''command''" > /dev/ttyS1 | |
− | {| | + | === List of Known AVR Commands === |
− | + | {| border="1" cellpadding="3" | |
+ | ! Command !! Resp !! Comments | ||
|- | |- | ||
− | | | + | | \30\30\30\30 || ? || Sent by ''/www/script/melsub_diskcheck.sh''. |
− | | | + | |
− | | | + | |
|- | |- | ||
− | | | + | | [[[[ || OK || POWER LED starts slow blinking.. |
|- | |- | ||
− | | | + | | ]]]] || OK || Cooling fan high-speed rotation. |
− | + | ||
− | | | + | |
|- | |- | ||
− | | | + | | \\\\ || OK || Cooling fan low-speed rotation. |
|- | |- | ||
− | | | + | | >>>> || ? || Sent by ''ppc_uartd'' at boot. |
− | | | + | |
− | | | + | |
|- | |- | ||
− | | | + | | AAAA || ? || Sent by ''ppc_uartd'' at boot. |
|- | |- | ||
− | | | + | | CCCC || OK || Sent by ''reboot'' before shutdown -r now / reboot. |
− | | | + | |
− | | | + | |
|- | |- | ||
− | | | + | | EEEE || OK || Sent by ''shutdown'' before shutdown -h now. |
|- | |- | ||
− | | | + | | FFFF || ? || Sent by ''ppc_uartd'' at boot. |
− | | | + | |
− | | | + | |
|- | |- | ||
− | | | + | | JJJJ || ? || Sent by ''ppc_uartd'' at boot. |
|- | |- | ||
− | | | + | | KKKK || ? || Sent by ''ppc_uartd'' at boot. |
− | + | ||
− | | | + | |
|- | |- | ||
− | | | + | | QQQQ || ? || Sent by ''ppc_uartd'' on timed intervals. |
|- | |- | ||
− | | | + | | RRRR || ? || Clear flash memory end. |
− | + | ||
− | | | + | |
|- | |- | ||
− | | | + | | SSSS || ? || Clear flash memory start. |
|- | |- | ||
− | | | + | | TTTT || OK || Flash memory update complete. Stop blinking POWER, DISK FULL and DIAG LED. |
− | | | + | |
− | | | + | |
|- | |- | ||
− | | | + | | UUUU || OK || Flash memory update begin. Start blinking POWER, DISK FULL and DIAG LED. |
|- | |- | ||
− | | | + | | VVVV || OK || Turn off DISK FULL LED. |
− | + | ||
− | | | + | |
|- | |- | ||
− | | | + | | WWWW || OK || Turn on DISK FULL LED. |
|- | |- | ||
− | | | + | | XXXX || OK || DISK FULL LED stops blinking |
− | + | ||
− | | | + | |
|- | |- | ||
− | | | + | | YYYY || OK || DISK FULL LED starts blinking |
|- | |- | ||
− | | | + | | ZZZZ ||OK || POWER LED stops slow blinking. |
− | + | ||
− | | | + | |
|- | |- | ||
− | | | + | | gggg || OK || DIAG LED blinks 3 times (partition error), then shutdown. |
|- | |- | ||
− | | | + | | iiii || OK || DIAG LED blinks 4 times (cooling fan error), then shutdown. |
− | + | ||
− | | | + | |
|- | |- | ||
− | | | + | | kkkk || OK || DIAG LED blinks 5 times ([[Flash ROM]] error), then cut power (not shutdown). |
|- | |- | ||
− | | | + | | mmmm || OK || DIAG LED blinks 6 times (hard drive error), then shutdown. |
− | + | ||
− | | | + | |
|- | |- | ||
− | + | | oooo || OK || DIAG LED starts 7 times blink ([[RAM]], [[Ethernet Controller]], or [[IDE Host Controller]] error) and shutdown. | |
− | + | ||
− | + | ||
− | | | + | |
− | | | + | |
|} | |} | ||
Line 114: | Line 87: | ||
==See Also== | ==See Also== | ||
* [http://www.atmel.com/dyn/resources/prod_documents/doc0839.pdf Atmel AVR AT90S2313-4SC Official Data Sheet] | * [http://www.atmel.com/dyn/resources/prod_documents/doc0839.pdf Atmel AVR AT90S2313-4SC Official Data Sheet] | ||
+ | |||
+ | [[Category:Hardware]] |
Latest revision as of 05:23, 9 July 2006
File:Atmel AVR AT90S2313-4SC.jpg
The Kurobox's AVR Microcontroller
The Kurobox and the Kurobox HG use an Atmel AVR AT90S2313-4SC microcontroller.
Contents
Features
- 2K bytes of Flash Memory
- 128 bytes of EEPROM!
- 128 bytes of Internal Ram
- 15 I/O lines
- one 8-bit timer/counter
- one 16-bit timer/counter
- Full Duplex UART
- 10-bit PWM
- Analog Comparator
- on chip oscillator and clock circuitry
AVR Commands
The AVR controls the Kurobox hardware, such as the power button and LEDs. The AVR is connected to /dev/ttyS1 and can be controlled by sending commands directly to it.
The power button on the front of the case, and the red button on the rear of the case also send commands to the AVR, and is controlled by the ppc_uartd daemon. However, it is possible to control the Kurobox without the ppc_uartd daemon
HOWTO Send AVR Commands
To send commands to the AVR, use the syntax below. Replace command with a valid AVR command.
# echo -n "command" > /dev/ttyS1
List of Known AVR Commands
Command | Resp | Comments |
---|---|---|
\30\30\30\30 | ? | Sent by /www/script/melsub_diskcheck.sh. |
[[[[ | OK | POWER LED starts slow blinking.. |
]]]] | OK | Cooling fan high-speed rotation. |
\\\\ | OK | Cooling fan low-speed rotation. |
>>>> | ? | Sent by ppc_uartd at boot. |
AAAA | ? | Sent by ppc_uartd at boot. |
CCCC | OK | Sent by reboot before shutdown -r now / reboot. |
EEEE | OK | Sent by shutdown before shutdown -h now. |
FFFF | ? | Sent by ppc_uartd at boot. |
JJJJ | ? | Sent by ppc_uartd at boot. |
KKKK | ? | Sent by ppc_uartd at boot. |
QQQQ | ? | Sent by ppc_uartd on timed intervals. |
RRRR | ? | Clear flash memory end. |
SSSS | ? | Clear flash memory start. |
TTTT | OK | Flash memory update complete. Stop blinking POWER, DISK FULL and DIAG LED. |
UUUU | OK | Flash memory update begin. Start blinking POWER, DISK FULL and DIAG LED. |
VVVV | OK | Turn off DISK FULL LED. |
WWWW | OK | Turn on DISK FULL LED. |
XXXX | OK | DISK FULL LED stops blinking |
YYYY | OK | DISK FULL LED starts blinking |
ZZZZ | OK | POWER LED stops slow blinking. |
gggg | OK | DIAG LED blinks 3 times (partition error), then shutdown. |
iiii | OK | DIAG LED blinks 4 times (cooling fan error), then shutdown. |
kkkk | OK | DIAG LED blinks 5 times (Flash ROM error), then cut power (not shutdown). |
mmmm | OK | DIAG LED blinks 6 times (hard drive error), then shutdown. |
oooo | OK | DIAG LED starts 7 times blink (RAM, Ethernet Controller, or IDE Host Controller error) and shutdown. |
Source: AVR commands