==== MXCHIP EMW3162 ====
{{:boards:emw3162.jpg?200}}
This is a compact WiFi module with a powerful ARM CPU.
By default, this module runs an O/S called MICO.
Whilst this module is relatively inexpensive, the development tools for the MICO O/S cost thousands. This makes the device practically useless for now.
=== Pinout ===
PB0 PB1
GREEN LED RED LED
GND NC NC PC4 PC3 PB14 PA8 PA6 PA5
39 38 37 36 35 34 33 32 31
PB6 1 30 PB9
PB7 2 STM32F205RG 29 PA0-WKUP
PA13 3 28 PA14
PC7 4 27 BOOT0
PA3 5 26 NC
PA4 6 25 GND
PB3 7 24 VDD-3V3
PB4 8 D0 23 PA10 RX
PB5 9 D1 22 PA9 TX
PB8 10 D2 21 PA11
PA1 11 D3 20 PA12
PC2 12 CLK 19 PB11
PB14 13 CMD 18 PA15
PC6 14 3V3 17 NRST
GND 15 GND 16 PB1
GND 40 ANTENNA
GND 41
42 43 44
GND GND GND
MICO ISP
==== ===
STATUS PB9 TX PA10 RX
BOOT PB1 RX PA9 TX
EASYLINK PB8 3V3 220R BOOT0
SWD JTAG
=== ====
SWCLK PA14 TCK PA14
SWDIO PA13 TMS PA13
NRST NRST TRST PB4
TDI PA15
TDO PB3
=== Probe ===
stm32flash -b 9600 /dev/ttyCP2102
stm32flash 0.4
http://stm32flash.googlecode.com/
Interface serial_posix: 9600 8E1
Version : 0x31
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0411 (STM32F2xx)
- RAM : 128KiB (8192b reserved by bootloader)
- Flash : 1024KiB (sector size: 4x16384)
- Option RAM : 16b
- System RAM : 29KiB
=== Modes ===
^ BOOT PB1 ^ STATUS PB9 ^ Mode of operation |
| 0 |0 | Factory mode |
| 0 |1 | Firmware update mode |
| 1 |X | Working mode|
=== Firmware update mode ===
The bootloader is entered by holding PB1 low and PB9 high.
BOOT PB1 GND
STATUS PB9 1K 3V3
+***************(C) COPYRIGHT 2012 MXCHIP corporation************+
| EMW316x Common Bootloader (Version 4.0.1_WDG) |
+ command ----------------+ function ----_-----------------------+
| 1:FWUPDATE <-a> | update the firmware from UART using Ymodem|
| 2:FWERASE | erase the current firmware and settings |
| 3:BOOT | excute the current firmware |
| 4:REBOOT | Reboot |
| ?:HELP | displays this help |
+--------------------+-------------------------------------------+
| By William Xu from MXCHIP M2M Team |
+----------------------------------------------------------------+
MXCHIP>
=== Firmware update ===
Minicom may be used to send a file using the ymodem protocol.
The firmware file must be compatible with the currently installed MICO O/S.
MXCHIP>
1
Waiting for the file to be sent ... (press 'a' to abort)
CCC
+-----------[ymodem upload - Press CTRL-C to quit]------------+
|Sending: WiFiLink.bin |
|Bytes Sent: 194856 BPS:8683 |
|Sending: |
|Ymodem sectors/kbytes sent: 0/ 0k |
|Transfer complete |
| |
| READY: press any key to continue... |
+-------------------------------------------------------------+
MXCHIP>
mxchipWNet Demo: Wi-Fi Link
mxchipWNet library version: 31620001.027
Start scan
connect to MXCHIP_RD....., return -1
Setup soft AP: Soft AP test, return 0
uAP up
Soft AP mode: IP address: 192.168.0.1
Soft AP mode: NetMask address: 255.255.255.0
Soft AP mode: MAC address: c893464272f9
=== Flash memory map ===
^Address ^Function |
|0x8000000 |Boot loader|
|0x8004000 |Parameters |
|0x800C000 |Firmware |
|0x8060000 |Temporary |
|0x80C0000 |RF driver|
=== Standalone demo ===
Install [[:tools:libopencm3|OpenCM3]].
Install [[:tools:stm32flash|STM32Flash]].
Enter ST ISP mode using BOOT0, RX and TX as shown in the pinout above.
Fetch the demo and edit the Makefile, change the serial device to your host device (TTYISP).
hg clone http://hg.kewl.org/pub/miniblink-emw
cd miniblink-emw
vi Makefile
Now, backup the chip, load standalone demo and run it.
make backup
make stm32flash
You can restore the MICO O/S from the emw3162.bin file, do not overwrite it.\\
Eg.
stm32flash -w emw3162.bin -b 115200 /dev/ttyAMA0
===Resources===
[[https://www.st.com/resource/en/datasheet/stm32f205rg.pdf|MCU datasheet]]
[[https://www.st.com/resource/en/reference_manual/cd00225773-stm32f205xx-stm32f207xx-stm32f215xx-and-stm32f217xx-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf|MCU reference manual]]