TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE...

23
ConcertoCollege Concerto™ College Topic 8: ControlSUITE 1

Transcript of TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE...

Page 1: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

Concerto™ College

Topic 8: ControlSUITE

1

Page 2: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College 2

F28M35x – First Series in Concerto

F28M35x ARM Cortex-M3 for Master TI C28xFPU for Control 75/150, 100/100, 60/60 MHz Options 1024 / 512 KB Flash 136 / 72 KB RAM ECC and Parity Memories Additional Safety & Security Functional Safety Documentation 144-pin PowerPad QFP Automotive Qualified Packages

Markets: Advanced Metering, Automotive EPS, Motion Control & Drives, UPS, Renewable Energy, Power & Protection, Medical Process Control, Smart Sensors

ARM Cortex-M3 Secure ECC Flash / RAM

Parity RAM ROM

Communication Peripherals

C28x FPU + Accelerators Secure ECC Flash / RAM

Parity RAM ROM

Real-Time Control

Peripherals

Shared API for CPU to CPU Message Parity RAM

Parity RAM

Shared Analog, Power

& Clocking

Page 3: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

Overview •  ControlSUITE refresher

•  Control sub-system software

•  Master sub-system software –  Register Access –  Communications Libraries

•  USB •  Ethernet

Page 4: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE Refresher

…more like ControlSWEET!

Page 5: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE •  Comprehensive software suite which enables easy development across all

C2000 devices

–  Consists of : •  Header Files / Linker Command Files •  Special Function Libraries •  Peripheral Drivers •  Examples

5

Page 6: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE Header Files

•  Header files in conjunction with a linker command file allows easy access to individual bits in any register on the device –  Header files are stored in :

•  <ControlSUITE Dir>/device_support/<Device Variant>/<Library Version>/<Device Variant>_headers/include

–  Associated Linker Command File stored in : •  <ControlSUITE Dir>/device_support/<Device Variant>/<Library

Version>/<Device Variant>_headers/cmd •  Access is as easy as

–  SysCtrlRegs.PCLKCR0.bit.MCBSPENCLK = 1; //Turn on clock to McBSP –  my_uint16_t = SysCtrlRegs.PCLKCR0.all; //Copy PCLKCR0 into my_uint16_t

6

Page 7: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE Special Function Libraries •  ControlSUITE provides specialized libraries that are optimized by TI experts to

run efficiently on C2000 hardware.

–  IQ Math – floating point emulation in fixed point hardware –  Digital Power Library – routines for control of switching power supplies –  Digital Motor Control Library – routines for control of a plethora motors

•  Additional libraries exist, but these three are the most widely used

–  Libraries can typically be found in <ControlSUITE Dir>/libs/<Library Type>/<Library Name>

7

Page 8: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE Peripheral Drivers •  ControlSUITE provides peripheral drivers for some of the devices’ more

advanced peripherals –  SFO Library for High Resolution PWM –  DMA –  PIE –  etc.

•  Drivers can be found in <ControlSUITE Dir>/device_support/<Device Variant>/<Library Version>/<Device Variant>_common/source

8

Page 9: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE Examples •  ControlSUITE contains an extensive collection of examples for every device

•  Peripheral Examples can be found in –  <ControlSUITE Dir>/device_support/<Device Variant>/<Library Version>/<Device

Variant>_examples/

•  Development Kit Examples can be found in –  <ControlSUITE Dir>/development_kits/

9

Page 10: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

10

ControlSUITE & the Control Subsystem

Ana

log Master

Control

f(z)

System

Page 11: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE & Control Sub-System •  Those familiar with ControlSUITE on previous C2000 devices will find

themselves at home in ControlSUITE on Concerto class devices

•  Register access is identical to previous devices in the C2000 family

•  Function Libraries and Peripheral drivers are largely the same as previous devices with the exception of new peripherals such as: –  Interprocessor Communications (IPC)

•  Covered in previous Concerto College session –  Viterbi, Complex Math, and CRC Unit (VCU)

11

Page 12: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE VCU Support •  Viterbi, Complex Math, CRC Unit (VCU) adds significant processing

power to the Control Subsystem

–  New Library Supports •  Real and Complex FFT Butterfly •  8, 16, 32 bit Single Cycle/Byte CRC •  Two Cycle Viterbi Butterfly

–  Easy to use API

–  Excellent Documentation

12

Page 13: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

13

ControlSUITE & the Master Subsystem

Ana

log Master

Control

f(z)

System

Page 14: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE & Master Sub-System

14

•  ControlSUITE’s Master Sub-System software is very similar to Stellaris’s software bundle –  Differences include but are not limited to:

•  System Control •  CAN •  IPC

•  Master Sub-System software can be found in: –  <ControlSUITE Dir>/device_support/<Device Variant>/<Library

Version>/MWare/

Page 15: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE & Master Sub-System

15

•  ControlSUITE takes a different approach to register access on the Master Sub-System –  Registers are accessed using Stellaris style macros

•  HWREG(Peripheral_Base_Addr + Peripheral_Reg_Offset) = 0x00B00B50;

•  my_uint16_t = HWREGH(Peripheral_Base_Addr + Peripheral_Reg_Offset);

–  Peripheral Base Address Defines can be found in: •  <MWare Dir>/inc/hw_memmap.h

–  Register Bit field definitions can be found in: •  <MWare Dir>/inc/hw_<peripheral>.h

Page 16: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE & Master Sub-System •  ControlSUITE also includes drivers for all of the master sub-system

peripherals: –  EPI –  I2C –  SSI –  UART –  CAN –  USB –  Ethernet –  Etc.

•  Many but not all of the APIs in the driver library are compatible between Stellaris and Concerto

16

Page 17: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE & Communications

17

•  Concerto Class devices bring new peripherals to the C2000 family –  USB – Full/Low Speed On-The-Go Capable USB Controller and PHY

–  Ethernet – 10/100Base-T Full Duplex Capable MAC •  Note: External PHY required for operation

•  ControlSUITE brings the software solutions necessary to make customer use of these complex peripherals easy!

Page 18: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE & USB •  Software solution for USB consists of three pieces

–  Application Code (user provided or TI provided example) –  Protocol Stack (provided by TI)

•  Found in <MWare>/usblib –  Driver Library (provided by TI)

•  Found in <MWare>/driverlib/usb.c

•  Many ways to use the software –  Experts can interface directly with

hardware drivers –  Novices can tweak TI supplied

examples

18

Page 19: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE & USB •  TI Provided Device Examples

–  usb_dev_bulk – Transfers strings across bulk endpoints •  Good example to learn host side driver software

–  usb_dev_keyboard/usb_dev_mouse – Emulates common HID interfaces •  Good potential for pranks with colleagues…

–  usb_dev_msc – Presents file system on SPI connected SD card to host PC

–  usb_dev_serial – Bridges UART0 with Virtual COM port on host PC •  Just like an FTDI chip

19

Page 20: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE & USB •  TI Provided Host Examples

–  usb_host_keyboard/usb_host_mouse – Read common HID devices

–  usb_host_msc – Read/Write access to connected USB flash drive

–  USB Flash drive based bootloader to be released soon!

20

Page 21: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE & Ethernet •  Software solution for Ethernet consists of three pieces

–  Application Code (user provided or TI provided example) •  Found in <Mware>/examples

–  Protocol Stack •  TI recommends the use of open source stacks like lwIP or µIP •  Found in <MWare>/third_party/<stack name>

–  Driver Library (provided by TI) •  Found in <MWare>/driverlib/ethernet.c

21

Page 22: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

ControlSUITE & Ethernet •  TI provided Ethernet examples

–  enet_io – Serves page that allow control of functions on an eval board •  Advanced example that demonstrates how to interact with the protocol

stack

–  enet_lwip – Basic webserver using lwIP •  Serves file system from SPI connected SD card

–  enet_ptpd – Basic webserver using lwIP with PTP (IEEE 1588) enabled

–  enet_uip – Basic webserver using uIP

22

Page 23: TI Concerto College Topic 08 ControlSUITE v01 · 2011. 7. 2. · Concerto™ College ControlSUITE • Comprehensive software suite which enables easy development across all C2000

Concerto™ College

Next Concerto™ College Session Syllabus

1.  Overview 2.  System: Boot, Clocking, Power, GPIO 3.  Host Sub-System 4.  Control Sub-System 5.  Analog 6.  Inter-Processor Communications (IPC) 7.  Safety 8.  Software 9.  IDE, Emulation, Debug 10.  Operating Systems 11.  Ecosystem