Before posting a question
When posting a question, make sure to include the following:
For general community usage please refer to the Silicon Labs Community Guidelines.
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.
I am new to Embedded Programming platform and currently stuck on an application I am working on.
I have BME680 sensor and I am taking temperature, pressure etc. measurements from it via I2C. I also wrote a timer interrupt so I can read data every two seconds and set the microcontroller to EM1 mode. Now I would like to implement a LIN Slave so I can send this sensor data to the LIN Master, whenever it requests. Since LIN protocol is similar to UART, I wanted to implement using em_usart library. For start, I have set these clocks;
CMU_ClockEnable(cmuClock_I2C0, true); CMU_ClockEnable(cmuClock_GPIO, true); CMU_ClockEnable(cmuClock_USART0, true); CMU_OscillatorEnable(cmuOsc_HFRCO,1,0); CMU_ClockEnable(cmuClock_HFPER, true);
I have defined my pins as
#define USER_RX_LOCATION 63 #define USER_TX_LOCATION 62
Then I have initialized the UART peripheral
USART_InitAsync_TypeDef initAsync = USART_INITASYNC_DEFAULT; // Initial configuration initAsync.baudrate = 115200; // Set baudrate as 115200 first (just in case) USART0->CLKDIV = USART_CLKDIV_AUTOBAUDEN; //Enable auto baud-rate detection USART_InitAsync(USART0, &initAsync); //Define pin locations USART0->ROUTEPEN |= USART_ROUTEPEN_RXPEN | USART_ROUTEPEN_TXPEN; USART0->ROUTELOC0 = (USART0->ROUTELOC0 & ~(_USART_ROUTELOC0_TXLOC_MASK | _USART_ROUTELOC0_RXLOC_MASK)) | (USER_TX_LOCATION << _USART_ROUTELOC0_TXLOC_SHIFT) | (USER_RX_LOCATION << _USART_ROUTELOC0_RXLOC_SHIFT);
I have set the auto baud-rate detection because of the SYNC byte of LIN TX. Now, I would like to write an interrupt that whenever LIN master sends a request, I would like to transmit my sensor data back to the master. And I am kinda stuck at this point. I don't know if should I write GPIO interrupt and receive data by pulling method (because LIN master first pulls the pin low and waits for 14 bits for slaves to become ready), or UART interrupt directly. Can I implement a GPIO interrupt on the PIN that I have defined as UART RX? I also don't know how to handle these interrupts as well. Any help would be appreciated. Thank you.
For LIN reference: https://www.kvaser.com/about-can/can-standards/linbus/
Libraries: EM_USART, EM_GPIO (I have just installed Simplicity Studio so I am assuming libraries are latest version)
I am an electrical engineer. I developed a device based on EFM32G880F128 D rev. This device is a water heatmeter with RS485 interface and two thermocouple sensors, connected to the device. The problem is that I got boards with MCU of revision EFM32G880F128G E and this devices has very poor immunity to ESD. By poor protection, I mean that the device reboots from a simple finger touch of the thermocouple, although it has protection in the form of a TVS diode and isolation of MCU's ground and analog ground which connected with thermocouple. And I would also think that there are problems with the circuit, but there are two boards that are absolutely identical, but with different controller revisions, and the new revision reboots. I tried to swap controllers D and E between two boards and the problem flows with a new revision (E) MCU. I've got 20 boards with EFM32G880F128G E with same poor behavior to ESD.
Tell me please, is there any problem in MCU or i should ask my distributor about quality of IC's.
After following those steps ( Requirements and How to import to Simplicity Studio IDE)
When i try to choose a suitable .slsproj file for my device BRD4161A Rev A02, i see a warning in tab import project " Selected board is not compatible with this project"
And if i choose "Next" and "Finish" continually, my project have so many error
So please tell me what i have to do to build peripheral examples.
my device ( EFR32MG12P432JG - BRD4161A Rev A02) ( i choose the "async_interrupt" ( USART) example)
I'm using the EFM32GG chip, looking in the document I see that the device has ADC calibration values for the offset and gain, saved in the device Information page..
but I couldn't find if its automatically used (meaning does the MCU load the data, and fix the ADC result by this values) , or I need to do the calculation in my firmware, and in this case - how ?
I am using EFR32XG21 development kit and i am trying to implement i2c handler for reading data from a external i2c based sensor ,I have used i2c peripheral example for i2c handling I am facing isuue in I2C_MasterWrite function in this function there is a while loop to check if the i2c transaction in progress so, my code is basically getting stucked in this while loop so could anyone help me out in this issue??
As I see, theoritically it is possible to use the capacitive sensor interface as soil moisture sensor. Or did I miss
something or some limitation on the peripheral?
I have the SLSTK3701A Starter Kit, which comes with the new EFM32GG11B820F2048 equipped.
The main thing that thrilled me about this new MCU was it's on-board SDIO Host controller. I'm interested in using a microSDXC in 4-bit SD mode purely on the binary/bit level, no FS required, and I want to integrate it in my own project using emlib etc. but without the need of Micrium OS.
The only SDIO-related source file that comes with the current version of Simplicity Studio 4 is "bsp_fs_sd_card.c" (located in "\gecko_sdk_suite\v2.0\util\micrium\Micrium_OS\bsp\template\source"), but apart from being Micrium there is quite a lot of "TODO"s in that source, so im guessing it's still work in progress?
Are there any examples / demos / application notes for my request? If not, is such a feature even planned for future SDK releases?
We are using EFM32TG11B120F128GM64 controller.
I'd like to know the way to backup to time and date in the RTCC CALENDAR MODE.
We were trying SLSTK3301A_helges_demo and we were confirming restore the count value by back up function.
That demo using NORMAL MODE on the RTCC_CTRL_CNTMODE but we'd like to use CALENDAR MODE.
So we were rivising that source to CALENDAR MODE but it cannot be backed up time and date.
Is it able to back up time and date on the CALENDAR MODE?
Would you please tell me how to solve this problem.
Thanks for your help.
I'm developing with a BGM13P22 module and I set-up RTCC in calendar mode.
RTCC uses external LFXO. In BGM13P datasheet I see that the "Overall frequency tolerance" of LFXO is about +-100ppm. This tolerance give us an error of 8 seconds per day.
Is there any way to improve accuracy of RTCC's LFXO ? Maybe changing CTUNE value ?
Just in case anyone is struggling with this as well, the documentation for the WLSTK6020B / brd4305a board (ug346-brd4305a-user-guide.pdf) contains an error in regards to the i2c lines (and possibly more errors, I only checked i2c): the pins are swapped in the documentation.
The correct configuration is:
J101, P13, SCL
J101, P12, SDA
I had trouble getting i2c to work with a brd4104a board plugged in to the brd4305a. After hooking up a scope it was apparent that the documentation was incorrect.
I have purchased the Wireless Mighty Gecko EFR32 developement kit from Element14 , I need the complete schematic of the WSTK Main Board and Radio Board ( 19dbm and 10dbm) for the reference ,can you please provide me that all .
Is there an interrupt-driven I2C example available? I am trying to modify the polled I2C driver to use interrupts for power savings. I am a bit confused on what I2C interrupt flags need to be enabled, and if I2C_Transfer( ) needs to be repeatedly invoked from the interrupt handler after the transfer has been initialized. Or can the I2C manage/feed the entire transaction in one shot and provide an interrupt when all the data buffer has been transferred?