Author Topic: EFM8 USB First Impression  (Read 6157 times)

0 Members and 1 Guest are viewing this topic.

Offline blueskullTopic starter

  • Supporter
  • ****
  • !
  • Posts: 367
  • Country: cn
  • BA7LKP
EFM8 USB First Impression
« on: April 23, 2016, 09:19:09 am »
I've been lurking around for a solution that serves as a DC UPS controller that handles charging, load switching, monitoring and communication.
After experimenting and literature researching on a variety of micro controllers, I eventually chose the EFM8 Universal Bee micro controller.
Here is a brief summary of my experience with it, the platform is Universal Bee Starter Kit that Dave featured in his mail bag.

My overall experience is positive. It took me ~2 hours to write an USB echo program from scratch using its VCPXpress library with some reference from its VCPXpress demo code.
There are some quirks, such as the demo code is not written very well (Rx soft lock if nothing to Tx), and the library triggers a linker warning which can be suppressed.
The entire process form learning the IDE, learning API for VCPXpress, reading reference manual and writing a simple new line tokenizer and a command parser as well as all debugging and tweaking took less than 8 hours.

For the price less than an USB-UART bridge (~$1.1 each at single quantity), the EFM8 is really a cost effective solution, it also comes with a fairly accurate ADC with 50ppm/C reference, 3 channels of PWM, and tons of other peripherals that I do not need (I2C slave, SMBus master, SPI, UART, comparator, CRC and others).
Of course, its processing power is not nearly on par with modern ARM based solution -- it only comes with 16KB of FLASH which 9K of them are occupied by VCPXpress, and 2304 bytes of RAM including xdata section. It can only run up to 25MHz without prefetching, and 48MHz with prefetching, and it is only powered by a wimpy modernized 8051.

Attached is a demo code I wrote that controls 3 on-board LEDs from serial command. To run it, you will need Universal Bee Starter Kit and Silabs CP210x VCP driver installed.
Send RON, GON or BON to turn on red, green or blue LED, and send ROFF, GOFF or BOFF to turn off the respective LED.

Once again, it is really cool to get a simple USB firmware running and actually doing useful things for only 76 effective lines of code.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 16867
  • Country: lv
Re: EFM8 USB First Impression
« Reply #1 on: April 23, 2016, 10:08:40 am »
I'm now in process of designing a device on efm8ub11f16g. The big deal for me is a built in 3.3V 100mA Vreg which can power external circuity. Good ADC is important as well. Because of this MCU, I can keep the the part count being minimal, and it is very cheap as well. If I wouldn't need so many inputs, I could use efm8ub10f8g instead, which considering  it's capabilities costs not much more than dirt.
« Last Edit: April 23, 2016, 10:12:54 am by wraper »
 
The following users thanked this post: I wanted a rude username

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: EFM8 USB First Impression
« Reply #2 on: April 23, 2016, 01:21:47 pm »
This discussion demonstrates the point I made earlier: cores don't matter. What does matter are the peripherals. You can do a lot of interesting things with a slow and "obsolete" core like 8051, and you may not do much more than blinking an led on a Cortex-M4F if you are incompetent.

This ARM-thing is 90% marketing / fad and 10% substance.
================================
https://dannyelectronics.wordpress.com/
 

Offline wraper

  • Supporter
  • ****
  • Posts: 16867
  • Country: lv
Re: EFM8 USB First Impression
« Reply #3 on: April 23, 2016, 02:35:53 pm »
That "obsolete 8051" is not so obsolete. In average about 6-7x faster than original 8051 at the same frequency.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 16867
  • Country: lv
Re: EFM8 USB First Impression
« Reply #4 on: April 23, 2016, 02:51:57 pm »
BTW, cutting down the costs, I've done USB HID joystick controller with Attiny24A (2kB flash and 128 bytes of RAM), software USB, no built in hardware. About 400 devices in the wild, work perfectly as much as I'm aware. So all those expensive ARM with built in USB (which you do not get with cheap ARM) are not needed in many cases. But This wonderful MCU allows me to do much more at basically the same price (actually cuts the BOM costs because fewer external parts needed), so I won't ever bother with AVR anymore, I guess.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 16867
  • Country: lv
Re: EFM8 USB First Impression
« Reply #5 on: April 24, 2016, 12:06:50 am »
Are you using VBUS as a GPIO? Just a kind warning, you must use VBUS as VBUS when USB is used on an UB11. UB10 has the option to disable VBUS detection and always report logic high on VBUS to USB core, but UB11 can not.
Cannot find any VBUS pin differences between the UB10/UB11 in the datasheet and reference manual, and even that P3.1 must be used for VBUS detection. In the development board P3.1 is connected to VBUS, so is not useable unless you remove R1057 jumper resistor from the PCB. BTW I made a typo, I'm using EFM8UB10F16G-C-QFN28, though I bought a few EFM8UB11F16G-B-QSOP24 too but haven't used them.
« Last Edit: April 24, 2016, 12:18:50 am by wraper »
 

Offline wraper

  • Supporter
  • ****
  • Posts: 16867
  • Country: lv
Re: EFM8 USB First Impression
« Reply #6 on: April 24, 2016, 09:55:23 am »
You can not use P3.1 on this board, but you can use it in your final target board.
I do use it. Though the boards ordered have not arrived yet.
 

Offline grantb5

  • Regular Contributor
  • *
  • Posts: 139
  • Country: ca
Re: EFM8 USB First Impression
« Reply #7 on: March 15, 2019, 03:15:34 pm »
Any second impressions on the EFM8? :)  I've used the SILabs C8051 F34x and F38x USB before and I see that the EFM8 is "more different" than I expected. Wondering what you or anyone else had to say now that this part has been around for a little bit.  My plan is to use Keil/uV rather than Simplicity Studio.
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1550
  • Country: au
Re: EFM8 USB First Impression
« Reply #8 on: March 17, 2019, 10:38:22 pm »
There is now also a EFM8UB3, that has 40k of code, for where 16k is not enough, and it includes the 4x Config Logic blocks, found in BB3/LB1..
The UB2 should be similar to the F380 and the UB1/UB3 are newer designs
 
The following users thanked this post: blueskull, grantb5


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf