Page 1 of 6

New STM32F0 devices (Cortex-M0)

Posted: Thu Mar 01, 2012 9:05 am
by Giovanni
I just found this:

http://www.st.com/internet/com/press_release/p3275.jsp

Very interesting, the STM32 family is expanding also downward into the 8/16bits space.

Giovanni

Re: New STM32F0 devices (Cortex-M0)

Posted: Thu Mar 01, 2012 11:56 am
by mobyfab

Re: New STM32F0 devices (Cortex-M0)

Posted: Fri Mar 02, 2012 11:04 pm
by colin
Nice! That is exciting news. Before STM32 won me over, I was a NXP LPC13xx/LPC11xx fan. The super cheap price was great. But the lack of an RTC was a deal-breaker. And there was no consistency from LPC11xx/LPC13xx to the bigger LPC17xx/LPC18xx chips if you needed to expand from the 32 KB max flash/8KB max RAM. With STM32 you can be pin-compatible from the $2.00 value line up to the big 1 MB monsters and even STM32F4 if you do it right. And now, lower-power, cheaper Cortex-M0 option is stupendous!!! I hope it is pin- and peripherial- compatible with the other STM32 chips.... no technical data up on ST's site yet.

Re: New STM32F0 devices (Cortex-M0)

Posted: Mon May 14, 2012 5:49 pm
by Giovanni
Hi,

News, now the documentation is available, I just ordered a couple of the new STM32F0-Discovery kits, the nice thing is that they also include a prototype board together with the discovery.

Expect the F0 to be added to the general STM32 support.

Giovanni

Re: New STM32F0 devices (Cortex-M0)

Posted: Mon May 14, 2012 6:25 pm
by colin
Hi Giovanni,
That's good to hear. Although I'm confused and saddened why the STM32F0 chips are hardly cheaper than the STM32F100 series.

E.g., Mouser prices:
STM32F051K8U6 US$3.17 (64K/8K, cheapest F0 on Mouser).
STM32F100C6T6B US$2.55 (32K/4K, cheapest F1 on Mouser).
STM32F100C6T6B US$3.76 (64K/8K, comparable to the F0 above).
I was hoping for a device to compete with LPC1000 series like
LPC1111FHN33/202,5 US$1.40 (8K/2K)
LPC1114FHN33/202,5 US$1.90 (32K/4K)
Perhaps I should blame Mouser since Future Electronics has the STM32F0 for less than half the price of Mouser. Anyway, it's all good to see the push of Cortex-M into more, cheaper, smaller devices. It makes the ATmega32 and ATmega64 etc. seem completely obsolete.

Have you heard about the Freescale Cortex-M0+ Kinetis L series? The new Cortex-M0+ core is said to have current consumption of only 9 µA/MHz (hit the button to show the press release)! That is an order of magnitude under what I've seen from other microcontrollers, even MSP430 and other low-power 8/16 bitters. Is 9 microamps per MHz a typo? Crazy.

Re: New STM32F0 devices (Cortex-M0)

Posted: Mon May 14, 2012 6:41 pm
by Giovanni
Hard to tell about prices, I read somewhere that the F0 is meant to compete vs 8/16 bits parts (and I agree that those are becoming increasingly pointless for new designs) and there should be parts under the 1$ mark.

The CM0+ is REALLY interesting, the two stages pipeline makes it more efficient both as execution speed per MHz and uA per MHz.

I don't think the F0 is meant as a low power part, probably that will be the L0, I saw it in some presentation PDF, there was also an enigmatic F3, another CM4 part. It was not mentioned if the L0 will be a CM0 or a CM0+ part but a CM0+ would make sense in that role.

I would like to try the FSL parts, do they have any cheap evaluation boards like ST discovery kits or NXP lpcxpressos?

Giovanni

Re: New STM32F0 devices (Cortex-M0)

Posted: Wed May 16, 2012 9:28 am
by Giovanni
Hi,

I just did a first analysis about a possible implementation and found that the F0 uses improved versions of some of the normal STM32 peripherals. For example:

SPI now is capable to use frames from 4 to 16 bits and both 8 and 16 bits CRCs. It also allows a "packed mode" that should optimize the bandwidth usage from DMA.
I2C also is more complex now registers are 32 bits wide, I think it fixes some of the STM32 I2C problems.
USARTs, much enhanced, block mode, HW timeouts and other.
The ADC is somehow simplified, not there is no injected mode, the registers interface is more clear.
Timers are about equal.
The DMA is F1/L1 style, not the enhaced DMA found in F2 and F4.

The trouble is to decide if try to integrate it in the existing HAL or make a dedicated mini HAL for the F0.

Giovanni

Re: New STM32F0 devices (Cortex-M0)

Posted: Fri May 18, 2012 5:07 pm
by Giovanni
Hi,

I added to the repository an initial support for the STM32F0xx devices, so far only HAL and PAL drivers plus a demo for the STM32F0-Discovery. Zero problems, it worked at the first run.

Note, in order to debug the STM32F0xx you need the GDB server from the Atollic toolchain 3.1.0 (or use Atollic itself).

Giovanni

Re: New STM32F0 devices (Cortex-M0)

Posted: Sat May 19, 2012 4:31 pm
by Giovanni
The serial driver now works, this is the first report:

Code: Select all

*** ChibiOS/RT test suite
***
*** Kernel:       2.5.0
*** Compiled:     May 19 2012 - 17:24:06
*** Compiler:     GCC 4.6.2
*** Architecture: ARMv6-M
*** Core Variant: Cortex-M0
*** Port Info:    Preemption through NMI
*** Platform:     STM32F0 Entry Level
*** Test Board:   ST STM32L-Discovery

----------------------------------------------------------------------------
--- Test Case 1.1 (Threads, enqueuing test #1)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.2 (Threads, enqueuing test #2)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.3 (Threads, priority change)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.4 (Threads, delays)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.1 (Semaphores, enqueuing)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.2 (Semaphores, timeout)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.3 (Semaphores, atomic signal-wait)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.4 (Binary Semaphores, functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.1 (Mutexes, priority enqueuing test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.2 (Mutexes, priority inheritance, simple case)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.3 (Mutexes, priority inheritance, complex case)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.4 (Mutexes, priority return)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.5 (Mutexes, status)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.6 (CondVar, signal test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.7 (CondVar, broadcast test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.8 (CondVar, boost test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 4.1 (Messages, loop)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.1 (Mailboxes, queuing and timeouts)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.1 (Events, registration and dispatch)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.2 (Events, wait and broadcast)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.3 (Events, timeouts)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.1 (Heap, allocation and fragmentation test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.1 (Memory Pools, queue/dequeue)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.1 (Dynamic APIs, threads creation from heap)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.2 (Dynamic APIs, threads creation from memory pool)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.3 (Dynamic APIs, registry and references)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.1 (Queues, input queues)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.2 (Queues, output queues)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.1 (Benchmark, messages #1)
--- Score : 151223 msgs/S, 302446 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.2 (Benchmark, messages #2)
--- Score : 119158 msgs/S, 238316 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.3 (Benchmark, messages #3)
--- Score : 119158 msgs/S, 238316 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.4 (Benchmark, context switch)
--- Score : 456240 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.5 (Benchmark, threads, full cycle)
--- Score : 92602 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.6 (Benchmark, threads, create only)
--- Score : 132740 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.7 (Benchmark, mass reschedule, 5 threads)
--- Score : 36254 reschedules/S, 217524 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.8 (Benchmark, round robin context switching)
--- Score : 273820 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.9 (Benchmark, I/O Queues throughput)
--- Score : 427652 bytes/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.10 (Benchmark, virtual timers set/reset)
--- Score : 417370 timers/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.11 (Benchmark, semaphores wait/signal)
--- Score : 682712 wait+signal/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.12 (Benchmark, mutexes lock/unlock)
--- Score : 422920 lock+unlock/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.13 (Benchmark, RAM footprint)
--- System: 404 bytes
--- Thread: 72 bytes
--- Timer : 20 bytes
--- Semaph: 12 bytes
--- EventS: 4 bytes
--- EventL: 12 bytes
--- Mutex : 16 bytes
--- CondV.: 8 bytes
--- Queue : 32 bytes
--- MailB.: 40 bytes
--- Result: SUCCESS
----------------------------------------------------------------------------

Final result: SUCCESS


Apparently the tiny Cortex-M0 still manages to be faster than an ARM7.

Giovanni

Re: New STM32F0 devices (Cortex-M0)

Posted: Mon May 21, 2012 2:57 pm
by colin
Giovanni wrote:Hi,

I added to the repository an initial support for the STM32F0xx devices, so far only HAL and PAL drivers plus a demo for the STM32F0-Discovery. Zero problems, it worked at the first run.

Nice! That's called skill. :D
Giovanni wrote:Note, in order to debug the STM32F0xx you need the GDB server from the Atollic toolchain 3.1.0 (or use Atollic itself).

That's odd. Is it not possible to ultimately use just any SWD debugger? E.g., will Versaloon be able to support it?