- Silicon Labs Community
- Welcome and Announcements
- Silicon Labs Knowledge Base
- 8-bit MCU
- 32-bit MCU
- Bluetooth / Wi-Fi
- Other Products Category
- Optical/RH/Temp Sensor
- Other Products
- Hardware and Software Tools
- Simplicity Studio and Software
- General Discussions and Suggestions
- Chinese Forum
- Software Libraries
- Development Kits
- Reference Designs
- Third Party Tools
- White Papers
- Official Blog of Silicon Labs
- Chinese Blog
04-24-2015 02:31 PM - last edited on 11-26-2015 07:28 AM by Siliconlabs
I’m a new college grad working for Silicon Labs, and I’m currently rotating through each business unit to get a holistic understanding of our product line. I recently completed my rotation through the Microcontroller group, where I was tasked to write a temperature data logger for Busy Bee, part of the new line of EFM8 MCUs. The goal of the project was to compare temperature data collected from the temperature internal to the Busy Bee against the Si7013 temperature sensor on the Sensor EXP board, and to display the data on the on board LCD.
I had some previous experience developing with Silicon Labs’ EFM32 MCUs from my internship with Silicon Labs and from my senior design project in school, but minimal exposure to Silicon Labs’ 8 bit MCUs. Developing on EFM32 was a mostly painless process, as I was able to make high level function calls using emlib, Silicon Labs’ complete C function library used to manage peripherals and core functions, as opposed to writing code at a register level.
Since I had never developed with EFM8, I started where any newbie would look and opened some sample code. I found sample data logger code for Sleepy Bee, which logs temperature data from the on board Si7021 temperature sensor. My project called to collect temperature data from Busy Bee, so I figured I would use the Sleepy Bee data logger project as a starting point, and then port the project over to Busy Bee.
Fortunately for me, I learned that the Silicon Labs' MCU Applications team had recently developed a C function library similar to the EFM32 emlib. The Peripheral Driver Library (PDL) is an open source library for EFM8 that allows a developer to make high level function calls in a similar manner to emlib. This allows developers to spend their efforts on things that provide differentiation for their system by providing production-quality libraries to handle the things that don’t provide differentiation, like standard data transfers. The PDL provides further benefit (specifically useful to my project) in that it adds software compatibility across the EFM8 family.
For me, the software compatibility provided by the PDL for EFM8 meant that I could easily port my project from Sleepy Bee to Busy Bee! I could make the same high level function calls on both the Sleepy Bee and Busy Bee. Specifically the PDL allowed me to recycle the same I2C function calls to collect temperature data, and the same SPI function calls to send the temperature data to the LCD. After I had the desired functionality for the data logger on Sleepy Bee, all I had to do was create a new project for Busy Bee, copy over my source files, enable peripheral drivers for I2C and SPI, and verify my settings in the hardware configurator were correct (I had to reroute I2C pins to the Si7013 on the Sensor EXP board).
The Peripheral Driver Library saved me a lot of headaches by providing an extra abstraction layer for firmware development, and by allowing me to make cross platform, high level function calls to manage data transfers instead of messing around at the register level.
I've included some slides in the attached .pdf to give a pictorial summary of what I accomplished.
04-24-2015 02:39 PM
Thanks the PDL has receieved many positive comments on the forum and from customers. The libraries are very small and efficient so they don't take a lot of flash or other device resources. Thank you for sharing your experience.