Documentation:NGW/NGW100 Board controller
From AVRFreaks Wiki
Contents |
[edit] Overview
Note: This page describes the operation of the board controller with the default firmware. This firmware is known to be buggy. If you intend to use this board controller in any serious way, it is suggested that you use the updated firmware as described on Tiny Firmware.
The Network Gateway has a board controller chip. The Board Controller on the NGW keep manufacture ID, product ID and revision ID. The manufacturer ID and the product ID is hard-coded into the firmware of the board controller. The revision ID is calculated by reading the analoge value formed by the voltage divider pairs R25/R31 and R26/R32. The board controller can also read core and system voltages and report this to the CPU.
The board controller use the PMbus™ (powersig.org) standard for communication between the CPU and the board controller. The PMbus™ was selected for this purpose to provide a hardware identification mechanism that is common with mechanisms in commercial products. This allows developers to reuse code in the final product.
[edit] Block diagram
[edit] TWI pull up resistors
The Two Wire Interface (TWI) bus requires pull-up resistors on the communication lines for activity sensing and control signals. These pull-ups must be large enough to not interfere with the signaling, yet small enough to quickly establish idle level on the bus.
The network gateway uses 4.7k Ohm pull-up resistors:
| Resistor | Value |
|---|---|
| R82 | 4.7k |
| R83 | 4.7k |
[edit] Commands supported by the board controller
The board controller is located at address 0x0B
The following messages are supported by the board controller:
| Command | Value | Return value |
|---|---|---|
| TWI_CMD_MFR_ID | 0x99 | atmel.no (ascii) |
| TWI_CMD_MFR_MODEL | 0x9A | NGW100 (ascii) |
| TWI_CMD_MFR_REVISION | 0x9B | see Revision ID resistor values below, (unsigned char) |
| TWI_CMD_MFR_SERIAL | 0x9E | NGW100 serial number (ascii) |
| TWI_CMD_READ_TEMP_1 | 0x8D | Ambient temperature in kelvin (unsigned short int) |
All PMbus™ read replies are on the format: <length><databyte0>...<databyteN>
The temperature is approximately calibrated in production and might have an offset.
[edit] Revision ID resistor values
The resistors mounted in position R25, R26, R31 and R32 are used to set the revision number of the Network Gateway. The revision number is returned from the board controller in a byte value. This byte value is the hardware revision number.
The 6-bit revision number consist of two 3-bit revision numbers. Each of these three bit numbers are read from the board controllers ADC inputs. The resistor values giving these 3-bit values are listed below:
| Revision number R1 and R2 | R31/R32 | R25/R26 |
|---|---|---|
| 0 | 470R | 10k |
| 1 | 1k | 10k |
| 2 | 1k5 | 10k |
| 3 | 2k7 | 10k |
| 4 | 5k6 | 10k |
| 5 | 10k | 10k |
| 6 | 10k | 4k2 |
| 7 | 10k | 470R |
[edit] Board Controller headers
Two headers are connected to the board controller. One ISP header for programming of the Board Controller chip and one header holding spare signals from the board controller.
Note that these headers are not mounted on the NGW.
[edit] Programming the board controller
You can replace the firmware on the board controller chip using normal AVR8 programming tools, since the protection fuse is not being set during manufacturing. The updated firmware page includes improved firmware (source and object) along with directions showing how to install and use it. That software package also includes a host side PMBus client to let you talk to the board controller.



