README.md
1# SimpleMachines' Mizar32 Development Board
2
3## Introduction
4
5The Mizar32 is a 32-bit computer based on the AVR32 processor. It is
6clocked at 66MHz and has 32MB of main memory. It supports mass storage
7on SD card, a USB connector, an on-board LED, two buttons, a JTAG port
8and six bus connectors.
9
10
11
12The bus connectors let you add other stackable hardware modules such
13as serial ports, ethernet, a 16x2 character LCD display and a
14VGA/keyboard/mouse/audio board based on the 8-core Parallax Propeller
15processor.
16
17The Mizar32 is designed by SimpleMachines, Italy.
18
19This board support package aims at adding RT-Thread support for the
20following Mizar32 development boards.
21
22| Model | Flash | SRAM | SDRAM |
23| --------- | ----- | ---- | ---- |
24| Mizar32-A | 512KB | 64KB | 32MB |
25| Mizar32-B | 256KB | 64KB | 32MB |
26| Mizar32-C | 128KB | 64KB | 32MB |
27
28## Specification
29
30- Main processor: AVR32 UC3A0 @ 66 MHz
31- Internal fast SRAM: 32KB or 64KB with single-cycle access time
32- On-board SDRAM: 32MB with 2-cycle access time
33- Internal Flash memory: 128/256/512KB with single-cycle access time
34- External Flash memory: up to 4GB on micro SD card.
35- Internal operating Voltage: 3.3V with 5V input tolerant I/O
36- Digital I/O Pins: 66
37- Timer/Counter: 3 channel, 16-bit.
38- Analog-to-Digital input pins: 8 with 10-bit resolution measuring 0-3.3v at up to 384,000 samples per second
39- Stereo audio bitstream Digital-to-Analog Converter with 16 bit resolution at up to 48kHz
40- Pulse Width Modulation channels (PWM): 7
41- Universal Sync/Async RX/TX (USART): 2
42- Serial Periperal Interface (SPI): 2
43- Two-Wire Interface (TWI): 1, I2C-compatible at up to 400kbit/s
44- Universal Serial Bus (USB): 1 OTG host with dedicated cable.
45- Debug Port: JTAG connector
46- Ethernet MAC 10/100: 1 (requires add-on hardware module)
47- Oscillators: 2 (12MHz and 32768Hz)
48- Buttons: Reset button, user button
49- LEDs: Power LED, User LED
50- Power supply: 5V USB or 7.5V-35V DC, 80mA (base board) to 222mA (with all add-on modules)
51- Dimensions: 96,5mm x 63,5mm
52- Weight: 42.5 grams
53- Temperature range: -45 to +85°C
54
55## Embedded Hardware Interfaces
56
57- MicroSD
58- USB
59- JTAG
60- Add-on bus connectors 1-6 interfaces on the Add-on Bus
61- 12 General Purpose I/O pins
62- 2 UARTs: one basic, one with modem control signals
63- 2 SPI
64- I2C interface with 2-way splitter
65- 8 ADC inputs
66- 3 high-resolution timers
67- Ethernet
68
69## Optional Stacked Modules
70
71
72
73
74
75
76
77
78
79
80
81
82
83This README is essentially a work-in-progress. I will try to further
84and documentation as and when I further the device driver base for the
85Mizar32 target.
86
87If you feel like reaching out to me for questions pertaining to the
88target development board, you can write to me: ramangopalan AT gmail
89dot com.
90
91## Supported compiler
92
93This BSP is built with the AVR32 GCC that comes with the Microchip
94Studio. I am using the Microchip Studio version 7.0.2594. Make sure
95that avr32-gcc.exe is visible on your command line. Add the binary
96directory to you PATH.
97
98
99
100I use Git Bash (Windows) for compiling the RT-Thread system. Once you
101set your path correctly, invoke Git Bash to query avr32-gcc.exe's
102version. The output should look similar to this:
103
104```bash
105$ avr32-gcc.exe --version
106avr32-gcc.exe (AVR_32_bit_GNU_Toolchain_3.4.2_435) 4.4.7
107Copyright (C) 2010 Free Software Foundation, Inc.
108This is free software; see the source for copying conditions. There is NO
109warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
110```
111
112If you see this, you're all set to compile RT-Thread for Mizar32.
113
114## Program firmware
115
116### Step 1: download the RT-Thread codebase and navigate to bsp/avr32uc3a0.
117
118```bash
119$ cd bsp/avr32uc3a0/
120```
121
122### Step 2: build
123
124```bash
125scons -c
126scons
127```
128
129### Step 3: flash
130
131If everything went well, scons should have generated an elf file:
132rtthread-uc3a0256.elf. Let us program the file. The program 'atprogram'
133comes with Microchip Studio. I didn't have to do much here. Just make sure
134`atprogram.exe' is in your PATH.
135
136```bash
137atprogram -t atmelice -i jtag -d at32uc3a0256 program -f rtthread-uc3a0256.elf
138```
139
140Note that you should already see the on-board LED (PB29) blink if your
141programming was successful. I use the Atmel ICE programmer. To access
142msh with the default menuconfig's configuration, you'll need the VGA
143shield. Connect the target board to a 12 VDC wall adapter. Also
144connect the shield to a VGA monitor and a PS/2 keyboard.
145
146## Running Result
147
148The output information on serial port for `ps' the command should look like this:
149
150```bash
1510x000003c0 tidle0 31 ready 0x00000054 0x00000100 67% 0x00000009 OK
1520x00001650 tshell 20 running 0x000000b4 0x00001000 13% 0x0000000a OK
1530x00001350 led1 5 suspend 0x0000007c 0x00000400 12% 0x00000005 EINTRPT
154```
155
156Here is a picture of the RT-Thread session on the VGA monitor:
157
158
159
160## Peripheral Support
161
162| Drive | Support | Remark |
163| ----- | ------- | ------- |
164| UART | Support | UART0/1 |
165| GPIO | Support | - |
166| I2C | - | - |
167| RTC | - | - |
168| SPI | - | - |
169| TIMER | - | - |
170| WDT | - | - |
171
172