Information/HGAVR
From NAS-Central Buffalo - The Linkstation Wiki
(Difference between revisions)
(Add essential AVR info about CN4 programming port. Rearrange page in preparation for updating the information on this page which is largely incorrect.) |
m (Remove incorrect datasheet that is for something else entirely) |
||
| Line 8: | Line 8: | ||
=== Basic Information === | === Basic Information === | ||
| - | The AVR in the HG Linkstation is an AT90S2313-4SC. This is a cheap 4 MHz AVR with 2k program space and 128 EEPROM. | + | The AVR in the HG Linkstation is an AT90S2313-4SC made by ATMEL, not Freescale as previously documented here. This is a cheap 4 MHz AVR with 2k program space and 128 EEPROM. |
CN4 is a 6 pin ISP header that can be used to read/program the AVR with a cheap device such as a [http://www.ladyada.net/make/usbtinyisp/download.html usbtiny] that can be purchased as a kit/assembled from various hobby electronics websites. | CN4 is a 6 pin ISP header that can be used to read/program the AVR with a cheap device such as a [http://www.ladyada.net/make/usbtinyisp/download.html usbtiny] that can be purchased as a kit/assembled from various hobby electronics websites. | ||
| Line 14: | Line 14: | ||
=== Pin assignment for the HGAVR === | === Pin assignment for the HGAVR === | ||
| - | |||
The pin assignment and its functions used in HG is listed in the following table:<br> | The pin assignment and its functions used in HG is listed in the following table:<br> | ||
Revision as of 14:46, 27 February 2011
This article was originally based on work by Frontalot at linkstationwiki.org and has since been expanded.
Contents |
The Linkstation HG AVR
Hardware Information
Basic Information
The AVR in the HG Linkstation is an AT90S2313-4SC made by ATMEL, not Freescale as previously documented here. This is a cheap 4 MHz AVR with 2k program space and 128 EEPROM.
CN4 is a 6 pin ISP header that can be used to read/program the AVR with a cheap device such as a usbtiny that can be purchased as a kit/assembled from various hobby electronics websites.
Pin assignment for the HGAVR
The pin assignment and its functions used in HG is listed in the following table:
| PIN | SIGNAL | Description | PIN | SIGNAL | Description |
| 1 | ZIRQ | CN3.3 | 28 | ZRST | CN3.4 |
| 2 | PTA0 | DIAG LED | 27 | PTA5 | Power switch input |
| 3 | VSS | CN3.6 / CN3.9 | 26 | PTD4 | Fan pulse input for status checking |
| 4 | OSC1 | CN3.1 | 25 | PTD5 | HRST (CN5.13) |
| 5 | OSC2 | - | 24 | PTD2 | Control 12V feed to the main switching power via TR5, TR3 |
| 6 | PTA1 | Disk full LED | 23 | PTA4 | Reset switch input |
| 7 | VDD | CN3.2 | 22 | PTD3 | Fan speed control via TR2,TR1 |
| 8 | PTA2 | Power LED green | 21 | PTB0 | CN3.5 |
| 9 | PTA3 | Power LED yellow | 20 | PTB1 | CN3.10 |
| 10 | PTB7 | NC | 19 | PTD1 | IDE reset / TRST (CN5.4 via R66) |
| 11 | PTB6 | NC | 18 | PTB2 | CN3.7 |
| 12 | PTB5 | NC | 17 | PTB3 | CN3.8 |
| 13 | RXD | Connects to /dev/ttyS1 | 16 | PTD0 | Flash reset (ZRP on IC8.12) |
| 14 | TXD | Connects to /dev/ttyS1 | 15 | PTB4 | NC |
Interaction With AVR In Linux
The AVR controls much of the LinkStation hardware, including the power button and LED indicator. It is controlled by the commands sent to /dev/ttyS1. To send commands to the AVR:
echo -n "commands" > /dev/ttyS1
| Command | Action/Code |
| \30\30\30\30 | Stops smbd and atalkd if /dev/hda3 is not mounted to /mnt. Sent by /www/script/melsub_diskcheck.sh. |
| [[[[ | Starts slowly blinking power LED (sleep). |
| ]]]] | High-speed cooling fan rotation. |
| \\\\ | Low-speed cooling fan rotation. |
| >>>> | Unknown. Sent by ppc_uartd on boot. |
| AAAA | Unknown. Sent by ppc_uartd on boot. |
| CCCC | Sent by shutdown -r now (reboot). |
| EEEE | Sent by shutdown -h now (halt). |
| FFFF | Unknown. Sent by ppc_uartd on boot. |
| JJJJ | Unknown. Sent by ppc_uartd on boot. |
| KKKK | Unknown. Sent by ppc_uartd on boot. |
| QQQQ | Unknown. Sent by ppc_uartd on set timer. |
| RRRR | End of clear flash memory. |
| SSSS | Start of clear flash memory and /www/script/melsub_init.sh. Sent by /www/script/melsub_flash.sh. |
| TTTT | Flash memory update completed (stops blinking power, disk full, and diagnostic LEDs). |
| UUUU | Flash memory update started (starts blinking power, disk full, and diagnostic LEDs). |
| VVVV | Turns off disk full LED. |
| WWWW | Turns on disk full LED. |
| XXXX | Stops blinking disk full LED. |
| YYYY | Starts blinking disk full LED. |
| ZZZZ | Stops slowly blinking power LED. Sent by ppc_uartd. |
| gggg | Diagnostic LED blinks 3 times and system shutdown (partition error). |
| iiii | Diagnostic LED blinks 4 times and system shutdown (cooling fan error). |
| kkkk | Diagnostic LED blinks 5 times and system powers off (flash memory error). |
| mmmm | Diagnostic LED blinks 6 times and system shutdown (hard drive or ppc_uartd error). |
| oooo | Diagnostic LED blinks 7 times and system shutdown (RAM, NIC, or HDD controller error). |

