It quite possibility will run as the 2 MCUs are exactly the same except the VG version has double the flash RAM size what may differ is the schematics the the rest of the board e.g both boards have SD card slot and external flash RAM but might be connected to different pins so there will need to be a change to the pin definitions in the micro-python firmware probably best to ask here https://github.com/mcauser/BLACK_F407VElukesky333 wrote: ↑Fri May 31, 2019 11:52 amIs it possible to use the same MicroPython version like for the STM32F407VET6 or does it need further development for this board?OutoftheBOTS_ wrote: ↑Wed May 29, 2019 11:01 pmThe STM32F407 MCUs have 5 UARTS (3 x USART and 2 X UART).
I prefer the STM32F407VGT6 with 1 mb of flash on the MCU and this board has another 16M-BIT of flash on a separate IC and is under $10US https://www.aliexpress.com/item/STM32F4 ... st=ae803_5
I am not sure if anyone has ported MP to this exact board but I know there is ports for STM32F407VET6 black which is the same but with only 512kb RAM on the MCU
Serial - bit banging
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: Serial - bit banging
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: Serial - bit banging
The 2 MCUs are exactly the same just the VG version has double the flash RAM. It is possible that the boards may have some difference in the schematics but at a very quick look they seem to be the same. You can ask on this thread viewtopic.php?f=12&t=3086&hilit=Black+STM32F407VET6 or on github here https://github.com/mcauser/BLACK_F407VElukesky333 wrote: ↑Fri May 31, 2019 11:52 amIs it possible to use the same MicroPython version like for the STM32F407VET6 or does it need further development for this board?OutoftheBOTS_ wrote: ↑Wed May 29, 2019 11:01 pmThe STM32F407 MCUs have 5 UARTS (3 x USART and 2 X UART).
I prefer the STM32F407VGT6 with 1 mb of flash on the MCU and this board has another 16M-BIT of flash on a separate IC and is under $10US https://www.aliexpress.com/item/STM32F4 ... st=ae803_5
I am not sure if anyone has ported MP to this exact board but I know there is ports for STM32F407VET6 black which is the same but with only 512kb RAM on the MCU
-
- Posts: 44
- Joined: Fri Sep 02, 2016 4:07 pm
- Location: Austria
Re: Serial - bit banging
I've got my NUCLEO-F446RE board and it's running with MicroPython v1.11-37 now. ...so far so good...OutoftheBOTS_ wrote: ↑Wed May 29, 2019 11:01 pm...
From the reference manual the STM32F407 supports 9 bit serial by setting the M bit in the UART control register
UART 9.JPG
What is to do to read the serial connection in 9-bit mode?
I tried following code:
Code: Select all
import machine
import ubinascii
u1 = machine.UART(1, 19200)
u1.init(19200, bits=9, parity=None, stop=1)
while True:
d1 = u1.readline()
# d1 = u1.read(1)
if d1 is not None:
print(str(ubinascii.hexlify(d1)))
Code: Select all
OSError: [Errno 5] EIO
How can I set the M bit in the UART control register
-
- Posts: 44
- Joined: Fri Sep 02, 2016 4:07 pm
- Location: Austria
Re: Serial - bit banging
Ok, I've found the mistake...lukesky333 wrote: ↑Thu Jun 13, 2019 1:21 pmWhat is wrong with the code?
How can I set the M bit in the UART control register
Code: Select all
d1 = u1.read(2)
But I still don't see the wakeup bit. How can i do it?
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: Serial - bit banging
Ok I have not yet ever needed to use 9 bit UART so had to do a bit of googling. Seems 9 bit UART on STM32 works by it stores the 9 bits over 2 bytes. The first bytes stores the bottom 8 bits then the second byte stores the 9th bit plus bits reset values of the UART_DR register so you need to use a mask to chop off the unneeded bits in the second byte to get the 9th bitlukesky333 wrote: ↑Thu Jun 13, 2019 3:26 pmOk, I've found the mistake...lukesky333 wrote: ↑Thu Jun 13, 2019 1:21 pmWhat is wrong with the code?
How can I set the M bit in the UART control register
I need to read 2 chars to all 9 bits.Code: Select all
d1 = u1.read(2)
But I still don't see the wakeup bit. How can i do it?
-
- Posts: 44
- Joined: Fri Sep 02, 2016 4:07 pm
- Location: Austria
Re: Serial - bit banging
It was a protocol issue - the other uart connection shows the wakeup bit like expected.OutoftheBOTS_ wrote: ↑Thu Jun 13, 2019 8:05 pm...
Ok I have not yet ever needed to use 9 bit UART so had to do a bit of googling. Seems 9 bit UART on STM32 works by it stores the 9 bits over 2 bytes. The first bytes stores the bottom 8 bits then the second byte stores the 9th bit plus bits reset values of the UART_DR register so you need to use a mask to chop off the unneeded bits in the second byte to get the 9th bit