Search found 21 matches

by mvdw
Fri May 22, 2020 9:59 pm
Forum: Programs, Libraries and Tools
Topic: Custom board and ST-Link
Replies: 2
Views: 98

Re: Custom board and ST-Link

Does the board have a pullup resistor on the RESET line?
Yes, that was it! What a dumb mistake. Thanks Dave.
by mvdw
Fri May 22, 2020 11:10 am
Forum: Programs, Libraries and Tools
Topic: Custom board and ST-Link
Replies: 2
Views: 98

Custom board and ST-Link

I have a custom board based on the STM32F767 to which I have ported micropython. I load my program using the ST-Link dongle, which I have working in both SWD and also JTAG modes. My problem is that whenever I reset the board, if the ST-Link cable is not plugged in it will not start. Even the main.py...
by mvdw
Fri May 08, 2020 9:00 pm
Forum: Development of MicroPython
Topic: SPI Basics - Custom Board
Replies: 0
Views: 134

SPI Basics - Custom Board

I have ported micropython to my board based around an STM32F767 chip, and am having trouble getting SPI working. I have enabled SPI4 in my `mpconfigboard.h`file: #define MICROPY_HW_SPI4_NSS (pin_E4) #define MICROPY_HW_SPI4_SCK (pin_E2) #define MICROPY_HW_SPI4_MISO (pin_E5) #define MICROPY_HW_SPI4_MO...
by mvdw
Fri May 08, 2020 7:11 pm
Forum: Development of MicroPython
Topic: Porting to STM32-based custom board
Replies: 5
Views: 232

Re: Porting to STM32-based custom board

Hi Jimmo: Sorry but I don't know where to submit the patch directly, so here is the patch in unified diff format: ports/stm32/led.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ports/stm32/led.c b/ports/stm32/led.c index 923171884..e0ca89a55 100644 --- a/ports/s...
by mvdw
Fri May 08, 2020 7:15 am
Forum: General Discussion and Questions
Topic: Production Code for Custom Board
Replies: 7
Views: 330

Re: Production Code for Custom Board

I don't have anything useful to add, except that I am just starting my journey into using micropython on my own custom board. Can you please give pointers or web links to how to precompile your python and add it to the file system image? I don't care at this stage for the production deployment but i...
by mvdw
Wed May 06, 2020 9:08 am
Forum: Development of MicroPython
Topic: Porting to STM32-based custom board
Replies: 5
Views: 232

Re: Porting to STM32-based custom board

I've now edited my pins.csv file, and it seems like the board is working (I can toggle my LEDs, and I have a REPL). So, super progress in less than a day! Anyway, I also had to edit leds.c as my board has 6 LEDs rather than the maximum of 4 allowed by the original source. It was a very easy fix! Hap...
by mvdw
Wed May 06, 2020 8:04 am
Forum: Drivers for External Components
Topic: RS485 driver
Replies: 1
Views: 160

RS485 driver

I am developing on a board with RS485 line drivers; these are half duplex where the direction is controlled by a DE pin. This is easy to configure iun STM32Cube IDE, but how do I translate this into micropython? I'm thinking that it may be possible to subclass the uart class with the extra DE pin fu...
by mvdw
Wed May 06, 2020 7:58 am
Forum: Development of MicroPython
Topic: Porting to STM32-based custom board
Replies: 5
Views: 232

Re: Porting to STM32-based custom board

My board has an SD Card, on the SDMMC2 port. Micropython fails to build with the defines for the pins as: #define MICROPY_HW_SDMMC2_CK (pin_D6) #define MICROPY_HW_SDMMC2_CMD (pin_D7) #define MICROPY_HW_SDMMC2_D0 (pin_G9) #define MICROPY_HW_SDMMC2_D1 (pin_G10) #define MICROPY_HW_SDMMC2_D2 (pin_G11) #...
by mvdw
Wed May 06, 2020 7:45 am
Forum: Development of MicroPython
Topic: Porting to STM32-based custom board
Replies: 5
Views: 232

Re: Porting to STM32-based custom board

So it turns out that even though I don't have the 32kHz clock I still need to set the LSE_VALUE in my board, otherwise the compiler complains.

I have successfully compiled to a REPL on my serial port!!! Happy days!

Now I should be able to develop the rest of the app much faster.
by mvdw
Wed May 06, 2020 7:33 am
Forum: Development of MicroPython
Topic: Porting to STM32-based custom board
Replies: 5
Views: 232

Porting to STM32-based custom board

I am trying to port micropython to my own board which has an STM32F767 on board. The issue I'm having is that my board does not have an LSE oscillator on board, only a 24MHz HSE. Micropython by default uses the LSE 32kHz oscillator to generate the baud rates, but this is not necessary in the general...