1# MCUZone AT32UC3B0256 mini development board 2 3## Introduction 4 5**The AVR32 is a high performance, low power 32-bit Atmel AVR 6microcontroller.** This board support package supports the MCUZone 7AVR32 mini development board (also known as the AVR32DEV1). The 8development board uses the AT32UC3B0256 microcontroller. 9 10 11 12Note: Unfortunately, the online link for the development board (both 13MCUZone OR Aliexpress) doesn't work. I don't have access to the 14schematic (OR Gerber information) for this development kit. I used a 15multimeter to look for the connected pins. If you - the reader - do 16have access to the schematic/pinouts, could you please reach out to 17me? 18 19This README is essentially a work-in-progress. I will try to map the 20berg rows (J1 and J2) and document them as and when I further the 21device driver base for the target. 22 23If you feel like reaching out to me for questions pertaining to the 24target development board, you can write to me: ramangopalan AT gmail 25dot com. 26 27## Supported compiler 28 29This BSP is built with the AVR32 GCC that comes with the Microchip 30Studio. I am using the Microchip Studio version 7.0.2594. Make sure 31that avr32-gcc.exe is visible on your command line. Add the binary 32directory to you PATH. Yes, on Windows. Sorry :( 33 34 35 36I use Git Bash (Windows) for compiling the RT-Thread system. Once you 37set your path correctly, invoke Git Bash to query avr32-gcc.exe's 38version. The output should look similar to this: 39 40```bash 41$ avr32-gcc.exe --version 42avr32-gcc.exe (AVR_32_bit_GNU_Toolchain_3.4.2_435) 4.4.7 43Copyright (C) 2010 Free Software Foundation, Inc. 44This is free software; see the source for copying conditions. There is NO 45warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 46``` 47 48If you see this, you're all set to compile RT-Thread for AT32UC3B0256. 49 50## Program firmware 51 52### Step 1: download the RT-Thread codebase and navigate to bsp/avr32uc3b0. 53 54```bash 55$ cd bsp/avr32uc3b0/ 56``` 57 58### Step 2: build 59 60```bash 61scons -c 62scons 63``` 64 65### Step 3: flash 66 67If everything went well, scons should have generated an elf file: 68rtthread-uc3b0256.elf. Let us program the file. The program 'atprogram' 69comes with Microchip Studio. I didn't have to do much here. Just make sure 70'atprogram.exe' is in your PATH. 71 72```bash 73atprogram -t atmelice -i jtag -d at32uc3b0256 program -f rtthread-uc3b0256.elf 74``` 75 76Note that you should already see the on-board LEDs (PA7, PA8) blink if your 77programming was successful. I use the Atmel ICE programmer. To access 78msh, you'll need an FTDI breakout board. Connect the target board to 79the FTDI breakout with jumper wires: 80 81- GND (FTDI) to GND (development board) 82- RX (FTDI) to J2, pin 10. 83- TX (FTDI) to J2, pin 7. 84 85## Running Result 86 87The output information on serial port for `ps' the command should look like this: 88 89```bash 900x000003c0 tidle0 31 ready 0x00000054 0x00000100 67% 0x00000009 OK 910x00001650 tshell 20 running 0x000000b4 0x00001000 13% 0x0000000a OK 920x00000ac4 led2 5 suspend 0x0000007c 0x00000400 12% 0x0000000a EINTRPT 930x00001350 led1 5 suspend 0x0000007c 0x00000400 12% 0x00000005 EINTRPT 94``` 95 96## Peripheral Support 97 98| Drive | Support | Remark | 99| ----- | ------- | ------- | 100| UART | Support | UART0/1 | 101| GPIO | - | - | 102| I2C | - | - | 103| RTC | - | - | 104| SPI | - | - | 105| TIMER | - | - | 106| WDT | - | - | 107 108