What is lowest cost micro to micropy with? (control looping A2D, timers)
What is lowest cost micro to micropy with? (control looping A2D, timers)
The STM32F405RGT6 micro used in the pyboard is deluxe for some apps at $7.54 for qty 500. I'm wanting to make some flyback switcher supply code for solar cells power converting for low power. Who knows the low cost one to use?
Maybe the STM32F411RCT6, STM32F401RCT6 with 64K RAM? They cost ~$4 in 500's.
I need some input A2Ds, and want to sleep and wake with low drain and very quickly, so the esp8266 seems too few inputs or I'd use it without running the radio...
John Griessen
Maybe the STM32F411RCT6, STM32F401RCT6 with 64K RAM? They cost ~$4 in 500's.
I need some input A2Ds, and want to sleep and wake with low drain and very quickly, so the esp8266 seems too few inputs or I'd use it without running the radio...
John Griessen
John Griessen blog.kitmatic.com
Re: What is lowest cost micro to micropy with? (control looping A2D, timers)
The NXP MK20DX256VLH7 used in teensy is ~$4 in 500's and that port sounds usable for my app, (even without SPI, I2C) at first.
It has 40 IO's,
24 16 bit A2Ds!
runs at 1.7V,
64k RAM, 256k flash
So, I need to look at the teensy port...
It has 40 IO's,
24 16 bit A2Ds!
runs at 1.7V,
64k RAM, 256k flash
So, I need to look at the teensy port...
John Griessen blog.kitmatic.com
Re: What is lowest cost micro to micropy with? (control looping A2D, timers)
The STM32F411 is fully supported (see PYBLITEv1.0). The STM32F401 also works with stmhal/ code.
Re: What is lowest cost micro to micropy with? (control looping A2D, timers)
Thanks. The F411 seems a good choice. It being double+ the price of esp8266 and
with F405 being double- the price of the F411, it could fill out the range and be popular.
John
with F405 being double- the price of the F411, it could fill out the range and be popular.
John
John Griessen blog.kitmatic.com
-
- Posts: 463
- Joined: Wed Apr 08, 2015 5:19 am
Re: What is lowest cost micro to micropy with? (control looping A2D, timers)
So, if one wanted to build a firmware for the Nucleo-F411RE board, I suppose one just has to mix and match the stuff from stmhal/board/PYBLITEV1 and stmhal/board/STM32F401NUCLEO, right? Or has somebody already done this?
Re: What is lowest cost micro to micropy with? (control looping A2D, timers)
I put together a PR to add a board definition for the NUCLEO-F411RE board:
https://github.com/micropython/micropython/pull/1870
It also needs https://github.com/micropython/micropython/pull/1867 in order to build properly.
I was able to flash an image built with that and get a REPL on /dev/ttyACM0 (which is usb serial connected to the SWD, which in turns connects to UART2 on the 411.
https://github.com/micropython/micropython/pull/1870
It also needs https://github.com/micropython/micropython/pull/1867 in order to build properly.
I was able to flash an image built with that and get a REPL on /dev/ttyACM0 (which is usb serial connected to the SWD, which in turns connects to UART2 on the 411.
-
- Posts: 463
- Joined: Wed Apr 08, 2015 5:19 am
Re: What is lowest cost micro to micropy with? (control looping A2D, timers)
Great, thanks!
Why not set the CPU to 96 Mhz like the pyboard lite?
Also, I thought the Nucleo-F411RE does not have a HSE but runs from the 16 Mhz HSI?
Why not set the CPU to 96 Mhz like the pyboard lite?
Also, I thought the Nucleo-F411RE does not have a HSE but runs from the 16 Mhz HSI?
Re: What is lowest cost micro to micropy with? (control looping A2D, timers)
Just an oversight.
Do you have the settings used to get 96 MHz ?
Do you have the settings used to get 96 MHz ?
-
- Posts: 463
- Joined: Wed Apr 08, 2015 5:19 am
Re: What is lowest cost micro to micropy with? (control looping A2D, timers)
It seems that there are different revisions of the Nucleo board with different clock sources. Section 5.6.1 from the user manual (UM1724) has more info. Apparently newer boards use a clock signal from the ST-LINK MCU as HSE at 8 Mhz.
So this should work, I think:
So this should work, I think:
Code: Select all
#define MICROPY_HW_CLK_PLLM (8)
#define MICROPY_HW_CLK_PLLN (192)
#define MICROPY_HW_CLK_PLLP (RCC_PLLP_DIV2)
#define MICROPY_HW_CLK_PLLQ (4)
Re: What is lowest cost micro to micropy with? (control looping A2D, timers)
Yep - that worked. I confirmed it sets the frequency to 96 MHz so I updated the PR.
Thanks
Thanks