Difference between revisions of "Microcontroller"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
(AVR Commands)
m (Features)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!-- [[Image:Fujitsu_29PL32TM-90PFTN.jpg|thumb|right|The Kurobox's Flash ROM chip]] -->
+
[[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
* one16-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 [[Survive_without_ppc_uartd|without the ppc_uartd daemon]].
+
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]]
  
== Sending commands to the AVR ==
+
=== 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.
  linkstation # echo -n "commands" > /dev/ttyS1
+
  # echo -n "''command''" > /dev/ttyS1
  
{| style="border-collapse:collapse"
+
=== List of Known AVR Commands ===
|+'''Listof known commands'''
+
{| border="1" cellpadding="3"
 +
! Command !! Resp !! Comments
 
|-
 
|-
| style="background:silver;"|'''Command'''
+
| \30\30\30\30 || ? || Sent by ''/www/script/melsub_diskcheck.sh''.
| style="background:silver;"|'''Resp'''
+
| style="background:silver;"|'''Comments'''
+
 
|-
 
|-
| \30\30\30\30 || ? || Send by /www/script/melsub_diskcheck.sh 
+
| [[[[ || OK || POWER LED starts slow blinking..
 
|-
 
|-
| style="background:silver;"|[[[[
+
| ]]]] || OK || Cooling fan high-speed rotation.
| style="background:silver;"|OK  
+
| style="background:silver;"|POWER LED blinks slowly.
+
 
|-
 
|-
|]]]] ||OK ||A cooling fan begins high-speed rotation.
+
| \\\\ || OK || Cooling fan low-speed rotation.
 
|-
 
|-
| style="background:silver;"|\\\\
+
| >>>> || ? || Sent by ''ppc_uartd'' at boot.
| style="background:silver;"|OK
+
| style="background:silver;"|A cooling fan begins low-speed rotation.
+
 
|-
 
|-
|>>>> ||? ||ppc_uartd sends them on boot.
+
| AAAA || ? || Sent by ''ppc_uartd'' at boot.
 
|-
 
|-
| style="background:silver;"|AAAA
+
| CCCC || OK || Sent by ''reboot'' before shutdown -r now / reboot.
| style="background:silver;"|?
+
| style="background:silver;"|ppc_uartd sends them on boot.
+
 
|-
 
|-
|CCCC ||OK ||reboot send them before shutdown -r now / reboot.
+
| EEEE || OK || Sent by ''shutdown'' before shutdown -h now.
 
|-
 
|-
| style="background:silver;"|EEEE
+
| FFFF || ? || Sent by ''ppc_uartd'' at boot.
| style="background:silver;"|OK
+
| style="background:silver;"|shutdown send them before shutdown -h now.
+
 
|-
 
|-
|FFFF ||? ||ppc_uartd sends them on boot.
+
| JJJJ || ? || Sent by ''ppc_uartd'' at boot.
 
|-
 
|-
| style="background:silver;"|JJJJ
+
| KKKK || ? || Sent by ''ppc_uartd'' at boot.
| style="background:silver;"|?  
+
| style="background:silver;"|ppc_uartd sends them on boot.
+
 
|-
 
|-
|KKKK ||? ||ppc_uartd sends them on boot.
+
| QQQQ || ? || Sent by ''ppc_uartd'' on timed intervals.
 
|-
 
|-
| style="background:silver;"|QQQQ
+
| RRRR || ? || Clear flash memory end.
| style="background:silver;"|?  
+
| style="background:silver;"|ppc_uartd sends them on set timer.
+
 
|-
 
|-
|RRRR ||? ||end of clear flash memory.
+
| SSSS || ? || Clear flash memory start.
 
|-
 
|-
| style="background:silver;"|SSSS
+
| TTTT || OK || Flash memory update complete. Stop blinking POWER, DISK FULL and DIAG LED.
| style="background:silver;"|?
+
| style="background:silver;"|start of clear flash memory.
+
 
|-
 
|-
|TTTT ||OK ||finish update flash memory stop blinking POWER, DISK FULL and DIAG LED.
+
| UUUU || OK || Flash memory update begin. Start blinking POWER, DISK FULL and DIAG LED.
 
|-
 
|-
| style="background:silver;"|UUUU
+
| VVVV || OK || Turn off DISK FULL LED.
| style="background:silver;"|OK  
+
| style="background:silver;"|Start update flash memory start blinking POWER, DISK FULL and DIAG LED.
+
 
|-
 
|-
| VVVV ||OK ||Turn off DISK FULL LED
+
| WWWW || OK || Turn on DISK FULL LED.
 
|-
 
|-
| style="background:silver;"|WWWW
+
| XXXX || OK || DISK FULL LED stops blinking
| style="background:silver;"|OK  
+
| style="background:silver;"|Turn on DISK FULL LED  
+
 
|-
 
|-
| XXXX ||OK ||DISK FULL LED stops blinking
+
| YYYY || OK || DISK FULL LED starts blinking
 
|-
 
|-
| style="background:silver;"|YYYY
+
| ZZZZ ||OK || POWER LED stops slow blinking.
| style="background:silver;"|OK  
+
| style="background:silver;"|DISK FULL LED starts blinking
+
 
|-
 
|-
| ZZZZ ||OK || POWER LED stops blinking slowly.
+
| gggg || OK || DIAG LED blinks 3 times (partition error), then shutdown.
 
|-
 
|-
| style="background:silver;"|gggg
+
| iiii || OK || DIAG LED blinks 4 times (cooling fan error), then shutdown.
| style="background:silver;"|OK  
+
| style="background:silver;"|DIAG LED starts 3 times blink(partition error) and shutdown.
+
 
|-
 
|-
| iiii ||OK ||DIAG LED starts 4 times blink(problem in the cooling fan) and shutdown.
+
| kkkk || OK || DIAG LED blinks 5 times ([[Flash ROM]] error), then cut power (not shutdown).
 
|-
 
|-
| style="background:silver;"|kkkk
+
| mmmm || OK || DIAG LED blinks 6 times (hard drive error), then shutdown.
| style="background:silver;"|OK  
+
| style="background:silver;"|DIAG LED starts 5 times blink(problem in the flash memory) and cut power(not shutdown).
+
 
|-
 
|-
| mmmm ||OK ||DIAG LED starts 6 times blink(problem in the hard drive) and shutdown. 
+
| oooo || OK || DIAG LED starts 7 times blink ([[RAM]], [[Ethernet Controller]], or [[IDE Host Controller]] error) and shutdown.
|-
+
|  style="background:silver;"|oooo  
+
| style="background:silver;"|OK  
+
| style="background:silver;"|DIAG LED starts 7 times blink(problem in RAM/LAN/HDD controller) 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

See Also