Microcontroller

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 19:53, 12 July 2007 by Ramuk (Talk | contribs)

Jump to: navigation, search
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

See Also