-
Notifications
You must be signed in to change notification settings - Fork 1
Board: Phytec phyWAVE KW22
Designed and produced by PHYTEC Messtechnik GmbH, D-55129 Mainz.
MCU MKW22D512 | CM4, 32-bit, 64kB RAM |
---|---|
Light | (TCS3772 Color Light-to-Digital Converter) |
Pressure | (MPL3115A2) |
Tri-axis accelerometer | (MMA8652FC) |
Tri-axis magnetometer | (MAG3110FCR1) |
IR-Termopile Sensor | (TMP006) |
Humidity Sensor | (HDC1000) |
RGB-LED | |
Capacitive Button | |
1x User-Button | |
Integrated IEEE802.15.4(2006)-compliant radio at 2.4 GHz, 250kBit/s | Support for dual PAN ID mode |
phyWAVE-A-Eval-Board with equipped phyWAVE-KW22 processor/radio-module.
The PCB-pieces with the mounted sensors can be separated from the eval-board to capture sensor-values from specific spatial points.
Device | ID | Supported | Comments |
---|---|---|---|
MCU | MKW22D512 | yes | mainline |
Low-level driver | GPIO | yes | mainline |
PWM | yes | mainline | |
UART | yes | mainline | |
I2C | yes | mainline | |
SPI | yes | mainline | |
USB | no | ||
RTT | yes | mainline | |
RNG | yes | mainline | |
Timer | yes | mainline | |
Radio Chip | integrated | yes | mainline |
Humidity Sensor | HDC1000 | yes | mainline |
Pressure Sensor | MPL3115A2 | yes | mainline |
Accelerometer | MMA8652FC | yes | mainline |
Magnetometer | MAG3110FCR1 | yes | mainline |
Light Sensor | TCS3772 | yes | mainline |
IR-Termopile Sensor | TMP006 | yes | mainline |
Capacitive Button | PCB | no | planned |
USB device support | integrated | yes | WIP |
See ARM Family
Working:
In order to program (flash) and debug the node you need OpenOCD and an ARM version of gdb (arm-none-eabi-gdb
), which provided by most toolchains. Most Linux distributions provide also a package for OpenOCD. The required configuration files are provided by RIOT. Since version 0.9 of OpenOCD the target microcontroller MKW22D512 is supported. The following section describes how to install OpenOCD and set up a gdb-debugging session.
The debugging setting consists of openocd and GDB. Additionally one can use CGDB frontend for GDB or Nemiver (sudo yum install nemiver
) for a more fancy looking.
- Various libraries:
Command for installing them in Ubuntu 14.04:
sudo apt-get install gcc libudev-dev libusb-1.0-0-dev libfox-1.6-dev autotools-dev autoconf automake libtool gdb-arm-none-eabi gcc-arm-none-eabi cgdb libhidapi-hidraw0 libusb-dev libhidapi-dev libhidapi-hidraw0-dbg
Command for installing them in Fedora 21 /CentOS 7:
sudo yum install libudev-devel libusb-devel fox autoconf automake libtool cgdb hidapi-devel libftdi-devel systemd-devel arm-none-eabi-gdb arm-none-eabi-gcc arm-none-eabi-newlib
ATTENTION: Caused by a BUG in Fedora 21 arm-none-eabi-gcc the provided Toolchain from the Repository isn't able to build RIOT-OS (and a lot more of THUMB-Code Projects) properly! Better use Linaro Toolchain or Toolchain from https://launchpad.net/gcc-arm-embedded. You have to export the Path into your $PATH or e.g. edit your ~/.bashrc file.
For building openOCD you might need (Fedora 21 / CentOS 7):
sudo yum install mpfr-devel flex gmp-devel libmpc-devel texinfo bison ncurses-libs ncurses-devel expat expat-devel make gcc gcc-c++
Install openocd (0.9.0-dev-00209-gc3ec194) with the following steps:
clone git://git.code.sf.net/p/openocd/code git checkout c3ec194 ./bootstrap ./configure --enable-cmsis-dap make sudo make install
Add hidraw permissions:
- Open /etc/udev/rules.d/99-hidraw-permissions.rules and append:
`KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev" ls -l /dev/hidraw*`
- Reattach the USB-target in order to accept the changes for the CMSIS-DAP USB debugger.
- Build RIOT for the phyWAVE (pba-d-01) board
Navigate to the appropriate application inside the RIOT folder structure you want to build. Build, debug or flash with:
BOARD=pba-d-01-kw2x make BOARD=pba-d-01-kw2x make flash BOARD=pba-d-01-kw2x make debug BOARD=pba-d-01-kw2x make reset BOARD=pba-d-01-kw2x make term (to start the terminal connection to the board)
Attention: In Fedora it is possible that you have to install pyserial:
sudo yum install pyserial
It is possible if you are using Fedora that your OpenOCD cannot connect to your Board, if so, try:
sudo groupadd plugdev sudo usermod -aG plugdev YOURUSERNAME sudo usermod -aG dialout YOURUSERNAME sudo reboot
If you want to use the fancy Nemiver for debugging you have to edit the following files in the shown way:
.../boards/pba-d-01-kw2x/dist/gdb.conf :
target extended-remote:3333
.../boards/pba-d-01-kw2x/dist/debug.sh :
if [ "$retval" == "$unlocked_fcfield" ]; then echo -e "Flash configuration tested...${green} [OK]${NC}" #arm-none-eabi-gdb -tui --command=${1} ${2} #cgdb -d arm-none-eabi-gdb --command=${1} ${2} arm-none-eabi-gdb --batch --command=${1} ${2} nemiver --remote=localhost:3333 --gdb-binary="$(which arm-none-eabi-gdb)" ${2}
When perform "BOARD=pba-d-01 make flash" and the target is getting flashed, openocd prints the following message:
flash configuration field erased, please reset the device
Do not reset the device, the terminal print is missleading!!!
If you disconnect the target or shutting down openocd during flash the target will be locked!!
To prevent the risk of device locking, there is a automatic test that validates if the .elf-file was built with a fitting board-configuration. This automatic test is executed when perform "make debug" or "make flash".
The successful test is indicated before flash or debug with the following print:
Flash configuration tested... [OK]
If the test fails, the flash or debug process will abort.
If the target-flash is empty or there is a wrong config loaded to the flash, openocd won't work in the described way above. One can fix this following:
- push and hold reset and start openocd in the RIOT-application build-directory.
openocd -f ../../boards/pba-d-01-kw2x/dist/openocd.cfg
- Open an other Terminal and type:
telnet localhost 4444 reset halt
- release reset
- still in that terminal, type the following to overwrite the flash memory with e.g. your hello world binary
flash write_image erase examples/hello-world/bin/pba-d-01-kw2x/hello-world.elf
RIOT - The friendly Operating System for the Internet of Things
Homepage | [GitHub] (https://github.com/RIOT-OS/) | Developers Mailing List | Users Mailing List | Twitter @RIOT_OS
- Family: ARM
- Board: Airfy Beacon
- Board: Arduino Due
- Board: CC2538DK
- Board: CC2650STK
- Board: HikoB Fox
- Board: IoT LAB M3
- Board: LimiFrog-v1
- Board: mbed_lpc1768
- Board: MSB-IoT
- Board: MSBA2
- Board: Nucleo-L1
- Board: Nucleo-F334
- Board: Nucleo-F303
- Board: Nucleo-F091
- Board: Mulle
- Board: OpenMote
- Board: PCA1000x (nRF51822 Development Kit)
- Board: Phytec phyWAVE-KW22
- Board: RFduino
- Board: SAMR21-xpro
- Board: SAML21-xpro
- Board: Spark Core
- Board: STM32F0discovery
- Board: STM32F3discovery
- Board: STM32F4discovery
- Board: UDOO
- Board: yunjia-nrf51822
- Board: Zolertia remote
- Family: ATmega
- Board: Arduino Mega2560
- Family: MSP430
- Board: MSB-430H
- Board: TelosB
- Board: WSN430
- Board: Zolertia Z1
- Board: eZ430-Chronos
- Family: native
- Board: native
- Family: x86
- Board: Intel Galileo