STM32F407VET6 Development Board Cortex-M4
STM32F407VET6 Development Board Cortex-M4
Hi guys,
I am new here and today i got my STM32F407VET6 Development Board Cortex-M4.
My OS is Manjaro and i have flashed the board in DFU mode.
Is it possible to use Pycharm IDE for writing the code in it?
I have Debugging tools here at home, but as far as i know Pycharm has no option for send the code trough a debugging tool via USB.
So if i am not wrong i have to save the code on to a sd card and place it on the board? Right?
Is there any IDE for this MicroPython that uses a external debugging tool or a programming board to burn the code on to the chip like Arduino and other IDEs out there.
My most important question is, okey i have got this board now, how and where do i start?
this is the link to my board.
https://github.com/mcauser/BLACK_F407VE
I am new here and today i got my STM32F407VET6 Development Board Cortex-M4.
My OS is Manjaro and i have flashed the board in DFU mode.
Is it possible to use Pycharm IDE for writing the code in it?
I have Debugging tools here at home, but as far as i know Pycharm has no option for send the code trough a debugging tool via USB.
So if i am not wrong i have to save the code on to a sd card and place it on the board? Right?
Is there any IDE for this MicroPython that uses a external debugging tool or a programming board to burn the code on to the chip like Arduino and other IDEs out there.
My most important question is, okey i have got this board now, how and where do i start?
this is the link to my board.
https://github.com/mcauser/BLACK_F407VE
Re: STM32F407VET6 Development Board Cortex-M4
You only need to do the DFU flash of the MicroPython firmware once.
From now on you just need to manage Python files on the filesystem, which you can do either with the command line tools (pyboard.py, rshell, etc), or with a MicroPython aware IDE like Thonny or uPyCraft.
http://docs.micropython.org/en/latest/r ... rd.py.html
From now on you just need to manage Python files on the filesystem, which you can do either with the command line tools (pyboard.py, rshell, etc), or with a MicroPython aware IDE like Thonny or uPyCraft.
http://docs.micropython.org/en/latest/r ... rd.py.html
Re: STM32F407VET6 Development Board Cortex-M4
Thank you for your reply,jimmo wrote: ↑Tue Feb 11, 2020 10:10 pmYou only need to do the DFU flash of the MicroPython firmware once.
From now on you just need to manage Python files on the filesystem, which you can do either with the command line tools (pyboard.py, rshell, etc), or with a MicroPython aware IDE like Thonny or uPyCraft.
http://docs.micropython.org/en/latest/r ... rd.py.html
How do i know the Pins? there is PA pins, PC pins, PO pins, i can only see Pin in the code. how do i give the exact pin? example below
Code: Select all
relay = Pin(5, Pin.OUT)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
Re: STM32F407VET6 Development Board Cortex-M4
If it's the same board as the photo then they're labelled with the CPU names (i.e. PA0, etc).
Code: Select all
p = machine.Pin('PA0', ...)
or
p = machine.Pin.cpu.PA0
p.init(...)
Re: STM32F407VET6 Development Board Cortex-M4
i dont know if this looks right, but i did this in main.py?jimmo wrote: ↑Wed Feb 12, 2020 1:34 amIf it's the same board as the photo then they're labelled with the CPU names (i.e. PA0, etc).
Code: Select all
p = machine.Pin('PA0', ...) or p = machine.Pin.cpu.PA0 p.init(...)
Code: Select all
# Relay Board
# Relay Nr.1
from machine import Pin
import time
p = machine.Pin.cpu.PE0
p.init(...)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.2
import time
p = machine.Pin.cpu.PE1
p.init(...)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.3
import time
p = machine.Pin.cpu.PE2
p.init(...)
relay = Pin(3, Pin.OUT)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.4
import time
p = machine.Pin.cpu.PE3
p.init(...)
relay = Pin(4, Pin.OUT)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.5
import time
p = machine.Pin.cpu.PE4
p.init(...)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.6
import time
p = machine.Pin.cpu.PE5
p.init(...)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.7
import time
p = machine.Pin.cpu.PE6
p.init(...)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.8
import time
p = machine.Pin.cpu.PE7
p.init(...)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
Re: STM32F407VET6 Development Board Cortex-M4
this is from my boot.py filejimmo wrote: ↑Wed Feb 12, 2020 1:34 amIf it's the same board as the photo then they're labelled with the CPU names (i.e. PA0, etc).
Code: Select all
p = machine.Pin('PA0', ...) or p = machine.Pin.cpu.PA0 p.init(...)
Code: Select all
# boot.py -- run on boot-up
# can run arbitrary Python, but best to keep it minimal
import machine
import pyb
pyb.country('US') # ISO 3166-1 Alpha-2 code, eg US, GB, DE, AU
#pyb.main('main.py') # main script to run after this one
#pyb.usb_mode('VCP+MSC') # act as a serial and a storage device
#pyb.usb_mode('VCP+HID') # act as a serial device and a mouse
Re: STM32F407VET6 Development Board Cortex-M4
The ... in p.init(...) was supposed to be where you put the other arguments, like mode and pull.
i.e.
i.e.
Code: Select all
p.init(mode=Pin.OUT)
Re: STM32F407VET6 Development Board Cortex-M4
I cant thank you enough Jimmo, you have thought me more over one night then i learned over 6 months from Arduino!jimmo wrote: ↑Wed Feb 12, 2020 9:22 pmThe ... in p.init(...) was supposed to be where you put the other arguments, like mode and pull.
i.e.
Code: Select all
p.init(mode=Pin.OUT)
Now my code looks like this. is there any example codes for micropython? By the way doas any sesnor or any module work with this boards or do i need specific brand and typ?
Code: Select all
# Relay Nr.1
from machine import Pin
import time
p = machine.Pin.cpu.PE0
p.init(mode=Pin.OUT)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.2
p = machine.Pin.cpu.PE1
p.init(mode=Pin.OUT)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.3
p = machine.Pin.cpu.PE2
p.init(mode=Pin.OUT)
relay = Pin(3, Pin.OUT)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.4
p = machine.Pin.cpu.PE3
p.init(mode=Pin.OUT)
relay = Pin(4, Pin.OUT)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.5
p = machine.Pin.cpu.PE4
p.init(mode=Pin.OUT)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.6
p = machine.Pin.cpu.PE5
p.init(mode=Pin.OUT)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.7
p = machine.Pin.cpu.PE6
p.init(mode=Pin.OUT)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on
# Relay Nr.8
p = machine.Pin.cpu.PE7
p.init(mode=Pin.OUT)
relay.value(0) # to switch it off
time.sleep(2)
relay.value(1) # to switch it on