We've been working here to create a few more examples for EFM32/EFR32 devices that show basic examples of how to operate the device's peripherals. If you're familiar with our EFM8/C8051 examples, this is a similar setup. Basically, each peripheral (adc, gpio, i2c, etc) has a set of bare-bones examples that demonstrate some operation mode of the peripheral. Not all peripherals or modes are currently covered, but we will be adding more in the future.
The repo can be found here: https://github.com/SiliconLabs/peripheral_examples
Edit 8/27/18: We've pushed a ton of new examples - check it out!
Edit 3/12/19: We are migrating our discussion, questions, and bug reports for the 32-bit peripheral examples to the Issues section of the Github repository. This will allow us to track bugs and feature requests more easily.
Edit 5/24/2019: We've added Series 2 examples, as well as cleaned up the repo structure.
- Add examples for EFR32xG22 Wireless SoC - Migrate AN0012 GPIO examples for series0, series1, and series2 to the peripheral_examples repo (previously not version controlled)
Hi I'm trying to use pulse_width_modulation_dma on an EFM32PG1B200F256GM48. When I include the necessary em_dma.c file in /emlib, the files does not get compiled because DMA_PRESENT is not defined.
In the EFM32 reference manual it mentions a DMA controller so why is DMA_PRESENT not defined? If DMA is not useable on this EFM32 model. Where are some references to set up PWM?
please add an example how to use the simulated eeprom.
Silabs has dedicated application note an0019 that cover eeprom simulation.
I didn't find SPI in the package ? Is there an example for spi ?
Thank you very much,
SPI functionality is implemented within the USART peripheral. Check out the SPI Master and Slave examples here: https://github.com/SiliconLabs/peripheral_examples/tree/public/usart
Can you put some examples for adc in EFM32GG1B820F2048 mcu specially the part where one needs to configure the APORT. THe APort configuration is not very clear in the datasheet or the reference manual.
We are working on creating EFM32GG11 examples. For now, APORT configuration will be just like other EFM32 Series 1 devices such as EFM32PG12. In general, use this process for APORT selection/configuration:
Step 1: Look at the APORT map in the datasheet for the desired peripheral. For example, on EFM32PG12, to find the APORT channel corresponding to pin PC9 as an ADC input, look at the ADC APORT map in the datasheet:
As you can see, PC9 is connected to the ADC via APORT1Y CH9. It is also connected to the ADC via APORT2X CH9.
Step 2: In firmware, select the APORT channel using the peripheral's init struct. Using the EFM32PG12 ADC as an example again, here is the code:
ADC_InitSingle_TypeDef initSingle = ADC_INITSINGLE_DEFAULT; // Select PC9 as ADC input initSingle.posSel = adcPosSelAPORT1YCH9;