Benutzer-Werkzeuge

Webseiten-Werkzeuge


mikropython:mikropython

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige ÜberarbeitungVorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
mikropython:mikropython [2019/01/02 13:59] – [Funktionstest] geier99mikropython:mikropython [2021/10/05 06:46] (aktuell) – [MicroPython] geier99
Zeile 1: Zeile 1:
-====== Mikropython  ====== +====== MicroPython  ====== 
-Ich möchte mic mal kurz mit MicroPython beschäftigen. Deshalb habe ich mir vom Chinesen das unten aufgeführte PBYv1.1 Board welches einen STM32F405 beherbergt gekauft.+Ich möchte mich mal kurz mit MicroPython beschäftigen. Deshalb habe ich mir vom Chinesen das unten aufgeführte PBYv1.1 Board welches einen STM32F405 beherbergt gekauft.
  
 ===== Funktionstest ===== ===== Funktionstest =====
Zeile 32: Zeile 32:
  
  
 +===== Firmware Update =====
 +Brücke zwischen +3V3 und DFU-Pin (boot0) setzen und dann mit USB verbinden.
 +Wenn der Bootloader aktiviert ist leuchten die rote, gelb und blaue LED dunkel.
  
 +Als erstes mal eine Sicherung durchführen (512kByte sollten reichen):
 +<code>
 +Sicherung erstellen mit (Upload):
  
 +dfu-util.exe -a 0 -s 0x08000000:524288 -U test_orig_512k.bin
 +
 +dfu-util 0.9
 +
 +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
 +Copyright 2010-2016 Tormod Volden and Stefan Schmidt
 +This program is Free Software and has ABSOLUTELY NO WARRANTY
 +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
 +
 +Opening DFU capable USB device...
 +ID 0483:df11
 +Run-time device DFU version 011a
 +Claiming USB DFU Interface...
 +Setting Alternate Setting #0 ...
 +Determining device status: state = dfuIDLE, status = 0
 +dfuIDLE, continuing
 +DFU mode device DFU version 011a
 +Device returned transfer size 2048
 +DfuSe interface name: "Internal Flash  "
 +Upload  [=========================] 100%       524288 bytes
 +Upload done.
 +
 +</code>
 +
 +und jetzt die aktuellste Firmware (Stand 02.01.2018) auf spielen:<code>
 +dfu-util.exe -a 0 -D pybv11-20190102-v1.9.4-771-gb33f108cd.dfu
 +
 +dfu-util 0.9
 +
 +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
 +Copyright 2010-2016 Tormod Volden and Stefan Schmidt
 +This program is Free Software and has ABSOLUTELY NO WARRANTY
 +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
 +
 +Match vendor ID from file: 0483
 +Match product ID from file: df11
 +Opening DFU capable USB device...
 +ID 0483:df11
 +Run-time device DFU version 011a
 +Claiming USB DFU Interface...
 +Setting Alternate Setting #0 ...
 +Determining device status: state = dfuIDLE, status = 0
 +dfuIDLE, continuing
 +DFU mode device DFU version 011a
 +Device returned transfer size 2048
 +DfuSe interface name: "Internal Flash  "
 +file contains 1 DFU images
 +parsing DFU image 1
 +image for alternate setting 0, (2 elements, total size = 331280)
 +parsing element 1, address = 0x08000000, size = 14720
 +Download        [=========================] 100%        14720 bytes
 +Download done.
 +parsing element 2, address = 0x08020000, size = 316544
 +Download        [=========================] 100%       316544 bytes
 +Download done.
 +done parsing DfuSe file
 +</code>
 +Das Modul meldet sich dann mit:<code>MicroPython v1.9.4-771-gb33f108cd on 2019-01-02; PYBv1.1 with STM32F405RG
 +Type "help()" for more information.
 +>>></code>
 +
 +Hmm meine modifizierte **main.py** blieb erhalten und wurde nicht zurückgesetzt.
 +
 +**Achtung:** Jetzt funktioniert auch mein standard Terminal wieder, ohne das das Handshaking aktiviert ist. (muss nun wieder entfernt werden).
 +
 +===== SD-Karte  =====
 +Kurzes Beispiel, wie man sich den Inhalt der SD-Karte anschauen kann (root Verzeichnis)<code>
 +import os
 +
 +sd = pyb.SD
 +
 +#sd = pyb.SDCard()
 +
 +os.mount(sd, '/sd')
 +os.listdir('/sd')
 +
 +os.umount('/sd')</code>
 +
 +
 +===== Tipps =====
 +  * STR+E : aktiviert den Paste Modus (das automatische Einrücke wird abgeschaltet)
  
 ===== Links ===== ===== Links =====
   * [[https://micropython.org/|Mikropython]]   * [[https://micropython.org/|Mikropython]]
   * [[https://store.micropython.org/product/PYBv1.1|PYBv1.1]]   * [[https://store.micropython.org/product/PYBv1.1|PYBv1.1]]
 +  * [[https://learn.sparkfun.com/tutorials/how-to-load-micropython-on-a-microcontroller-board/pyboard|Update pybV1.1]]
 +  * [[https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-stm32080.html|DFU-Tools ST - V3.0.6]]
  
mikropython/mikropython.1546437560.txt.gz · Zuletzt geändert: 2019/01/02 13:59 von geier99