• No results found

Applications Development on the ARM Cortex -M0+ Free On-line Development Tools Presented by William Antunes

N/A
N/A
Protected

Academic year: 2021

Share "Applications Development on the ARM Cortex -M0+ Free On-line Development Tools Presented by William Antunes"

Copied!
69
0
0

Loading.... (view fulltext now)

Full text

(1)

Applications Development on the ARM® Cortex™-M0+

Free On-line Development Tools

Presented by William Antunes

(2)

Agenda

– Cortex M0+ architecture – Introduction to Kinetis L – Freedom board

– Arrow Cloud Connect

– Internet of Things introduction – iDigi cloud services overview – First IoT application

– Customer dashboard development

2

(3)

ARM® Cortex™-M0+

3

Reasons to migrate to 32-bit core?

“I need more performance.”

“I need more connectivity”

“I need more memory”

Reasons not to migrate to 32-bit core?

“I need low power”

“I need low cost”

The Cortex-M0+ was designed to provide all the

benefits of a 32-bit core at 8-bit/16-bit power and cost.

(4)

ARM® Cortex™ M0+

(5)

ARM® Cortex™-M0+ Bus Architecture

5

(6)

ARM® Cortex™-M0+ Low Latency I/O Interface

6

I/O Interface provides “Harvard- like” access to peripherals

Improves overall cycle efficiency for I/O access

(7)

ARM® Cortex™-M0+ Performance

7

Pipeline

Cortex-M4 3

Harvard

ISA Thumb-2

DMIPS/MHz 1.25

MPU Optional

Bus Arch.

ARM7

3

Arm/Thumb 0.95/0.70

No

Von Neumann

Cortex-M0

Von Neumann Thumb(wT2)

0.84 No

3

Cortex-M0+

Von Neumann Thumb(wT2)

0.93 Optional

2

Interrupts 2 1 - 240 1-32 1-32

Area 0.34 mm2 0.17 mm2 0.04 mm2 0.04 mm2

Power 70µW/MHz 33 µW/MHz 16 µW/MHz 11 µW/MHz

(8)

ARM® Cortex™-M0+

8

So what does this really mean for 8 and 16-bit cores?

(9)

ARM Cortex-M0+ Memory Map

9

No paging, swapping, or instruction set extensions common in 8 & 16 bit architectures

32-bit registers means 4GB address space

(10)

ARM Cortex-M0+ Instruction Efficiency

10

This means better memory usage and fewer clock cycles 32-bit means instruction

set efficiency

(11)

ARM Cortex-M0+ vs common 8/16 bit cores

11

(12)

ARM Cortex-M0+ Summary

12

Shorter pipeline optimized for energy efficiency

Fetch Decode Execute code

Exe Fetch De

More Options

New Fast I/O Port Micro Trace Buffer (MTB) Re-locatable Vector Table Memory Protection Unit (MPU)

From Cortex-M3

Full ARMv6-M compatible

More for less

(13)

Freescale Kinetis L

(14)

Kinetis Portfolio

(15)

Kinetis K-Series to Kinetis L-Series Migration

(16)

Kinetis L Superset Block Diagram

(17)

Kinetis L Bit Manipulation Engine

Peripherals Core Accesses BME

Bit Manipulation Engine (BME)

Decorated Stores

AND, OR, XOR and Bit field insert (BFI)

Decorated Loads

Load and clear one bit (LAC1), Load and Set one bit (LAS1), Unsigned bit field extract (UBFX)

Task Normal C Code

Size BME Code Size Improvement Logical XOR operation 12Bytes 6Bytes 50%

GPIOA_PDOR ^= 0x02; // Logical XOR 0000005E 0x.... LDR R0,??

DataTable6_5 ;; 0x400ff000

00000060 0x6800 LDR R0,[R0, #+0]

00000062 0x2102 MOVS R1,#+2 00000064 0x4041 EORS R1,R1,R0 00000066 0x.... LDR R0,??

DataTable6_5 ;; 0x400ff000

00000068 0x6001 STR R1,[R0, #+0]

Uses 12 Bytes

// Macro used to generate hardcoded XOR address

#define BME_XOR_ADDR(ADDR) (*(volatile uint32_t *) (((uint32_t)ADDR) | (3<<26)))

BME_XOR_ADDR(&GPIOA_PDOR) = 0x02;

00000014 0x.... LDR R0,??

DataTable6_6 ;; 0x4c0ff000

00000016 0x2102 MOVS R1,#+2

00000018 0x6001 STR R1,[R0, #+0]

Uses 6 Bytes

(18)

Freedom Board

(19)

Freedom Board Overview

19

http://arw.io/37Ux

(20)

OpenSDA – Serial Debug Adapter

20

OpenSDA Circuit

(21)

GPIO

OpenSDA – Serial Debug Adapter

21

K20

Kinetis-L

SWD UART0 Reset D4

USB Host

OpenSDA

GPIO

USB

UART

SPI

MSD Bootloader

OpenSDA Application

SW1

(22)

Lab 0 – Loading OpenSDA Applications

22

Verify OpenSDA Application 0 Unplug USB Cable if attached

1 Press and hold the reset button(SW1)

2 Plug in USB cable to the OpenSDA USB connector labeled “SDA”

3 Release the reset button

4 Open the removable drive labeled

“BOOTLOADER”

Load OpenSDA Application

5 Double click on the file fsl_web.htm

6 Download and unzip the FRDM-KL25Z Quick Start Package

7 Copy and Paste

MSD-FRDM-KL25Z_Pemicro_v105.SDA to the “BOOTLOADER” removable drive

8

Unplug USB Cable and plug in again to the same USB connecter labeled

“SDA”. This time do not press the reset button.

9 You are now running the latest version of the OpenSDA MSD Application

This same basic procedure can be repeated to load other OpenSDA applications

(23)

Lab 0 – Loading OpenSDA Applications

23

Verify Current OpenSDA Application

10 Open the removable drive labeled FRDM-KL25Z

11 Double click on the file SDA_INFO.HTM

12 Allow to run blocked script if prompted

13 Web page will display OpenSDA application

(24)

Power Options

24

5 V

5 V

P5- 9V_VI N P

3 V

3 CR

203 2

(25)

Using the Freedom Board as a debugger?

25

(26)

Power Profiling

26

IJET-ARM

arw.io/37V0

(27)

Expansion Headers and Shields

27

D1 D0 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 GND AREF D14 D15

A5 A4 A3 A2 A1 A0 P5-9V_VIN GND GND P5V_USB P3V 3 RESET

P3V 3 SDA_PTD 5

The outer rows of expansion pins are compatible with many shields on the market

(28)

Tri-Color LED

28

(29)

Tri-Color LED

29

CLV1A-FKB-CJ1M1F1BB7R4S3

Series &

Options Binning

Kinetis-L

LED

Cree and the Cree logo are registered trademarks of Cree, Inc.

PTB18 PTB19 PTD1(D13) R

G B

http://arw.io/37Uv

(30)

Capacitive Touch Slider

30

Kinetis-L

TSI0_CH09

TSI0_CH10

(31)

SPI FLASH Memory

31

Kinetis-L OpenSDA

SPI

Flash

(32)

MMA8451Q Accelerometer

32

3-Axis 14-bit/8-bit Digital Accelerometer

Kinetis-L MMA8451Q

I2C0

INT1 INT2

PTA14 PTA15 I2C

http://arw.io/37Uw

(33)

Introducing Arrow Cloud Connect

(34)

Lab 1 – My first Arrow Cloud Connect Project

34

0 Browse to arrow.transim.com/designweb

(35)

Lab 1 – My first Arrow Cloud Connect Project

35

1 Use Design Web to start to Arrow Cloud Connect

arrow.transim.com/arrowcloudconnect

(36)

Lab 1 – My first Arrow Cloud Connect Project

36

2 Click the “Getting Started” icon from the tool bar

3 Register for your free account

(37)

Knowledge Base

37

(38)

Discussion Forums

38

(39)

Code Library

39

(40)

Accounts

40

(41)

Integrated Development Environment

41

(42)

42

Cont’d 4

5

6 Build Application

7 Save .s19 file to FRDM-LK25Z removable drive*

Click the “IDE/Compiler” icon from the toolbar

Lab 1 – My first Arrow Cloud Connect Project

8 If successful, the tri-color LED should be flashing in sequence

(43)

The Internet of (many) Things

(44)

44

Internet

So how big is the Internet of Things?

What is the Internet of Things(IoT)?

(45)

Billions and Billions and Billions!

So how does the Internet of Things actually work?

(46)

46

Internet

Ubiquitous device networks will require low cost and low power solutions

How to connect to the Internet?

Device Gateway

(47)

47

Internet

How are we going to connect today?

?

(48)

Lab 2 – Install Serial Driver

48

0

1 Open “Device Manger” and locate the

“PEMicro/Freescale – CDC Serial Port” device

2 Right click on “PEMicro/Freescale – CDC Serial Port” device and select “Update Driver Software” *

Plug in USB cable to the OpenSDA USB connector labeled “SDA”

3 Choose to locate and install driver software manually.

4 Browse and select “FRDM-KL25Z” has the drive location for search.

5 When driver installation is complete you should see a device

entry corresponding to the Freedom board serial port

(49)

49

Internet

What are we going to do with the data?

?

(50)

50

Internet

Client Server?

?

This is not a very scalable IoT application architecture

(51)

51

Internet

Set up a server?

?

How about “Cloud Computing”

(52)

52

Internet

What is Cloud Computing?

?

(53)

53

Cloud Computing Stack

Cloud Computing Stack

Application as a Service (AaaS)

Infrastructure as a Service

(IaaS)

Platform as a Service (PaaS)

Cellular Wired Satellite

Servers

Storage

Data Center

Network Operations Google App Engine

Arrow Cloud Connect

(54)

54

Internet of Things Stack

IoT Stack

Application as a Service (AaaS)

Device Network Platform as a Service

(PaaS)

Arrow Cloud Connect

Infrastructure as a Service

(IaaS)

Thing Device Gateway

Wireless Network

Connect Core i.MX53

(55)

55

Internet of Things with Arrow Cloud Connect

(56)

Lab 3 – Get Started with the iDigi Device Cloud

56

0

1

2

Select the “Make a Thing for the Internet” Wizard Click the “Getting Started” icon from the tool bar

IMPORTANT: The iDigi registration process will send you a confirmation email to validate your account. Make sure you use an email address that you have access to right now!

If you already have an iDigi account you may skip this step.

(57)

57

3

4

5

Save to a readily available location on your computer

Install the iDigi Software Gateway and run

Lab 3 – Get Started with the iDigi Device Cloud

(58)

58

6

7

8

Log In to iDigi Software Gateway using iDigi account credentials

Verify that the iDigi Software Gateway is detected

Download and program application to Freedom Board(right-click, save as…)

Lab 3 – Get Started with the iDigi Device Cloud

(59)

59

9

10

Add device to iDigi Software Gateway

Select COM port of Freedom board and provide a descriptive name

Lab 3 – Get Started with the iDigi Device Cloud

(60)

60

11 Freedom board will Identify and Connect.

Verify that Freedom Board is detected

You may have to press reset button

12

13 You are now ready to create your IoT Application. Click to Go to the IDE.

Lab 3 – Get Started with the iDigi Device Cloud

(61)

Arrow Cloud Connect Dashboard Editor

61

(62)

Lab 4 – My First IoT Application

62

0

1

Click the “IDE/Compiler” icon from the toolbar

2 Build Application

3 Save .s19 file to FRDM-LK25Z removable drive*

(63)

Lab 4 – My First IoT Application

63

4

5 Configure Dashboard Devices

If successful, you should see messages from the Freedom

Board displayed in the iDigi Software Gateway Message Log

(64)

Lab 4 – My First IoT Application

64

6

7 Name Dashboard

Build Dashboard(right click)

(65)

Lab 4 – My First IoT Application

65

8

9 Show the compiled Dashboard

Click on “Dashboards” icon on the toolbar

(66)

Lab 4 – My First IoT Application

66

10 Congratulations! Your first iDigi IoT device application is now on the air

(67)

Summary

(68)

Arrow Cloud Connect Summary

Enabling the Internet of Things

– Comprehensive end-to-end development platform

– Online GNU GCC compiler for Cortex M0+

– Dashboards tools

– Code libraries for rapid development

– Collaboration tools for development efficiency – Hassle free activation

68

www.arrow.com/arrowcloudconnect

(69)

Questions?

[email protected]

References

Related documents

• USB Port, USB Cable, Installed drivers for D.O.Tec Update Bridge and the D.O.TEC Remote Port and installed D.O.Update (see also “D.O.TEC USB Serial.. Driver Installation Guide”

You can view videos and photos on your computer using the USB cable included with your device. 1 Plug the small end of the USB cable into the port on the

Plug in the Android device with USB cable (connect to the USB port of power cable). Tap &#34;Allow&#34; on the

Hardware Installation (continued) PORT 1 PORT 2 PORT 3 ROOT PORT PORT 4 Software Installation Figure-2 USB-A connector Figure-3 USB-B connector.. Information

1) Check if the USB cable is plugged in correctly and the green/red LED on the USB connector flashes when plugged in. 2) The USB cable needs to install driver software when used

Repeat Steps 4 through 8 by right clicking the item labeled “Sabrent USB Serial Port” and selecting the “Update Driver Software” menu item.. Once completed, an item

These include family child care homes, child care centers, Montessori schools, Head Start, kindergartens, school-age child care programs, parent cooperatives, laboratory

To address the issue this study proposes a fingerprint automatic attendance system which automates the whole process of taking attendance and calculation of the 5% marks of the