open MMC A modular open source firmware for

  • Slides: 18
Download presentation
open. MMC A modular open source firmware for MMCs 10 th meeting of the

open. MMC A modular open source firmware for MMCs 10 th meeting of the x. TCA interest group Henrique Aires Silva Brazillian Synchrotron Light Source (LNLS/Sirius)

2 10/03/2016 Outline § The MMC in a u. TCA system § Existing Implementations

2 10/03/2016 Outline § The MMC in a u. TCA system § Existing Implementations § Why a new design? § open. MMC Firmware Features q Structure q § Porting Example § Integration Tests § Future Developments 10 th meeting of the x. TCA interest group

3 10/03/2016 The MMC in a u. TCA system +12 V RTM Front Panel

3 10/03/2016 The MMC in a u. TCA system +12 V RTM Front Panel Enable +3, 3 V. . . Hotswap DCDC Converters +1, 8 V Payload +1, 0 V Current/Voltage Sensors MMC FRU Temperature Sensors SDR User Flash AMC Connector IPMB - SPI JTAG - I 2 C - GPIO - Power 10 th meeting of the x. TCA interest group

4 10/03/2016 Existing Implementations DESY MMC University of Winsconsin • ATMega 128 • AT

4 10/03/2016 Existing Implementations DESY MMC University of Winsconsin • ATMega 128 • AT 32 UC 3 A 1512 CERN MMC Warsaw University of Technology • ATMega 128 • LPC 1764 N. A. T. Europe COSYLAB • ATMega 128 • LPC 2136 core. IPM JAMMCI (GSI) • LPC 2 xxx • Cypress nv. PSo. C • LPC 1764 • MATPEX 1 A • ATMega 128 10 th meeting of the x. TCA interest group

5 10/03/2016 Why a new design? § Difficult maintenance with spread forks § Incompatibility

5 10/03/2016 Why a new design? § Difficult maintenance with spread forks § Incompatibility between the MMC and MCHs from different vendors § Hard to port the code to different boards/controllers Ø Microcontroller specific code mixed with application routines Ø IDE-dependent compilation/debug 10 th meeting of the x. TCA interest group

6 10/03/2016 Open. MMC

6 10/03/2016 Open. MMC

7 10/03/2016 Features § Open Source – GPLv 3 (All code hosted at Git.

7 10/03/2016 Features § Open Source – GPLv 3 (All code hosted at Git. Hub) § Modular structure q q § § Chip specific code separated from application Independent modules CMake build system All board ports in the main repository HPM. 1 Doxygen documentation (in progress) *Initial collaboration between LNLS (Brazil) and GSI (Germany) 10 th meeting of the x. TCA interest group

8 10/03/2016 Free. RTOS § Multitasking q Preemptive scheduler § Inter-task communication q q

8 10/03/2016 Free. RTOS § Multitasking q Preemptive scheduler § Inter-task communication q q Queues Binary and counting semaphores Recursive mutexes Task notifications § 6 K to 12 K ROM footprint § Numerous ports ( > 100 ) § All maintaned and supported by Real Time Engineers! 10 th meeting of the x. TCA interest group

9 10/03/2016 Code Structure Application (Tasks) RTM Sensors Payload HAL I 2 C Drivers

9 10/03/2016 Code Structure Application (Tasks) RTM Sensors Payload HAL I 2 C Drivers SPI LPCOpen LEDs CMSIS IPMB 10 th meeting of the x. TCA interest group Atmel ASF

10 10/03/2016 Code Structure Modules Current/Voltage Sensors Temperature IPMI Hotswap LEDs Clock Switch. .

10 10/03/2016 Code Structure Modules Current/Voltage Sensors Temperature IPMI Hotswap LEDs Clock Switch. . . NXP LPC 17 xx (ATMEL) (ATMEGA 128) Port u. Controller Payload AFC User FRU Timing AMC Pin Mapping Board 10 th meeting of the x. TCA interest group Custom board modules

11 10/03/2016 Code Structure Application – Custom task Port layer – Interface between driver

11 10/03/2016 Code Structure Application – Custom task Port layer – Interface between driver and application Drivers – Custom hardware control ATMEL ASF 10 th meeting of the x. TCA interest group

12 10/03/2016 Code Structure Application – Custom task Port layer – Interface between driver

12 10/03/2016 Code Structure Application – Custom task Port layer – Interface between driver and application. . . Drivers – Custom hardware control LPCOpen 10 th meeting of the x. TCA interest group

13 10/03/2016 Porting Example Different boards AFC Timing. AMC 10 th meeting of the

13 10/03/2016 Porting Example Different boards AFC Timing. AMC 10 th meeting of the x. TCA interest group

14 10/03/2016 Porting Example Driver function aliasing • Driver functions • Free. RTOS port

14 10/03/2016 Porting Example Driver function aliasing • Driver functions • Free. RTOS port for the controller Free. RTOS port Module • Develop new managing / monitoring tasks • Define which modules will be used Chip Board 10 th meeting of the x. TCA interest group

15 10/03/2016 Integration tests Fully functional! NAT-MCH-PHYS Mostly functional (Few bugs on FRU shutdown)

15 10/03/2016 Integration tests Fully functional! NAT-MCH-PHYS Mostly functional (Few bugs on FRU shutdown) UTC 002 Q 3/2016 (Planned) *All tests with AFC boards 10 th meeting of the x. TCA interest group

16 10/03/2016 Future developments üBootloader upgrade • Integrate HPM module üCode documentation • 06/2016

16 10/03/2016 Future developments üBootloader upgrade • Integrate HPM module üCode documentation • 06/2016 üDetailed wiki page on Git. Hub 10 th meeting of the x. TCA interest group

17 10/03/2016 Try out! ØAlready ported to ATMega and LPC 17 families ØEasy to

17 10/03/2016 Try out! ØAlready ported to ATMega and LPC 17 families ØEasy to customize ØLarge set of tools provided by Free. RTOS to ease development ØExpand the project to other boards and controllers ØEncourage collaboration § Open to pull-requests! open. MMC repository https: //github. com/lnls-dig/openmmc/ 10 th meeting of the x. TCA interest group

18 10/03/2016 Thank you! Henrique Aires Silva henrique. silva@lnls. br open. MMC repository https:

18 10/03/2016 Thank you! Henrique Aires Silva henrique. silva@lnls. br open. MMC repository https: //github. com/lnls-dig/openmmc/ Critics and suggestions are more than welcome! Brazillian Synchrotron Light Source (LNLS/Sirius) 10 th meeting of the x. TCA interest group