hello, i am a software libre and hardware advocate and engineer of over 20 years experience working with software libre. i'm currently based in Taiwan, and have learned that Mega 2560 clones can be bought in the Huaqiang Road markets for around $USD 5 and RAMPS 1.4 3D printing shields for around $USD 3.50.
this got me thinking, how can i reduce the cost of say the Arduino Due to the same sort of pricing level, and the short answer is: you can't. Atmel (now Micron) do not accept the reality of competitive pricing in Shenzhen / Taiwan: consequently whilst the 2560 is RMB 22 (around $3 US) on the china-equivalent of ebay, the ATSAM3X8E is double that - around $6. with all the extra components on the Due, including the Management Mega, it is no surprise that the Due is still $USD 15 and that's direct from factories in Shenzhen.
however.... if you look instead at the pricing on ST's MCUs, you notice something very very interesting. prices in the markets are sometimes under HALF that of their equivalent US / EU levels. other companies such as Freescale (now NXP) are also known to do this.
so with the help of the stm32duino community http://www.stm32duino.com/viewtopic.php?f=9&t=2630 i've been working on an arduino compatible board which uses the STM32L471. what's very nice is that someone has already done an arduino development environment board variant for the STM32L4 range: GitHub - GrumpyOldPizza/arduino-STM32L4
also i've just replaced the FT232 ($USD 2.50) with the same CH340G ($0.30 or less) that is in the chinese ATMEGA r3 clone sitting here on my desk, thanks to sparkfun's eagle files at SparkFun Serial Basic Breakout - CH340G - DEV-14050 - SparkFun Electronics this took about an hour.
i've yet to get a quote (the whole of china is on holiday this week), and anyone is entirely free to do so as it's entirely libre (Index of /~lkcl/stl47o and you can use git clone Index of /~lkcl/stl47o/.git) however i expect the BOM to come out somewhere around the $6 to $7 mark.
this would be for a fast, modern ultra-low-power 32-bit ARM Cortex M4 processor - 80mhz - with an on-board DSP and hardware floating point single-precision co-processor, and i'm planning on using the 100-pin STM32L471VE variant which has 512K of FLASH and 128k RAM. other variants are possible and are listed here - they go up to 1024K (1Mb) of FLASH and the L451 can do 160k of RAM. http://www.st.com/en/microcontrollers/stm32l4x1.html?querycriteria=productId=LN1464
pin-compatibility with the main published functions of the Due are identical: the L4 series has the same number of ADCs (16) and DACs (2) but the shared multiplexing functionality meant that i had to do the same as the Due: CANTX and CANRX on pins 13 and 14 (which do NOT have ADC multiplexed function) and DAC on analog pins 15 and 16 (which do also have an ADC function on the L4 series).
one variation: the L4 series has four SPI ports, so i was able to put one of those onto ICSP, and the other onto pins 50-53 including the hardware-controlled NSS line.
booting and flashing i am currently investigating whether the RTS as well as the DTR lines can be used, RTS (ready-to-send) for BOOT0 and DTR (as usual) for RESET. the whole of the STM32 series has one extra line, BOOT0, which tells it whether to boot from NAND or from internal ROM bootloader. this would save $1 to $2 on the BOM by not having to have an extra "Management MCU".
the other alternative is to upload dfu-compatible bootloader firmware first developed by the Leaflabs Maple team, which software-emulates DFU and does loading into memory / NAND "manually" so to speak. i much prefer the RTS/DTR method, it's been discussed here before (biig thread on the maple arduino 1.5 port that inspired the creation of the stm32duino forum), however i just also found this:
he uses DTR# only, with the capacitor trick to create the spike needed for reset, and leaving it set to create the BOOT0 signal. the only thing is, BOOT0 needs to go high for it to be operational, and NRST is on a permanent internal pull-up resistor and needs to be pulled LOW. also whilst the CH340G is DRT# (inverted logic) i just checked the MEGA clone's CH340G and both DTR and RTS measure at 5.0V.
so! thoughts and help greatly appreciated. firstly on helping with a circuit to get automatic reset (i found that there's a patch to stm32flash to add a "-t" option), and secondly, would people be interested to buy this board either the first batch of prototypes (or when it's ready - properly QA checked before shipping direct from Shenzhen of course). the full eagle SCH/PCB files are of course available so anyone may download and make them.