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!
The datasheets for EFM32 and EFR32 parts list the flash data retention as 10 years. I'd like to use these parts in an application needing a 20 year operation and was wondering if there is any way to increase this lifetime. Would refreshing the entire flash memory periodically by writing the exact same value to each memory location that is currently there work? Or would I need to first erase each page and then re-write the data? Or does neither approach work?
Also, if the temperature is never more than 50 C, does the flash data retention lifetime increase dramatically?
I like to place some byte in the 128bytes ram retention area.
I see they are located in RTCC block.
But how can i read / write these.I am using BGM113.
Is there any example code with use of ram retention.
I have installed simplicity studio version 4. I am working on EFM32GG STK3700 Starter kit and have given power supply through USB debug cable.
when i try to debug example code it shows that target power is low(0.66V) and target device is not detected.What should i do now?
I'm using the demo board BRD4001A (EFR32 Starter Kit) with the radio board BRD4253A (Flex Gecko EFR32FG12P433F1024GL125).
For my application, I need to completely disable the Retarget Serial Port, because I need to use the UART0 as I2S.
First of all, I tryed to disable manually the VCOM_ENABLE (GPIO PA5), then I made a total configuration of USART0 (see "usart_drv.c" and "usart_drv.h" files).
The compiler finds another definition of "USART0_RX_IRQHandler" and other errors due to the multiple definition of variables and #DEFINEs that concern the USART0.
I need to disable completely the Retarget functionality from Simplicity Studio (maybe in HAL_config) , so I can use the USART0 manually as I done with the other USARTs.
How can I do it? Thank you in advance!
I am working on a project using the EFM32HG309F64 MCU on a custom PCB. We are using the BRD4001A (rev A01) Wireless starter kit main board as a J-link debugger connected to the MCU via the SWD pins.
We need to implement a USB bootloader for our project, and have tried to flash the MCU using the binary file provided in AN0042 (bl-usartusb-happy-v2.06.hex), but the MCU is not recognized as a CDC USB device when connected (on a windows 10 computer). We flashed the MCU through the flash programmer in simplicity studio, and made sure to pull DBG_SWCLK high when resetting the MCU, but this does not seem to work. Using a USB capture software, we find the following packets upon booting the MCU:
We have also attempted to compile the bootloader project in simplicity studio from source (using the SS project provided in a zipped folder here: https://www.silabs.com/community/mcu/32-bit/forum.topic.html/modifying_uart_bootl-bKRw (attached here), and with the GNU ARM v7.2.1 toolchain) but there seems to be a code size issue. When building, the linker outputs the following:
Invoking: GNU ARM C Linker arm-none-eabi-gcc -mcpu=cortex-m0plus -mthumb -T "HG_USB_bootld.ld" -nodefaultlibs -Xlinker --gc-sections -Xlinker -Map="HG_USB_bootld.map" -lm -lgcc -lc -o HG_USB_bootld.axf "./usb/em_usbd.o" "./usb/em_usbdch9.o" "./usb/em_usbdep.o" "./usb/em_usbdint.o" "./usb/em_usbhal.o" "./usb/em_usbtimer.o" "./src/autobaud.o" "./src/boot.o" "./src/bootldio.o" "./src/cdc.o" "./src/crc.o" "./src/flash.o" "./src/main.o" "./src/retargetdebug.o" "./src/xmodem.o" "./CMSIS/startup_efm32hg.o" -Wl,--start-group -lgcc -lc -lnosys -Wl,--end-group c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/7.2_2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: HG_USB_bootld.axf section `.bss' will not fit in region `RAM' c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/7.2_2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: region RAM overflowed with stack c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/7.2_2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 356 bytes
We have no need for the destructive upload functionality provided by the bootloader, so if there is a easy way to reduce the amount of code running on the RAM by removing this option perhaps this could be a solution?
Any assistance that can help us past this hurdle would be much appreciated.
We are making a new custom board using EF332GG11B820F2048GL192. We would like to know if some people have already change the UART configuration of the bootloader.
Can the bootloader be reprogrammed in order to use another UART or even an USART instead of the default UART to flash the application?
I have 3 hall effect sensors placed at 120 degree angles. By these sensors, I will count pulses induced by a rotating magnet above the sensors. How can I design the circuit with minimum current? How can I use lesense? My MCU is EFM32LG880F256G. In the picture, U1, U2, U3 is my hall effect sensors.
PC prompt "can't recognize the device" when I plug the Device to PC(window 7) via USB.
Issue is encountered before enumerating the device by software.
The code refers to EFM32GG_DK3750/usbdmicrophone.
as a follow up to this question: https://www.silabs.com/community/mcu/32-bit/forum.topic.html/error_unkown_typen-cSbD
I was wondering if there are any functions that I can call in order to poll for the report descriptor of a mouse. I would imagine that I need to send this descriptor in order for the device microcontroller to appear as a mouse. In addition, I was wondering I could could also get the HID Descriptor from the HID mouse?
I have an issue that I have been battling for the last 15 hours now. Basically, I am using the USB stack. The program that I am creating, I am expanding on the HID Keyboard example for the EFM32 microcontrollers.
Basically, I have 2 microcontrollers with USB transciever. One USB is acting as a host and the other is a device. The host microcontroller has a mouse plugged into and the device microcontroller is plugged into a PC. The two microcontrollers are communicating with each other via SPI. I am attempting to create a pass-through device where the USB commands from the mouse can pass through the host and the device microcontorller will forward the commands to the PC.
Since I am transferring over the host data structures to the device microcontroller, I need the device microcontroller to parse out the host data structure and match it with the usb device data structure. In the source code of the device (which is running from the HID Key board example) I am utilizing the host data structures.
Now, I keep on running into this issue stating "unkown type name 'USBH_EP_TypeDef"" I am using this data structure directly. I am also getting the Type could not be resolved error. At first, I thought that there was an issue with the definition in the em.usb.h file. However, I was able to locate the definition in the file no problem. I then decided to create a local copy of the em_usb.h file in my project folder. Simplicity studio was able to locate the definition but the definitions for the USB Device became broken. I also checked to make sure that the IDE was looking in the correct location for the EM_usb.h file which it is.
So far, I have not had a successful build. The only time that the project built successfully was when the example was un modified so I know that the references for the files are correct.
I am not sure what do here and again, I have been spinning my wheels for the last 15 hours. Is there anything that I can do to fix it?
Just started to use Silabs uControllers and it is being hard to understand the provided documentation of the micro's.
One major doubt that i have is about the compability of the peripherals.
Does anyone knows if the peripherals are compatible (software wise) between different parts (inside same family(Pearl) or in a higher range Pearl, Wonder, ...
Can for example, same UART software component be used in different microcontrollers? (with proper configuration)?
I'm attempting to use the VCMP to monitor the supply voltage of an EFM32TG210F32 but am running into issues with accuracy. I've tested 3 different boards with varying results. My settings are 2.313V trigger, half biased on, bias at 0.
One of the boards I've tested triggers an interrupt at 2.28V, another at 2.31, and another at 2.37.
Is the VCMP comparator really this inaccurate? This seems unusable. There is no data that I can find referencing the accuracy.
Some additional details are that the device is constantly entering and leaving EM2 and EM1. Power is an issue so the interrupt is important. Could still just do a periodic check of the VCMP but that still seems to have an unreliable value with resetting the value and waiting for warm up.
I want to use CDTI to generate a waveform of the PWM peripheral. The problem is I only routed my board with connection to CDTI_CH0 on PF3, and I need to get this working to use the PWM. With what little documentation I can find it seems like I can still make this work with the CDTI.
However despite being able to get a CC channel working, I cannot get the CDTI to work. I've attached my initialisation code; I get a PWM output on PD1 but nothing on PF3.
Any help appreciated.
I've used EBI on a few projects before with no issues but I've never had this issue before.
I'm interfacing to an 128KiB FM28V100 FRAM (datasheet here: http://www.cypress.com/file/136646/download) using the EBI of an EFM32GG380F1024. There are actually 3 FRAMs on the board, but only one of them is currently powered. The hardware setup uses all 17 address lines, so I've attempted to set up the EBI in 8-bit data, 8-bit address mode with extended addressing. The problem I'm having is that the extended address lines A00-A07 do not appear to be getting used by the EBI.
I can't find any hardware fault here, and have checked continuity between every pin between the micro and the FRAM, as well as checking that every line is going to the right place. What I'm seeing is the following:
I can read/write to any address < 256.
I can read/write to any address < 512 only when A08 is enabled (i.e. what should be the highest address bit is allowing me to address the range 256-511. Again I've checked that the pins are all routed ok, and that A08 on the micro goes into A16 on the FRAM).
Any other address I can't write to, it just writes to the range 0-511, so A00-A07 are always low.
If I enable the EBI, then try to toggle all the address lines at some rate (10Hz for a test), I can see A00-A07 toggling, but the rest stay low (I would expect them all to stay low once the EBI has been initialised, but someone correct me if this is wrong). This to me possibly points to a software issue since it almost seems like the EBI is not taking control of the extended address lines. A08 does stay low however, like the other address lines.
While I continue to poke and probe the hardware, could someone just confirm that the EBI setup I've done looks correct. I can't see an issue, but maybe it's something obvious I've missed. I currently don't have a HFXO connected, so I'm just using the internal 14MHz clock. For the FRAM, I've got CE2 connected to the 3V3 supply.
EBI_Init_TypeDef ebi_init = EBI_INIT_DEFAULT; CMU_ClockEnable(cmuClock_EBI, true); CMU_ClockEnable(cmuClock_GPIO, true); /* Data pins. AD00-AD07 */ GPIO_PinModeSet(gpioPortE, 8, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortE, 9, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortE, 10, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortE, 11, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortE, 12, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortE, 13, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortE, 14, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortE, 15, gpioModePushPull, 0); /* AD08 */ GPIO_PinModeSet(gpioPortA, 15, gpioModePushPull, 0); /* AD09-AD15 */ GPIO_PinModeSet(gpioPortA, 0, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortA, 1, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortA, 2, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortA, 3, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortA, 4, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortA, 5, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortA, 6, gpioModePushPull, 0); /* A00-A02 */ GPIO_PinModeSet(gpioPortA, 12, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortA, 13, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortA, 14, gpioModePushPull, 0); /* A03-A04 */ GPIO_PinModeSet(gpioPortB, 9, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortB, 10, gpioModePushPull, 0); /* A05-A06 */ GPIO_PinModeSet(gpioPortC, 6, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortC, 7, gpioModePushPull, 0); /* A07-A08 */ GPIO_PinModeSet(gpioPortE, 0, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortE, 1, gpioModePushPull, 0); /* Chip select. Disable the other chip selects for the other FRAMs */ GPIO_PinModeSet(gpioPortD, 9, gpioModePushPull, 1); GPIO_PinModeSet(gpioPortD, 10, gpioModeDisabled, 1); GPIO_PinModeSet(gpioPortD, 11, gpioModeDisabled, 1); /* WE and RE. This is on location 1 */ GPIO_PinModeSet(gpioPortF, 8, gpioModePushPull, 1); GPIO_PinModeSet(gpioPortF, 9, gpioModePushPull, 1); /* Non-multiplexed */ ebi_init.mode = ebiModeD8A8; ebi_init.location = ebiLocation1; ebi_init.banks = EBI_BANK0; ebi_init.csLines = EBI_CS0; /* Enable extended address pins */ ebi_init.aLow = ebiALowA8; ebi_init.aHigh = ebiAHighA17; /* Initially had these are all 1 except the strobes which were set to 2, which seemed correct from the datasheet, but I had to adjust the strobe length to 6 after trial and error */ ebi_init->addrHoldCycles = 1; ebi_init->addrSetupCycles = 1; ebi_init->readStrobeCycles = 6; ebi_init->readHoldCycles = 1; ebi_init->readSetupCycles = 1; ebi_init->writeStrobeCycles = 6; ebi_init->writeHoldCycles = 1; ebi_init->writeSetupCycles = 1; EBI_Init(&ebi_init);