Search found 104 matches

by chrismas9
Sun Aug 11, 2019 2:45 am
Forum: Other Boards
Topic: Teensy 4.0
Replies: 4
Views: 381

Re: Teensy 4.0

Rocky Song from NXP has ported MicroPython and OpenMV to the RT1060.

https://github.com/RockySong
by chrismas9
Fri Aug 02, 2019 1:02 am
Forum: Pyboard D-series
Topic: Programming a D-series in Win64
Replies: 7
Views: 303

Re: Programming a D-series in Win64

I had issues with dfuse demo on another recent MCU and have changed to STMcubeprogrammer on Windows. It seems to support the newer MCUs. You have to follow the instructions to completely remove the dfuse USB driver before installing STMcubeprogrammer. It took a few attempts to get the driver to upda...
by chrismas9
Wed Jul 17, 2019 12:20 pm
Forum: Other Boards
Topic: [STM32L471] Port for STM32 without USB connectivity
Replies: 4
Views: 142

Re: [STM32L471] Port for STM32 without USB connectivity

You also need to remove #define MICROPY_HW_ENABLE_USB (1) and define a REPL UART. Use mpconfigboard.h from the NUCLEO_L432KC port as a starting point. I did the L452 port based on the L432. It doesn't have USB enabled (no connector on NUCLEO board) and it compiles error free for L451 by just changin...
by chrismas9
Thu Jun 27, 2019 5:09 am
Forum: MicroPython pyboard
Topic: ADC measure negative voltage??
Replies: 23
Views: 735

Re: ADC measure negative voltage??

On Pyboard Aref is derived from the main 3V3 regulator. If you want really good absolute accuracy connect a reference to another ADC input and scale your reading with the reference reading. Taking a large number or readings and averaging them will help. 4 readings should give about one more bit, 16 ...
by chrismas9
Wed Jun 26, 2019 12:27 am
Forum: MicroPython pyboard
Topic: ADC measure negative voltage??
Replies: 23
Views: 735

Re: ADC measure negative voltage??

I think there is a typo in your formula. With 100k resistors you will need a small cap on the ADC input as switched cap ADCs will draw transient current spikes from the inputs. You don't say what MCU you are using but some STM32 ADC pins are completely intolerant of voltages outside supply and GND s...
by chrismas9
Tue Jun 25, 2019 3:10 pm
Forum: MicroPython pyboard
Topic: ADC measure negative voltage??
Replies: 23
Views: 735

Re: ADC measure negative voltage??

I have used the method suggested by @roberthh. Here's how it works. Say you want to measure down to -12V. Make a 5:1 voltage divider, eg 10k and 40k. Connect 10k between Aref (3V3) and ADC input. Connect 40k from ADC input to negative voltage. When Vin = 0V ADCin = 3.3 - (3.3 + 0)/5 = 2.44V. When Vi...
by chrismas9
Mon Jun 03, 2019 11:12 pm
Forum: General Discussion and Questions
Topic: PyBoard Timer Question
Replies: 7
Views: 463

Re: PyBoard Timer Question

If you can't find a software solution you could add an analog switch to select the input (PWM) or output waveform to the same ADC. Just stream the ADC as fast as you want and switch to output after enough time to capture some input cycles. Knowing the sample rate you can calculate the average phase ...
by chrismas9
Tue May 21, 2019 4:11 am
Forum: Other Boards
Topic: [STM32F412RG] porting micropython flash memory problems
Replies: 5
Views: 232

Re: [STM32F412RG] porting micropython flash memory problems

I recently did the F413 port. Unless you need Ethernet consider using it instead, or try using it as a starting point instead of F411. It needed a few changes to the port source files, not just a custom config. For example the generic F4 startup file does not support some interrupt vectors like SPI ...
by chrismas9
Tue May 21, 2019 3:46 am
Forum: Other Boards
Topic: STM32F401CCU6 SUPPORT
Replies: 3
Views: 232

Re: STM32F401CCU6 SUPPORT

MicroPython runs on the L432 with 256k/64k. Have a look at it's linker script and mpconfigboard.h. You will see quite a few features turned off, eg pyblegacy, to make it fit. You might be able to have a 16k filesystem. There is room for 26k in L432 but I doubt you will get 32k. You will need 16k ram...
by chrismas9
Thu Apr 25, 2019 4:50 am
Forum: Hardware Projects
Topic: How to expand the size of spiflash?
Replies: 9
Views: 527

Re: How to expand the size of spiflash?

The F411 does not have a hardware QSPI controller. You will need to use 1 bit SPI mode with hard or soft SPI. Have a look at STM32L476DISC port for example.