Kurobox Pro Microcomputer Communication Specifications

From Buffalo NAS-Central

Jump to: navigation, search

[edit] Contents

Contents


[edit] Functions

[edit] Overview of Functions

Communicates with the main CPU via UART. The main functions are shown below.

  • Power SW monitoring
  • Initialization SW monitoring
  • Power control
  • Temperature measurement
  • Buzzer control
  • Watchdog function (However, watchdog function is disabled on u-boot)
  • LAN ACT monitoring
  • LED display
  • Reset sequence generation
  • LED Illumination

[edit] UART Communication with Main CPU

[edit] Transmission System

[edit] UART Basic Settings

  • Transmission speed: 38400bps
  • Data bit: 8bit
  • Parity: Even
  • Stop bit: 1 bit or more

[edit] Communication with Main CPU

  • Basic communication is performed by the transmission of commands, data, and parity.
  • When switches etc are pressed, a level interrupt occurs. The interrupt is cleared when reporting to the CPU is completed.
  • If many frame errors occur, regulate the guard time on the main CPU.

[edit] Protocol

[edit] Preamble

The receive buffer is completely cleared by sending FF 35 times.

[edit] Main CPU -> Microcomputer

[edit] Data Payload 0 Bytes

1 Transfer

direction (BIT7)

Data payload (0)
2 Command
3 Parity 0-(byte1+byte2)

[edit] Data Payload n bytes

1 Transfer

direction (BIT7)

Data payload ()
2 Command
3 Data 0



n-1 Data n
n Parity 0 - Σ(byte 1 to byte n-1)

[edit] Microcomputer -> Main CPU

[edit] Responses to commands other than the read command (when data does not exist)

1 0

(BIT7)

Data payload (1)
2 Sent command
3 ACK
4 Parity 0-(byte1+byte2+byte3)

[edit] Response to read command

1 0

(BIT7)

Data payload (N)
2 Sent command
3 Data 1
n-1 Data N
n Parity 0 - Σ(byte 1 to byte n-1)

[edit] Response when communication error occurs

1 0

(BIT7)

Data payload (1)
2 Sent command
3 NACK
4 Parity 0-(byte1+byte2+byte3)

[edit] ACK/NACK List

HEX mnemonic
0x00 ACK Good
0xF1 OVER_RUN UART physical layer error Physical layer buffer over
0xF2 FRAMING_ERR UART physical layer error Physical layer frame error
0xF3 PARITYERROR UART physical layer error Physical layer parity error
0xF4 Invalid_COM Command does not exist
0xF5 Com_len_err Command and data payload values do not correspond
0xF6 RX_BUFF_OVER Payload larger than 32 bytes specified.
0xF7 DATA_PARITY_ERROR Data parity is wrong.

[edit] Write Command

LED Lighting control etc Command Micro- computer CPU DATA0 DATA1 DATAn(MAX31) PARITY Switch to data transfer phase Switch to command phase Command (OPCODE) ACK Command Command 2nd byte PARITY

[edit] Read Command

Temperature read by CPU DATA0 DATA1 DATAn(MAX31) PARITY Command (OPCODE) PARITY Command CPU Micro- computer Switch to data transfer phase Switch to command phase

[edit] Interrupt + Read Command

SW Micro- computer DATA0 DATA1 DATAn(MAX31) PARITY Interrupt assert Interrupt negate Switch to data transfer phase Switch to command phase Command (OPCODE) PARITY Command CPU

[edit] Command

[edit] Command Construction

The command is a 2 byte command.

[edit] Write (CPU -> Microcomputer)

bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0 0 Length
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
OPCODE

[edit] Read (Microcomputer -> CPU)

bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
1 0
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
OPCODE


Command List

[edit] Commands with no data payload

Command Command name Microcomputer operation
1Byte 2Byte
FF --- NOP Used in preamble
0x00 0x02 BOOT_START Boot starts, CPU sends this command at the start. If

this command is not received within 10 seconds after reset, power does not go on. This is displayed during boot.

0x00 0x03 BOOT_END The boot display is completed, and the device

operates normally. If this command is not received within 5 minutes, power goes off.

0x00 0x06 POFF Power switches off.
0x00 0x0C SHUT_DOWN_WAIT SHUT DOWN preparations
0x00 0x0D SHUT_DOWN_WAIT_N Cancel SHUT DOWN preparations
0x00 0x0E REBOOT REBOOT (system reset) start


[edit] Data Payload 1 Byte Command

Command Command name Microcomputer operation
1Byte 2Byte
0x01 0x30 BZ_ON Buzzer sounds.Buzzer control, with fine selection of

whether to sound for 1 byte of data

--------
0x01 0x33 FANSPEED_CTL FAN speed can be selected.0 Stopped 3 Maximum

Settings above 3 (only enabled for lower 2 bits)

0x80
0x01 0x35 SYSTEM_WDT Performs clear and settings for system

watchdog.

0x80
0x37 TEMP Obtains the temperature.Receivable data is in Centigrade
0x80
0x38 FANSPEED Obtains fan speed informationDouble the number of FAN revolutions in 3

seconds is displayed. rpm= (obtained data) ×10.

0x80
0x01 0x3a LED_BRIGHT Adjusts the brightness of the current LED
0x80
0x01 0x3b HDD_POWER Controls the HDD power supply
0x80
0x3c MAIN_STATUS Obtains the STATUS of the microcomputer
0x80

[edit] Data Payload 2 Byte Command

Command Command name Microcomputer operation
1Byte 2Byte
0x02 0x50 LED_CPU_MCON Switches LED between main CPU controland microcomputer control.
0x80
0x02 0x51 LED_ON_OFF Controls whether the LED is on or off
0x80
0x02 0x52 LED_BLINK Selects the LED for LED flashing display
0x80
0x02 0x53 BZ_FREQ Buzzer frequency settings
0x80
0x02 0x54 LED_PATTERN Controls LED flashing
0x80

[edit] Buzzer ON/OFF

[edit] Command

0×01 First operand read 0×80
0×30 Second operand

[edit] Data

0×00 Stop the sound
0×01 [Pi-po]
0×02 [Pi]
0×03 Continuous sound [Piiiii-]
0×04 Sounds every 0.3 seconds
0×10 Repeats sounding for 0.5 seconds then stopping for 0.3 seconds.
0×20 [Pi-po-pa-po]

[edit] Buzzer pitch

[edit] Command

0×02 First operand setting
0×80 First operand reading of settings.
0×53 Second operand

[edit] Data 0

Frequency settings lower order

[edit] Data 1

Frequency settings upper order

[edit] Relationship between sound pitch and frequency

A A# B C C# D D# E F F# G G#
55 58 62 65 69 73 78 82 87 92 98 104
110 117 123 131 139 147 156 165 175 185 196 208
220 233 247 262 277 294 311 330 349 370 392 415
440 466 494 523 554 587 622 659 698 740 784 831
880 932 988 1047 1109 1175 1245 1319 1397 1480 1568 1661
1760 1865 1976 2093 2217 2349 2489 2637 2794 2960 3136 3322

[edit] Relationship between values set on microcomputer and sound pitch

A A# B C C# D D# E F F# G G#
FC04 F062 E273 D60A C852 BE8C B399 A9D6 9F70 963D
8E0B858C7F08 7746 7068 6A4A6429 5EB25949 5475 4FB8 4B1E
4705 430F 3F42 3BA33868 3525 323D2F59 2CC52A3A27DC25A6
2382 2187 1FA1 1DE01C34 1A9E191E17B5 1662 151D13EE12CD
11C1 10C3 0FD00EEC0E16 0D4C0C8C0BD80B2F0A8E09F7 0968
08E0 0860 07E8 0777 070C06A6 0647 05EC0597 0547 04FB04B4
3F4
1FA
FD

[edit] System Watchdog

[edit] Command

0×01 First operand read 0×80 when setting
0×35 Second operand

[edit] Data

Set the time until the power goes OFF for forced OFF. You can set up to 255 seconds.

However, setting to 0 will cause the system watchdog to stop and not operate.

If read is performed, the time for the watchdog to operate is displayed.

0×FF – (time to shutdown) = Setting value

[edit] Temperature Read

[edit] Command

0×80 First Operand (read only)
0×37 Second operand

[edit] Data

The temperature on the board can be read.

The read data is signed char.

The data is from -55°C to 125°C.

[edit] SW Read

[edit] Command

0x80 First Operand (read only)
0×36 Second operand

[edit] Data

bit7-bit4 bit4 bit3 bit2 bit1 bit0
0 1 F_INIT_SW 1 1 Power SW

If SW or INITSW is pressed, an interrupt occurs. You can research the cause of an

interrupt by reading the SW.

Reading this resistor clears the interrupt.

  • If the SW is released at the point when read is started, the value returns to 1. Therefore,

measure the pressed time on the CPU to judge.

bit4: Always 1
bit3: 0 when INIT_SW is pressed
bit2: Always 1
bit1: Always 1
bit0: Power_SW 0 when Power_SW is pressed

[edit] LED Display

[edit] Command

[edit] First operand

0×01 First operand 0×80 (read)


[edit] Second operand

  • Switching LED control rights: 0×50
  • Switching LED on/off: 0×51
  • Flash LED: 0×52

[edit] Data

[edit] DATA0

bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0 0 0 0 LINK DIAG INFO Power

[edit] DATA1

bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0 0 0 0 0 0 0 0

[edit] Data Meaning

[edit] Control Rights Switching

  • 0: LED control performed by microcomputer
  • 1: LED control performed by CPU

[edit] Switching on/off

  • 0: Switch LED off
  • 1: Light LED

[edit] Flash Switching

  • 0: Do not flash LED
  • 1: Flash LED

[edit] LED brightness

[edit] Command

0×00 First operand 0×80 read
0x3a Second operand

[edit] Data

bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0 LED Illumination

[edit] Data Meaning

[edit] LED Illumination

Setting possible in the 0-0xf range

  • 0×0 = Off
  • 0×f = Maximum illumination

[edit] HDD Power control

[edit] Command

0×00 First operand 0×80 (read) 0X3b Second operand

[edit] Data

bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0 0 0 HDD

[edit] ACK/NACK List

HEX mnemonic
0x00 ACK Good
0xF1 OVER_RUN UART physical layer error Physical layer buffer over
0xF2 FRAMING_ERR UART physical layer error Physical layer frame error
0xF3 PARITYERROR UART physical layer error Physical layer parity error
0xF4 Invalid_COM Command does not exist
0xF5 Com_len_err Command and data payload values do not correspond
0xF6 RX_BUFF_OVER Payload larger than 32 bytes specified.
0xF7 DATA_PARITY_ERROR Data parity is wrong.

[edit] References

Personal tools
Downloads
Optware
hosted by
hosted by osuosl.org