freescale tower system expansion with pmod-compatible ... · freescale tower system expansion with...

34
Freescale Tower System Expansion with PMOD-compatible Peripheral Modules by Peter Fenn Avnet Global Technical Marketing

Upload: phamtu

Post on 13-Apr-2018

241 views

Category:

Documents


3 download

TRANSCRIPT

Freescale Tower System Expansion with

PMOD-compatible Peripheral Modules

by Peter Fenn

Avnet Global Technical Marketing

Agenda

1. Overview of Freescale Tower Expansion Options

2. Overview of Pmod-compatible Modules

3. Brooklyn: Tower to Pmod adaptor board

4. Pmod Modules: Digilent (National Instruments)

5. Pmod-compatible Modules: Maxim

6. Pmod-compatible Modules: ADI

7. Pmod-compatible Modules & Boards: Avnet EM

8. Brooklyn Adaptor Board Interface Details

9. Tower System Power Supply Considerations

10. Brooklyn Board TWR-K70 Software

11. Details of Maxim's Analog Essentials Collection

12. Details of Maxim's New Reference Designs

13. Demo: Adding Maxim Pmods to TWR-K70

14. Demo: Adding Wi-Fi to the TWR-K70

15. Links, Additional Info and Ordering Boards

Overview of Freescale Tower Expansion Options

• Modular, expandable, open-source h/ware development

platform for 8/16/32bit MCUs/MPUs

• More than a dozen Kinetis-K Tower modules are available

• Rapid evaluation and prototyping with maximum h/ware reuse

• Supported by a growing range of Tower format peripheral

plug-in boards (Wi-Fi, Sensing, Graphics LCD, Audio,...)

• Tower MCU modules include TWRPI expansion connectors,

however the selection of plug-in TWRPI modules is limited !

• During development, there is often a need to interface to higher

precision analog functions than what is available on the MCU.

The solution…?

Pmod™-compatible Peripheral Modules!

Overview of Available Tower System Modules

TWR-SER

TWR-SER2

TWR-PROTO

Peripheral

Modules ($15–$149)

Processor

Modules ($39-$119)

TWR-MEM TWR-LCD

TWR-LCD-RGB

TWR-SENSOR-PAK

TWR-SENSOR-PAK-AUTO

TWRPI-MMA6900

TWRPI-MPL115A

TWR-ADCDAC-LTC

TWR-WIFI-RS2101

TWR-WIFI-G1011MI

TWR-WIFI-AR4100

TWR-MCF51JE

TWR-MCF51CN

TWR-MCF51MM

TWR-MCF51QM

TWR-MCF5225X

TWR-MCF5441X

TWR-MCF51JF

MED-EKG

TWR-S12GN32

TWR-S12G128 TWR-S08LL64

TWR-S08LH64

TWR-S08JE128

TWR-S08MM128

TWR-S08GW64

TWR-S08UNIV

TWR-S08PT60

TWR-MPC5125

TWR-P1025

TWR-56F8257 TWR-K20D50M

TWR-K20D72M

TWR-K21D50M

TWR-K40X256

TWR-K53N512

TWR-K60N512

TWR-K60D100M

TWR-K60F120M

www.freescale.com/tower

8bit 16bit DSC 32bit ColdFire 32bit Power Arch 32bit Kinetis-K

Serial Prototyping Memory Sensors &

Plug-Ins Displays Wi-Fi

Analog Audio Mesh Networking

Medical

TWR-AUDIO-SGTL TWR-RF-SNAP

KWIKSTIK-K40

TWR-K70F120M

TWR-KL25Z48M

TWR-K60N512-IAR

TWR-K50N512-KEIL

Tower to Pmod Adaptor

AES-BROOKLYN-G

Kinetis Tower System: Reusable, modular development platform www.freescale.com/tower https://community.freescale.com/community/tower

MCU Families

Supported

TWR Part

Number Contents

Price

(SRP)

K20/21 TWR-K20D50M

TWR-K20D72M

TWR-K21D50M

64 LQFP MCU module. USB communication supported

without TWR-SER (recommended for UART) $99

K30/40

TWR-K40X256

TWR-K40D100M

TWR-K40X256 Rev 1.0 (144MBGA), TWRPI-SLCD

TWR-K40D100M Rev 2.0 Silicon (144MBGA) $69

TWR-K40X256-KIT TWR-K40X256 (144MBGA), TWRPI-SLCD

TWR-SER, TWR-ELEV $139

K50

TWR-K53N512 TWR-K53N512 (144MBGA), TWRPI-SLCD $109

TWR-K53N512-KIT TWR-K53N512 (144MBGA), TWRPI-SLCD,

TWR-SER, TWR-ELEV $179

K10/20/60

TWR-K60N512

TWR-K60D100M

TWR-K60N512 Rev 1.0 Silicon (144MBGA)

TWR-K60D100M Rev 2.0 Silicon (144MBGA) $69

TWR-K60N512-KIT TWR-K60N512 (144MBGA), TWR-SER, TWR-ELEV $139

TWR-K60N512-IAR TWR-K60N512-KIT (144MBGA),

TWR-PROTO, Segger J-Link Lite Debug Probe, IAR

EWARM IDE (eval. version)

$239

TWR-K60N512-KEIL TWR-K60N512-KIT (144MBGA),

UNLINK-ME Debug Probe,

KEIL MDK IDE (eval. version)

$199

K70 TWR-K70F120M

TWR-K70F120M-KIT

TWR-K70F120M with MK70FN1M0VMJ12

TWR-K70F120M, TWR-SER, TWR-ELEV

$109

$169

KL25Z TWR-KL25Z48M TWR-KL25Z48M with MKL25Z128VLK4 (80 LQFP) $TBA

TWR-LCD

TWR-SENSOR-

PAK

TWR-WIFI-RS2101

Brooklyn: Tower to Pmod adaptor board

• Developed by Silica for Maxim’s Analog Essentials Collection for which

software source code is provided.

• Kinetis MCU software has been revised and extended to add support for

additional new Subsytem Reference Designs from Maxim…

• With over 100 Pmod-compatible peripheral modules available, Brooklyn

opens-up many possibilities for developers using Freescale Tower boards

Avnet Part#:

AES-BROOKLYN-G

PmodOLED Organic LED

128x32 Graphic Display

Pmod Modules: Digilent (National Instruments)

• Pmod™ is a registered trademark of Digilent Inc

Pmod™ Interface Specification is the property of Digilent Inc

www.digilentinc.com/Pmods/Digilent-Pmod_%20Interface_Specification.pdf

• Digilent have more than 60 different Pmods now listed on their website!

www.digilentinc.com/pmods

PmodGPS

GPS Receiver

PmodUSBUART

USB to UART Interface

PmodDA4 - Octal

12bit DAC outputs

PmodBB - Wire wrap /

Bread-Board prototype

adaptor

Name Part# Description Alcatraz MAXREFDES34# SHA-256 Secure Authentication Design

Santa Cruz MAXREFDES23# IO-Link Light Sensor

Novato MAXREFDES16# 4-20mA Loop-Powered Temperature Sensor with HART

Carmel MAXREFDES18# High Accuracy Analog Current/Voltage Output

Sonoma MAXREFDES14# Isolated Energy Measurement Subsystem Reference Design

Fremont MAXREFDES6# 16-Bit, High-Accuracy, 0 to 100mV Input, Isolated Analog Front-End (AFE)

Corona MAXREFDES12# Isolated Industrial Octal Digital Input Translator/Serializer

Fresno MAXREFDES11# 16-Bit High-Accuracy 0 to 10V Input Isolated Analog Front End (AFE)

Campbell MAXREFDES4# 16-Bit High-Accuracy 4-20mA Input Isolated Analog Front End (AFE)

Santa Fe MAXREFDES5# 16-Bit High Accuracy Multi-Input Isolated Analog Front End (AFE)

Riverside MAXREFDES8# 3.3V Input, 12V (15V) Output Isolated Power Supply

Lakewood MAXREFDES7# 3.3V Input, ±12V (±15V) Output Isolated Power Supply

Oceanside MAXREFDES9# 3.3V to 15V Input, ±15V (±12V) Output, Isolated Power Supply

Pmod-Compatible Modules: Maxim

• Maxim Analog Essentials Collection

• Maxim’s new multi-device Subsystem Reference Designs…

New Reference Designs… www.maximintegrated.com/design/reference-design-center/pmod

Maxim Analog Essentials Collection www.maximintegrated.com/products/evkits/fpga-modules

Pmod-Compatible Modules: ADI

• Analog Devices have a wide range of Pmod™-compatible modules

http://wiki.analog.com/resources/alliances/xilinx

• A high proportion of the many Pmods on the Digilent website feature

devices from Analog Devices

Pmod-Compatible Boards & Modules: Avnet EM

• Multiple Pmod™-compatible 2x6 sockets are included on Avnet’s

latest generation FPGA boards

http://em.avnet.com/drc

• Avnet-designed Pmod™-compatible modules are becoming

available for wireless and interface functions…

Brooklyn Adaptor Board Interface Details

• Pmod interfaces onboard are in the following format:

- three 2x6 connectors (SPI, I2C and GPIO)

- three 1x6 connectors (SPI, I2C and UART)

• CN5 (SPI interface) is used for both the Sonoma and Wi-Fi demos

CN3 CN5 CN7

CN2 CN4 CN6

Brooklyn Adaptor Board Block Diagram CN8

CN6

CN3

CN5

CN7

CN2

CN4

CN1

UART signals

SPI bus

I2C bus

SPI_CS0

SPI_CS1

GPIO

GPIO

GPIO

I2C bus

SPI bus

I2C bus

GPIO

PR

IMA

RY

EL

EV

AT

OR

CA

RD

SE

CO

ND

AR

Y E

LE

VA

TO

R C

AR

D

+3.3V

GND

+3.3V

GND

Pmod Connectors Tower Elevator Cards: PCIe format Connectors

Brooklyn Adaptor Board TWR-K70 Interface Details

Tower System Power Supply Considerations

• 400mA LDO 3.3V voltage regulator on the TWR-K70 board

• 1.5A LDO 3.3V regulator on the Tower Elevator Card (Primary)

Note: this not connected if only source of 5V to Tower Kit is USB power via

OSJTAG connection on the TWR-K70 board!

• Powering the 1.5A regulator on Elevator is recommended using ext.5V

adaptor or additional USB connection to J10 on the Primary Elevator*

• To measure total current for Tower System, use J6 on Primary Elevator Card

(OSJTAG USB should be disconnected)

• Power consumption of Wi-Fi modules in Tx mode can be >300 mA,

power for K70 MCU @120 MHz can be >170 mA

• A reservoir cap plus good

decoupling close to load

to avoid headaches!

The 400mA LDO circuit

on K60 and K70 boards

* Protection circuitry is built into all

Freescale Tower modules to avoid

contention on the power rails.

Although power can be supplied

through any module, power from

primary elevator takes precedence

TWR-K70 Software for use with Brooklyn

• At this time 3 different TWR-K70 reference designs are supported:

Maxim Analog Essentials Collection demo (CW 10.3 bare-metal project.

Config and driver code is generated by Processor Expert)

Maxim Reference Designs + Analog Essentials demo (CW10.5 , MQX4.1 RTOS)

Avnet Wi-Fi Pmod Webserver demo (WICED 2.4.1 SDK, ThreadX RTOS)

• Easily modified C code for support of additional boards

(documented addition of Sonoma is provided as an example)

• The TWR-K70 with it’s large memory capacity, Graphic LCD

controller, h/w encryption, etc makes an ideal development platform.

Details of Maxim’s Analog Essentials Collection

• 15 Pmod™-compatible boards

• 6- or 12-pin connectors

• I2C / SPI / UART interfaces

Maxim Analog Essentials Collection

• All 15 modules are fully supported in both the “bare-metal” and MQX

CodeWarrior projects that are provided

• Desired Maxim Pmod module (connected via Brooklyn)

is selected for testing from the console menu…

Choose a Freescale

Kinetis MCU Tower board

Connect Brooklyn and

Freescale MCU board to the

Elevator boards

Insert chosen Maxim Pmod

into applicable connector on

Brooklyn

Maxim Analog Essentials Collection

• Popular add-ons to Avnet’s FPGA boards, Maxim peripheral modules are

also an easy way to extend your Freescale Tower Development System.

• Facilitates rapid prototyping of popular analog and mixed-signal functions,

including Maxim’s latest sensors, interfaces, clocks, and data converters

• Buy them individually, or the full 15-module collection for $89.95

• Order yours today from Avnet...

More details at www.maximintegrated.com/FPGA-Modules

Maxim’s New Subsystem Reference Designs

• More complex, multi-device reference designs that highlight

advanced capabilities for applications such as:

- Industrial Analog I/O and Sensors

- Energy Measurement

- Security

- Medical

• Opensource hardware

and software. Files available at

www.MaximIntegrated.com

• Module deliverables include:

- System isolation

- Optimized layout

- Device drivers (C code)

• Four examples are detailed in

the following pages…

Sonoma - MAXREFDES14#

Isolated Energy Measurement Subsystem Reference Design

• Accurate: 3% without calibration

• Cost optimized isolation

• - Small size for immediate system implementation

www.MaximIntegrated.com/Sonoma

Corona - MAXREFDES12#

Isolated Octal Digital Input Translator/Serializer

• Reduced component count

o 8-to-1 serialization

o Integrated 5V regulator

• System isolation

• Device drivers (C code)

• Pmod™- form factor

www.MaximIntegrated.com/Corona

Carmel - MAXREFDES18#

High Accuracy Analog Current/Voltage Output

•Accurate – output within ±0.1% over entire range

•Flexible – all industrial current and voltage outputs

•Robust – integrated error detection

www.MaximIntegrated.com/Carmel

Campbell – MAXREFDES4#

16-Bit High-Accuracy 4-20mA Input Isolated AFE

• High accuracy

• 4–20mA current loop input

• 0.2V to 4.096V input range

• Isolated power and data

www.MaximIntegrated.com/Campbell

Demo: Maxim Analog Essentials Collection

• Serial Console based menu-selection of board under test.

• An easy exercise is the MAX44000 module (wide-dynamic range

Ambient Light sensor plus integrated IR proximity sensor)

• One of many available I2C based Pmod-compatible sensor boards

Demo: Maxim Subsystem Reference Designs • “Sonoma” Isolated Energy Measurement Subsystem Reference Design is

fitted to the CN5 connector on Brooklyn board (SPI interface).

• Voltage, Current and Power (a subset of the available measurements) are

displayed for a power strip that is monitored by Sonoma.

• Amps and Watts values change when different loads are plugged-in

*Note: Only SPI mode is

supported at present in the

Brooklyn-based demo.

(The MAX78615 device on

Sonoma allows however,

selection of SPI, I2C or UART

for the host interface)

• Murata SN8000 based 802.11bgn Wi-Fi module

(uses Broadcom BCM43362 device)

• Murata module includes antenna and is pre-certified!

(for fast time to market, mitigation of risk and cost…)

• Broadcom WICED SDK Toolchain was used (see next slide)

• Example C-code is provided for use with Brooklyn board

(TWR-K70 adaptation of code in Broadcom WICED SDK)

• Demos use SPI host interface but the Avnet Pmod can be configured

to implement an SDIO host interface (1bit or 4bit, at up to 50 MHz)

• Network stack is on K70 MCU, Security Supplicant is on BCM43362

Demo: Avnet 802.11bgn Wi-Fi Pmod

Pmod-MUWF

# Description Elev.Pin# K70 Port Pin

1 SPI0_CS1 B47 PTD15

2 SPI0_MOSI B45 PTD13

3 SPI0_MISO B44 PTD14

4 SPI0_SCK B48 PTD12

7 SPI0_INT B70 PTB10

8 WL_RESET B78 PTC13

9

10 WL_GPIO0 B77 PTC12 Avnet Part#: AES-PMOD-MUWF-G

Broadcom’s Wi-Fi WICED SDK includes:

● Open source build system and toolchain based on GNU make

(native IAR support coming soon!)

● Eclipse-based IDE that integrates with a JTAG programmer and single-step,

thread-aware debugger based on OpenOCD and GDB.

● A comprehensive software stack with a choice of several RTOS/TCP stack options

includingThreadX/NetX, ThreadX/NetX Duo and FreeRTOS/LwIP.

● Advanced security and networking features such as SSL/TLS, IPv4/IPv6 networking,

and mDNS (Bonjour) device discovery.

● Bluetooth Low Energy SmartBridge™ to connect Bluetooth Smart devices to Wi-Fi

● WICED Application Framework including bootloader, flash storage API, over-the-air

(OTA) upgrades, factory reset, and system monitor.

● Simple out-of-box device setup using Apple-licensed MFi technology or via a web

browser and softAP/webserver.

● Production ready sample apps and application snippets demonstrating how to use

the WICED API feature set.

● Various test applications to aid manufacturing and certification.

● All documentation is included inside the WICED SDK.

Demo: Avnet 802.11bgn Wi-Fi Pmod

Demo: Avnet 802.11bgn Wi-Fi Pmod

Browser and Terminal Console screens

for the Avnet Wi-Fi Pmod demo…

Links, Additional Info and Ordering Boards

All Pmod™-compatible boards discussed (from Digilent, Maxim, ADI and Avnet)

are available for purchase from Avnet! http://avnetexpress.avnet.com

Digilent/National Instruments Pmod Peripheral Modules

see the listing at: www.digilentinc.com/pmods

Maxim Analog Essentials Collection Pmod™-compatible modules: www.em.avnet.com/en-us/design/drc/Pages/Maxim-Pmod-Compatible-Plug-In-Peripheral-Modules.aspx

Maxim multi-device Subsystem Reference Design Pmods: www.maximintegrated.com/design/reference-design-center/pmod

Analog Devices Pmod™-compatible modules

http://wiki.analog.com/resources/alliances/xilinx

and www.digilentinc.com/pmods

Avnet-designed boards may be browsed at:

http://em.avnet.com/drc

Brooklyn Pmod to Tower Adaptor Board:

AES-BROOKLYN-G

Pmod-MUWF 802.11bgn Wi-Fi board:

AES-PMOD-MUWF-G

Backup Slides

More than just a Wi-Fi driver for MCUs, Broadcom’s WICED SDK is a

complete development system for low-resource embedded devices

● Full featured free IDE with a sophisticated GUI and integrated debugger

● Wi-Fi features

o All SOHO security types

o Concurrent STA and softAP

o WPS Enrollee, WPS Registrar, Wi-Fi Direct

o Packet filters, WLAN keep alive

o Multiple Wi-Fi chips: BCM43362, BCM4390, BCM43341

(2.4 GHz / 5 GHz WiFi, Bluetooth & NFC)

● Wi-Fi to Bluetooth Bridge (Classic and Smart)

● Sophisticated Security Library

o SSL/TLS1.1 with crypto library API : MD5, SHA1/2, HMAC, RC4, AES, RSA, …

o WPS, Wi-Fi Direct, TLS Security, mDNS

● Hosts, systems, stacks, protocols & toolchains

o MCUs: ARM CM3/CM4 (STM32, Atmel, Freescale), MIPS (CSR/Zoran, Microchip), …

o RTOS: FreeRTOS, ThreadX, Nucleus, …

o TCP Stack: NetX, NetX Duo, LwIP, Nucleus Net

o Protocols : ARP, DHCP, TCP, UDP, ICMP, IGMP, DNS, mDNS, HTTP, SNTP, SMTP…

o Toolchains: GNU GCC, IAR

Broadcom WICED SDK

Murata SN8xxx Wi-Fi Modules Available from Avnet

SN8000 SN820x

Wi-Fi Standards 802.11bgn 802.11bgn

Wi-Fi Device Broadcom BCM43362 Broadcom BCM43362

MCU None (requires a host MCU) STM32

Host Interface SDIO (1 or 4 bit), SPI SPI, UART

Data Throughput 40Mbps/SDIO, 5+Mbps/SPI * 500kbps/UART, 4-5Mbps/SPI

Antenna Config. On-board chip ant and U.FL version On-board chip ant and U.FL version

Regulatory FCC/IC, CE compliant FCC/IC, CE compliant

Security Supplicant On-board On-board

Network Stack Host On-board

Soft AP Mode Support AP/STA dual mode,

controlled from host

Support AP/STA dual mode, automatic

controlled or by host

Software Offering WICED™ SDK Murata Software; WICED™ SDK

Certification FCC/IC certified, CE compliant FCC/IC certified, CE compliant

Dimensions 24.0 x 11.4 x 1.9 mm 30.5 x 19.4 x 2.8 mm

Firmware Notes in Context of Adding New Pmods

• This project is an adaptation of code that originally targeted Avnet’s Zedboard

• The Kinetis-K70 project was developed under CW10.5 using Processor Expert

(files generated by PEx are located in the “Generated_Code” folder of the BSP project)

• Individual components may be browsed in the BSP project but it is recommended

you not make changes to the configuration of the PEx components*

• MQX 4.1 is the RTOS used in this project.

In MQX main.c you will note 4 tasks: - Pmod_task() : invokes init timer and main_pmod()

- Led_task() : yellow LED blink (on tower cpu board)

- PmodLed_task(): orange LED on during Pmod_task active

- adc_task : blue LED blink according to value of

potentiometer R52 read back from ADC

*If changes are made to PEx components, because

there are disabled components in the project, edits will

be required to the PE_LDD.h and PE_LDD.c files after

BSP re-generation (full details available on request)

Firmware Notes in Context of Adding New Pmods

Files to be edited Comment

[all files located in Source folder]

MaximPmod.c main_pmod() top-level App that is called from MQX main().

Add case statements for new modules to switch(nMenuState)

menu.c. menu definitions and actions.

Add new items for definition of the main menu.

menu.h Constant and function declarations. Add new menu function

declarations. Increase constant for # of PERIPHERAL_MODULES

MaxFuncRedefinition.h start menu function redefinitions. New ones should be added

maximDeviceSpecificUtilities.c device specific R/W utilities

maximDeviceSpecificUtilities.h constants and register definitions. Add new #defines here

driver.c low-level function replacements for each board

Other important files Description

main.c MQX main() function, task declaration and functions

main.h include file for MQX main

C_Events.c ISR events function

def.h general purpose definitions

When adding new modules, typically only the following files require changes…

The MQX project is follows the structure of the K70 bare-metal project.

(MQX main.c file replaces Processor_Expert.c definition of main() function)