Author Topic: One Dollar One Minute ARM Development  (Read 135192 times)

0 Members and 1 Guest are viewing this topic.

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4192
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #225 on: October 01, 2014, 05:46:21 am »
Quote
Code: [Select]
STM32F103C8T6 STM32F030F4P6

128KB flash   16KB
Technically, the STM32F103C8t6 only has 64k of flash.


WRT in-lining the standard peripheral library:

It turns out that there is a simpler way to get partly optimized code.  Simply include the .c file from the STP modules as well as the .h files:
Code: [Select]
#include "stm32f0xx_rcc.h" //clock routing used
#include "stm32f0xx_gpio.h" //gpio modules used
#include "stm32f0xx_adc.h" //adc module used
#include "stm32f0xx_usart.h" //usart used
#include "stm32f0xx_misc.h" //interrupts used

#ifdef DOINLINE
#include "stm32f0xx_rcc.c" //clock routing used
#include "stm32f0xx_gpio.c" //gpio modules used
#include "stm32f0xx_adc.c" //adc module used
#include "stm32f0xx_usart.c" //usart used
#endif

Doing this for Dannyf's init/adc/uart blinky program shaved off a bit more than 10%, which isn't bad for an essentially zero-effort change.  It didn't improve any using modified STP files, either.  (However, the simple uart deinit/init example, which was crafted to explicitly capitalize on the inline definitions, DID do much better with modified STP source - it only went down about 5% in size with the double-includes.  I'm not sure exactly why...)

Code: [Select]
BillW-MacOSX-2<10307> make dannyn
/usr/local/armgcc/bin/arm-none-eabi-gcc -DSTM32F10X_MD=1 -mcpu=cortex-m3 -mthumb -O3 -ffunction-sections -fdata-sections -Wl,--gc-sections -gdwarf-2 -include assert.h -o danny_normal -DSTM32F030=1 \
           -I normal danny.c \
           normal/stm32f0xx_misc.c normal/system_stm32f0xx.c \
           normal/stm32f0xx_usart.c normal/stm32f0xx_rcc.c \
           normal/stm32f0xx_adc.c normal/stm32f0xx_gpio.c
/usr/local/armgcc/bin/arm-none-eabi-size danny_normal
   text    data     bss     dec     hex filename
   3288    1120      40    4448    1160 danny_normal
BillW-MacOSX-2<10308> make dannyi2
/usr/local/armgcc/bin/arm-none-eabi-gcc -DSTM32F10X_MD=1 -mcpu=cortex-m3 -mthumb -O3 -ffunction-sections -fdata-sections -Wl,--gc-sections -gdwarf-2 -include assert.h -o danny_i2 -DSTM32F030=1 \
           -I normal -DDOINLINE danny.c \
           normal/stm32f0xx_misc.c normal/system_stm32f0xx.c
/usr/local/armgcc/bin/arm-none-eabi-size danny_i2
   text    data     bss     dec     hex filename
   2900    1120      36    4056     fd8 danny_i2

 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #226 on: October 01, 2014, 06:09:47 am »
42xx board and CY8C4245PVI-482 chips so my prototype looks exactly like yours. It seems that two of your solutions will work for super low cost programming. Reprogramming the kit board will keep cost to $4 which is well within my budget and would fit right into the purpose of this thread. Because they referred to the board as "Stamp" I initially confused it with the Parallax product so didn't appreciate this approach. Definitely worth a try.

More importantly the ability to use an STlink dongle is great news because a couple of those were purchased, one on Ebay for $5 and another on Aliexpress for $4. This last solution is by far the easiest since there are no modifications involved. Installing the Keil package on my netbook  is a bit of a pain but when the LPC and STM8 projects are done this may be next.

Thanks for taking time to explain this and hopefully more details and discussion are coming.

This is a link to part one out of three, in here i'm just creating the target program for the virgin chip.

https://www.eevblog.com/forum/microcontrollers/psoc-examples/msg522554/#msg522554

Next I'll put the steps to program the prototype board to act as a programmer

and after that I'll put the steps to use the programmer to program the code from part 1 into a virgin chip that has no bootloader on it.

(I might do part two now, or maybe tomorrow since it's 1 AM already)

 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #227 on: October 01, 2014, 08:28:41 am »
Oh well, decided to stay up (it's 3:30 AM now) but I have all three parts posted in there:
https://www.eevblog.com/forum/microcontrollers/psoc-examples/msg522554/#msg522554
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #228 on: October 01, 2014, 12:50:38 pm »
That's pretty impressive. You have proven we dont have to end up in the poorhouse to play with PSOC4 either. I plan to try this out myself as soon as my STM8 and LPC projects are done. Only one GUI based setup at a time fits in the limited SSD space on my day computer which is a netbook. I wonder if there might be a small flash utility hidden somewhere inside the Keil or Creator package. This would allow me to fit PSOC in with the other minimal GCC toolsets like I've done with STM and LPC.

So far it looks like we have 3 members of the $1 one minute ARM club: ST, LPC, and PSOC. Maybe there are others hiding out there too.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: One Dollar One Minute ARM Development
« Reply #229 on: October 01, 2014, 07:35:47 pm »
Quote
Code: [Select]
STM32F103C8T6 STM32F030F4P6

128KB flash   16KB
Technically, the STM32F103C8t6 only has 64k of flash.
Indeed. And 37 gpio.

The STM32F103RET6 is the one in the bigger package with 128k flash.

 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: One Dollar One Minute ARM Development
« Reply #230 on: October 01, 2014, 07:38:06 pm »
Oh well, decided to stay up (it's 3:30 AM now) but I have all three parts posted in there:
https://www.eevblog.com/forum/microcontrollers/psoc-examples/msg522554/#msg522554
And thank you very much for posting all that. Those posts just made a psoc buying incident very very likely. ;)
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #231 on: October 02, 2014, 09:22:16 am »
The STM32F103RET6 is the one in the bigger package with 128k flash.

STM32F103C8T6 is the one that's much cheaper in medium package with 128k flash.

Some may have noticed the PSOC promotion is over. My $1 chips would cost over $4 with shipping now so good thing I got in under the wire. It might still be worth it to me if it was possible to use STlink for programming but so far no evidence this actually works.
 

Offline Kostas

  • Regular Contributor
  • *
  • Posts: 71
  • Country: gr
Re: One Dollar One Minute ARM Development
« Reply #232 on: October 02, 2014, 09:36:00 am »
Some may have noticed the PSOC promotion is over. My $1 chips would cost over $4 with shipping now so good thing I got in under the wire. It might still be worth it to me if it was possible to use STlink for programming but so far no evidence this actually works.

Is it over? It seems I can still buy them at $1 a piece, with free shipping. In fact, it seems I can get any ic with free shipping, but not any of the dev kits they offer.
 

Offline aon

  • Contributor
  • Posts: 30
  • Country: fi
Re: One Dollar One Minute ARM Development
« Reply #233 on: October 02, 2014, 10:58:45 am »
So far it looks like we have 3 members of the $1 one minute ARM club: ST, LPC, and PSOC. Maybe there are others hiding out there too.

Some of the Silabs EFM32ZG chips are pretty close to a dollar (even in singles) and come with a UART bootloader for low-cost programming. But they're in QFN's which might be a show stopper for some, and availability via the inofficial channels is close to nonexistent (EDIT: actually, taobao has some things that look rather interesting, might have to look into that at some point).

Oh, and there are some cheap chips in the freescale kinetis L series as well that I've looked at. For me, the thing that separates ST from the rest is the abundance of (some variants of) the chips and cheap programming tools.
« Last Edit: October 02, 2014, 02:25:54 pm by aon »
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: One Dollar One Minute ARM Development
« Reply #234 on: October 02, 2014, 03:20:31 pm »
The STM32F103RET6 is the one in the bigger package with 128k flash.

STM32F103C8T6 is the one that's much cheaper in medium package with 128k flash.
Datasheet?
« Last Edit: October 02, 2014, 03:44:48 pm by mrflibble »
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #235 on: October 02, 2014, 03:44:50 pm »
LOL. This has been discussed here, in the ghetto thread, my RCG kinks on page one, Multiwii forum, and many other places on the internet. Contrary to specs 103c8 have 128k flash. This is easily demonstrated with the ST flash program by overriding the default 64k entry and verifying true size with "fill" and "verify" options on the next page. Also note that several commercial products depend on this overage.

It's possible that new versions may not have this bonus feature and ST may start producing chips without but IMO more likely to get hit by a meteor. Just one of the reasons this particular chip remains untouchable regarding MCU cost/benefit.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: One Dollar One Minute ARM Development
« Reply #236 on: October 02, 2014, 03:50:54 pm »
I was almost waiting for it. I tend to stick with datasheets when listing features for other people's benefit, but to each their own method of presenting information.
« Last Edit: October 02, 2014, 04:04:49 pm by mrflibble »
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4192
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #237 on: October 02, 2014, 05:51:58 pm »
Quote
Contrary to specs
It does bother me that we're ignoring datasheet specs and paying "gray market" prices that aren't reproducible from generic vendors (even in large quantities.  Mouser/digikey prices for stm32f103c8t6 are about $3 in full reels of 2400.)  Especially without obvious explanations...
 

Offline SirNick

  • Frequent Contributor
  • **
  • Posts: 589
Re: One Dollar One Minute ARM Development
« Reply #238 on: October 02, 2014, 06:34:10 pm »
It makes me wonder as well.  What benefit is there to the manufacturer to underrate the flash spec?  Strictly a yield thing?  Is flash production that prone to failure?  Hmm...

Definitely not something I would bank on, without some word from the vendor saying: "Yep.  It's here to stay.  Just too lazy to change the specs."
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #239 on: October 03, 2014, 01:57:02 am »
Unlikely ST will issue a press release saying " Yup, those $5 chips are EXACTLY the same die as the $1 chips". Unfortunately for us not a humanitarian institution totally unconcerned with profit. Instead they must have discovered that it's cheaper to maintain one product line vs two. At the risk  of upsetting again here's a couple more:

Some of the six pin "brain dead" Atmel chips have twice the stated memory too. Really. And atmel does not advertise this either.

ATMEGA328 runs fine at 16mhz on 3.3v. Over the entire temperature range.  Just like with STM32 there are some (successful) commercial products here that depend on bonus features. Not a single credible case of failure out of thousands of users.

Of course if something like military or life dependent applications are involved it might be a good idea to stick with the party line. Not so much for technical reasons but mainly to avoid vulnerability in potential tort actions. In any case I'm willing to take the hit for any tragic hobby mishaps resulting from my evil misinformation campaign.

There are generally two basic viewpoints on this subject, those who have decided datasheet is bible and those with a more atheistic attitude. Personally I am oriented more toward practice than theory. You can call it cutting corners if it makes you feel better. It's a choice and has held me in good stead so far as apparently yours has for you guys. Just my two cents, or should I say dollar and two cents. :)
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4192
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #240 on: October 03, 2014, 05:09:49 am »
So neglecting politics, what's the next thing to implement in assembler?
 

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: One Dollar One Minute ARM Development
« Reply #241 on: October 03, 2014, 06:46:36 am »
Some may have noticed the PSOC promotion is over. My $1 chips would cost over $4 with shipping now so good thing I got in under the wire.
~$2.50/ea, free shipping direct from Cypress... not sure why you keep saying >= $4...
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #242 on: October 03, 2014, 06:51:55 am »
Some may have noticed the PSOC promotion is over. My $1 chips would cost over $4 with shipping now so good thing I got in under the wire.
~$2.50/ea, free shipping direct from Cypress... not sure why you keep saying >= $4...

I know, I brought that up about 3 times already.
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #243 on: October 03, 2014, 11:28:03 am »
Because that's what mouser charged when I went back to purchase more for a friend (3.28*5=15.4 +5.99=22.39 /5= $4.48 each):

http://www.mouser.com/ProductDetail/Cypress-Semiconductor/CY8C4245PVI-482/?qs=sGAEpiMZZMuoKKEcg8mMKCq3qKLhcxNGDk4txzttb8I%3d

Closer to $5 at Digikey. If someone had mentioned here that free shipping was available from Cypress I could have cut my expenses in half.
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #244 on: October 03, 2014, 07:33:36 pm »
So neglecting politics, what's the next thing to implement in assembler?

More like religion if you ask me. I shouldn't complain because if it weren't for "white market" suckers to support development and infrastructure us black marketeers would be left out in the cold.

To answer your question I've managed to get a crude logic analyzer implemented in 103c and trying to port to STM8. 25 cent LA!

Meanwhile, in addition to the LPC demo I posted on page one earlier this week, the STM8 dummy demo in reply #5 slot has been updated with one that actually toggles the LED. Still only 3 instructions. On request a photo of the setup has been added:

 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #245 on: October 03, 2014, 09:45:13 pm »
Some of the Silabs EFM32ZG chips are pretty close to a dollar (even in singles) and come with a UART bootloader for low-cost programming. But they're in QFN's which might be a show stopper for some,

Thanks for the hint. I ordered EFM32ZG110F32-QFN24 as soon as you suggested them and they just arrived. Even with shipping and in single they are little more than a buck. 8k version 80 cents. Totally weird pricing schedule. Amazingly almost no difference in price between 1 or 100 pieces and 32k vs 8k.

QFN is not a big problem at all. In fact with a dab of paste and cheap heat gun even easier because there's no soldering iron involved. The 24 pin fit right in place on those generic QFP boards. They look like a very good deal and can't wait to try these out. Now to download some manuals and learn how to program. Thanks again for finding new candidates for the 1$ 1 minute club.
« Last Edit: October 03, 2014, 11:02:56 pm by paulie »
 

Offline SirNick

  • Frequent Contributor
  • **
  • Posts: 589
Re: One Dollar One Minute ARM Development
« Reply #246 on: October 03, 2014, 10:44:01 pm »
QFN is not a big problem at all. In fact with a dab of paste and cheap heat gun even easier because there's no soldering iron involved.

Amen to that.  I got one of those OSH Stencils too.  My dev board was the first time I've used many of the SMD packages, with only a few trial runs with TSSOP parts before it.  The whole process went very smoothly.  Had a few solder bridges to clean up due to using too much paste, but that was easy to fix.  The most time-consuming thing was sorting through my parts to find the R and C values I needed.  Definitely makes me think twice about doing through-hole stuff any more than I have to.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #247 on: October 04, 2014, 12:34:45 am »
I wanted to just try to make a QFN deadbug style just to know I could do it.

So I took the wiring diagram and flip it, then flipped and mirror all the labels and components so I could have the bottom view (and changed the label from top view to bottom view).



I wired it up until I got to the XRES, added the decoupling caps and connected the ground with a 22 AWG cable on the other side of the board. Only 9 pins left but I had plenty of GPIOs plus SWDIO/SWDCLK so I attempted to program it before completion.



It powers up and I get regulated 1.8V out of VCCD. I got no shorts but hooking it up to my programmer it doesn't recognize it. Granted, I think I connected 4V by mistake to VCCD instead of VDDD so I might have fried the chip.

On another document I saw that VDDD and VDDA should be shorted, I tried that as well but it just doesn't talk to the programmer via SWD.

I know I can buy 5 boards for a buck or so, but I just wanted to check if I could solder 0.5mm with just one of those third helping hand with magnifying glass, some wire that I have no idea where it came from and my cheap Tenma (Hakko knockoff). I still have 19 of those chips left but the next attempt will be with one of those cheap boards and a skillet.

I stacked the 0.1uF caps on top of the 1uF caps when both where needed.

So right now the only thing this is good for is to regulate from a 1.8V-5.5V unregulated input and get 1.8V regulated output and helped me clear my head while doing it, kind of relaxing since I had no choice but to take my time and work slowly.

The pads on those PSoC4 QFNs are smaller than small.

I consider the result a Fail, but I did enjoyed wiring it up.
 

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: One Dollar One Minute ARM Development
« Reply #248 on: October 04, 2014, 03:18:13 am »
Thanks for the hint. I ordered EFM32ZG110F32-QFN24 as soon as you suggested them and they just arrived. Even with shipping and in single they are little more than a buck. 8k version 80 cents. Totally weird pricing schedule. Amazingly almost no difference in price between 1 or 100 pieces and 32k vs 8k.
Their pricing shows (especially with typical prices in their propaganda listing them at 100k units) that they only care about very large customers.

The chip is pretty light on peripherals for other chips in this price range, but does have a possibly useful mix (2 timers x 3pwm, but no other high speed or higher resolution timers with interrupts; 1 usart 1 i2c, adc, idac, rtc, pulsecounter and that's about it) but still doesn't seem like a bad choice if what it has will fit your application. I almost picked it for an upcoming project but went to $1 sale PSoC4's instead. Project scope also grew so it's a good thing, I need the extra pins, was considering the G210 as well but the peripherals were too limiting; I also was able to use the UDBs on the PSoC4 for my project to great effect :)

I also have some to play around with - maybe I'll come up with some low power project to use it in.
 

Offline aon

  • Contributor
  • Posts: 30
  • Country: fi
Re: One Dollar One Minute ARM Development
« Reply #249 on: October 04, 2014, 07:07:21 am »
QFN is not a big problem at all. In fact with a dab of paste and cheap heat gun even easier because there's no soldering iron involved. The 24 pin fit right in place on those generic QFP boards. They look like a very good deal and can't wait to try these out. Now to download some manuals and learn how to program. Thanks again for finding new candidates for the 1$ 1 minute club.

Although it might be a bit beyond the scope of this thread, another thing that seems nice about the EFM32's is that their standard peripheral library has a permissive open source license (instead of vague statements on a forum which is the case with STM32), and seems to be reasonably well documented. The documentation is reasonably easy to find - I guess the actual code files come in the devboard support packages available on their site.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf