1# **NuMaker-HMI-MA35D1**
2
3## **Introduction**
4
5The NuMaker-HMI-MA35D1 is an evaluation board for Nuvoton NuMicro MA35D1 series microprocessors, and consists of three parts: a NuMaker-SOM-MA35D16A81 SOM board, a NuMaker-BASE-MA35D1B1 base board and a 7 inch TFT-LCD daughter board. The SOM board integrates core components to simplify the system design, based on MA35D16A887C (BGA312 package, and stacking a 256 MB DDR), PMIC power solution, a 16 GB eMMC Flash, and two Gigabit Ethernet PHY. The NuMaker-HMI-MA35D1-S1 has rich peripherals such as 2 sets of Gigabit Ethernet, USB2.0 high-speed host and device, 2 sets of CAN FD, and SPI, I2C, UART, RS-485 serial communication ports for users to facilitate the evaluation in HMI and industrial control, home appliances, 2-wheel cluster, medical device, new energy applications, ML (Machine Learning) or your creative applications.
6
7The NuMicro MA35D1 series is a heterogeneous multi-core microprocessor targeted to high-end edge IIoT gateway. It is based on dual 64-bit Arm Cortex-A35 cores, and one 180 MHz Arm Cortex-M4 core. Based on the high-performance cores, the MA35D1 series facilities the tiny AI/ML for edge computing. The MA35D1 supports 16-bit DDR2 and DDR3/DDR3L SDRAM. For an easy system design and manufacture, the MA35D1 series also offers LQFP and BGA packages stacked with the DDR2/DDR3L SDRAM and density up to 512 MB, which significantly reduces PCB layer, size and electromagnetic interference (EMI).
8
9<p align="center">
10<img src="./figures/NuMaker-HMI-MA35D1.png" alt="fishy" class="bg-primary">
11</p>
12
13|NuMaker-BASE-MA35D1B1|NuMaker-SOM-MA35D16A81|7-inch LCD Panel|
14|--|--|--|
15|<p align="center"><img src="./figures/NuMaker-BASE-MA35D1B1.png" alt="fishy" class="bg-primary" width="80%"></p>|<p align="center"><img src="./figures/NuMaker-SOM-MA35D16A81.png" alt="fishy" class="bg-primary" width="80%"></p>|<p align="center"><img src="./figures/LCD-Panel.png" alt="fishy" class="bg-primary" width="60%"></p>|
16
17## **NuMaker-SOM-MA35D16A81 Features**
18
19<ul>
20<li>Target Chip</li>
21  <ul>
22    <li>MA35D16A887C (BGA 312-Ball) MCP package with DDR3L (256 MB), which can run up to 800 MHz</li>
23  </ul>
24<li> Power </li>
25    <ul>
26    <li>DC 5V input through the high speed connector**</li>
27    <li>PMIC DA9062-3A</li>
28      <ul>
29      <li>Four DC/DC</li>
30        To supply 1.2V Core power, 1.2V CPU power, 1.35V DDR3L Memory power and 3.3V I/O power
31      <li>Four LDO</li>
32        To supply 3.0V RTC power, 1.8V I/O power, 2.5V PLL power and 3.3V/1.8V eMMC NAND Flash power
33      </ul>
34    <li>Battery input header</li>
35</ul>
36<li>Memory Devices</li>
37  <ul>
38  <li>An on-board eMMC NAND Flash memory device (16 GB)</li>
39  </ul>
40<li>Two Gigabit Ethernet (RGMII) PHY devices</li>
41<li>Two 120-pin high speed connectors to connect with BASE board</li>
42<li>One PMIC reset key button</li>
43</ul>
44
45## **NuMaker-BASE-MA35D1B1 Features**
46
47<ul>
48  <li>Power</li>
49  <ul>
50    <li>5V/2A Power Jack and Slide Switch</li>
51  </ul>
52  <li>Debug/Trace</li>
53  <ul>
54    <li> UART0 debug port: USB Virtual COM (VCOM) port </li>
55    <li> Debug/Trace ports: SWJ (JTAG+SWD), ETM and SWD connectors </li>
56  </ul>
57  <li>Memory Devices</li>
58  <ul>
59    <li>An on-board Quad SPI NAND Flash device (512 MB)</li>
60    <li>An on-board NAND Flash device (1 GB)</li>
61    <li>Standard-SD (SD2.0) memory card slot</li>
62  </ul>
63
64  <li>One power-on setting DIP-Switch for evaluation booting source selection</li>
65
66  <li>Two 120-pin high speed connectors to connect with SOM board</li>
67  <li>Two sets of Gigabit Ethernet ports: Two Gigabit Ethernet transformer devices and two RJ45 port connectors</li>
68  <li>Two sets of high speed USB ports: One Host/Device port and one Host port</li>
69  <li>Two camera capture (CMOS sensor) header connectors</li>
70  <li>One LCM connector to connect with 7-inch 1024x600 LCD daughter board</li>
71  <li>One audio codec with microphone input and speaker output</li>
72  <li>One SIM card slot</li>
73  <li>One External Bus Interface (EBI) header connector</li>
74  <li>Two sets of UART transceivers and DB9 connectors</li>
75  <li>Two sets of RS485 transceivers and header connectors</li>
76  <li>Two sets of CAN FD transceivers and header connectors</li>
77  <li>One 8-channel ADC header connector</li>
78  <li>MEMS Microphone</li>
79  <li>MEMS G-Sensor</li>
80  <li>Three user key buttons</li>
81  <li>Two user LEDs</li>
82  <li>One set of buzzer pads</li>
83</ul>
84
85## **Supported compiler**
86
87Support GCC compiler. More information of these compiler version as following:
88
89| Compiler | Tested version |
90| -- | -- |
91| GCC | Arm Embedded Toolchain 10.3-2021.10 (Env 1.3.5 embedded version)|
92
93## **Build RT-Thread**
94You can build rt-thread.bin for NuMaker-HMI-MA35D1 board. Steps as following. Notice, the building will include **ma35-rtp/rtthread.bin** file into **numaker-hmi-ma35d1/rtthread.bin** for heterogeneous multi-core demonstration.
95
96```bash
97# cd rt-thread/bsp/nuvoton/numaker-hmi-ma35d1
98# menuconfig --generate
99# scons -c
100# pkgs --update
101Cloning into '<Path-to-rt-thread>\bsp\bsp\nuvoton\numaker-hmi-ma35d1\packages\LVGL-latest'...
102remote: Enumerating objects: 67821, done.
103remote: Counting objects: 100% (1085/1085), done.
104remote: Compressing objects: 100% (608/608), done.
105remote: Total 67821 (delta 512), reused 964 (delta 476), pack-reused 66736
106Receiving objects: 100% (67821/67821), 109.32 MiB | 572.00 KiB/s, done.
107Resolving deltas: 100% (52349/52349), done.
108Updating files: 100% (1248/1248), done.
109==============================>  LVGL latest is downloaded successfully.
110...
111==============================>  OPTPARSE latest is downloaded successfully.
112==============================>  wavplayer update done
113==============================>  ramdisk update done
114==============================>  optparse update done
115Operation completed successfully.
116
117# scons -j 16
118119120LINK rtthread.elf
121arm-none-eabi-objcopy -O binary rtthread.elf rtthread.bin
122arm-none-eabi-size rtthread.elf
123   text    data     bss     dec     hex filename
1241208928   14828 15507944        16731700         ff4e34 rtthread.elf
125scons: done building targets.
126
127<Path-to-rt-thread>\bsp\nuvoton\numaker-hmi-ma35d1\rtthread.bin
128```
129
130## **Program firmware using NuWriter**
131
132To switch SW4 dip-switch on NuMaker-BASE-MA35D1B1 to do corresponding  actions as below.
133
134**Power-on Setting**
135L: OFF dip-switch
136H: ON dip-switch
137
138| Memory Storage | **Burn to** settings | **Boot from** settings |
139|--|--|--|
140| **DDR** | <ul><li>Switch 1(PG0) to ON.</li><li>Switch 3(PG2) to ON.</li><li>Switch 4(PG3) to ON.</li><li>Switch Others to OFF.</li></ul> |  |
141| **EMMC**<br>(Select eMMC1 device and 8-bit mode) | <ul><li>Switch 1(PG0) to ON.</li><li>Switch 3(PG2) to ON.</li><li>Switch 4(PG3) to ON.</li><li>Switch 7(PG6) to ON.</li><li>Switch 8(PG7) to ON.</li><li>Switch Others to OFF.</li></ul> | <ul><li>Switch 1(PG0) to ON.</li><li>Switch 3(PG2) to ON.</li><li>Switch 7(PG6) to ON.</li><li>Switch 8(PG7) to ON.</li><li>Switch Others to OFF.</li></ul> |
142| **Raw NAND**<br>(Select Ignore BCH and Page setting) | <ul><li>Switch 1(PG0) to ON.</li><li>Switch 3(PG2) to ON.</li><li>Switch 4(PG3) to ON.</li><li>Switch Others to OFF.</li></ul> | <ul><li>Switch 1(PG0) to ON.</li><li>Switch 4(PG3) to ON.</li><li>Switch Others to OFF.</li></ul> |
143| **Serial NAND**<br>(Select 4-bit mode) | <ul><li>Switch 1(PG0) to ON.</li><li>Switch 3(PG2) to ON.</li><li>Switch 4(PG3) to ON.</li><li>Switch 7(PG6) to ON.</li><li>Switch Others to OFF.</li></ul> | <ul><li>Switch 1(PG0) to ON.</li><li>Switch 7(PG6) to ON.</li><li>Switch Others to OFF.</li></ul>
144
145### **Download to DDR and Run**
146
147You can run windows batch script to download rtthread.bin into memory, then run it. The path of batch script as below.
148
149```bash
150<path-to-rtthread>\bsp\nuvoton\numaker-hmi-ma35d1\nuwriter_scripts\nuwriter_ddr_download_and_run.bat
151```
152
153<p align="center">
154<img src="./figures/ddr.gif">
155</p>
156
157### **Burn to EMMC**
158
159You can run windows batch script to download rtthread.bin into emmc flash, then run it. The path of batch script as below.
160
161```bash
162<path-to-rtthread>\bsp\nuvoton\numaker-hmi-ma35d1\nuwriter_scripts\nuwriter_sd_programming.bat
163```
164
165<p align="center">
166<img src="./figures/emmc.gif">
167</p>
168
169### **Burn to Serial NAND**
170
171You can run windows batch script to download rtthread.bin into SPI-NAND flash, then run it. The path of batch script as below.
172
173```bash
174<path-to-rtthread>\bsp\nuvoton\numaker-hmi-ma35d1\nuwriter_scripts\nuwriter_spinand_programming.bat
175```
176
177<p align="center">
178<img src="./figures/spinand.gif">
179</p>
180
181### **Burn to Raw NAND**
182
183You can run windows batch script to download rtthread.bin into Raw NAND flash, then run it. The path of batch script as below.
184
185```bash
186<path-to-rtthread>\bsp\nuvoton\numaker-hmi-ma35d1\nuwriter_scripts\nuwriter_nand_programming.bat
187```
188
189<p align="center">
190<img src="./figures/nand.gif">
191</p>
192
193## **Test**
194
195|Connector on board|Wiring|Usage|
196|-|-|-|
197|VCOM(CON21)|Use an USB line| rt-thread@CA35 Console |
198|RS232_16(CON14)|Using an USB to RS232 convert| rt-thread@RTP Console |
199
200You can use Tera Term terminate emulator (or other software) to type commands of RTT. All parameters of serial communication are shown in below image. Here, you can find out the corresponding port number of Nuvoton Virtual Com Port in window device manager.
201
202<p align="center">
203<img src="./figures/SerialSetting.png" alt="fishy" class="bg-primary" width="40%">
204</p>
205<br>
206
207## **Purchase**
208
209* [Nuvoton Direct](https://direct.nuvoton.com/en/numaker-hmi-ma35d1-s1)
210
211## **Resources**
212
213* [Download Board Schematics](https://www.nuvoton.com/resource-download.jsp?tp_GUID=HL102022102107140870)
214* [Download User Manual](https://www.nuvoton.com/resource-download.jsp?tp_GUID=UG132022101900252882)
215* [Download Datasheet](https://www.nuvoton.com/resource-download.jsp?tp_GUID=DA00-MA35D16)
216* [Download NuWriter](https://github.com/OpenNuvoton/MA35D1_NuWriter)
217