STM32F3 ports

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
SirYorik
Posts: 2
Joined: Wed May 31, 2017 8:54 am

STM32F3 ports

Post by SirYorik » Wed May 31, 2017 9:15 am

Hello forum. Tell me why there are no ports on stm32f3 (for example stm32f3-discovery with a chip ...f303vct6, 256kb flash, 48kb ram, Cortex M4). Are there special reasons for the impossibility of porting? Flash size? No one needs? etc...

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: STM32F3 ports

Post by dhylands » Wed May 31, 2017 9:22 pm

It should be entirely possible to port MicroPython to the STM32F3 series. It just so happens that nobody has done it yet.

User avatar
Guenther78
Posts: 25
Joined: Fri May 19, 2017 11:48 am

Re: STM32F3 ports

Post by Guenther78 » Thu Jun 01, 2017 11:25 am

Hello,

I wondered also, because I saw MP only for cortex M4 and M7. I thought this is because M4 and M7 have FPU and DSP. But I think it schlould be possible...

Guenther

SirYorik
Posts: 2
Joined: Wed May 31, 2017 8:54 am

Re: STM32F3 ports

Post by SirYorik » Thu Jun 01, 2017 4:44 pm

Watched the guide to porting (https://github.com/micropython/micropyt ... rdware-API). I don't have the skills to do the hw-port. In the folder stmhal\ needs to be filled with files subfolders hal\f3, cmsis, boards\STM32F3DISC, maybe some others.... Sadly, it is easier to buy a card on F4.

romeo
Posts: 25
Joined: Mon Jan 28, 2019 5:57 pm

Re: STM32F3 ports

Post by romeo » Mon Jan 28, 2019 6:00 pm

Hi, any luck with the board?

chrismas9
Posts: 152
Joined: Wed Jun 25, 2014 10:07 am

Re: STM32F3 ports

Post by chrismas9 » Tue Jan 29, 2019 10:11 am

IMO the F3 has been superceded by the F4 and L4. I would not start a new design around an F3. For similar price the F4 or L4 are faster, have more RAM and are better integrated. For example F3 needs 2 transistors and 6 resistors for USB. F4 needs 2 resistors. L4 needs nothing.

There is not likely to be any interest in F2 or F3 except from people with an odd board lying around.

romeo
Posts: 25
Joined: Mon Jan 28, 2019 5:57 pm

Re: STM32F3 ports

Post by romeo » Tue Jan 29, 2019 6:36 pm

I am one of them. I started to adapt the code, but I got stuck at STAcell.py, STM32F303_af.csv and STM32F303.ld.
I copied from STM32F4DISC. Any suggestion for me?

Thanks,
Romeo

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: STM32F3 ports

Post by dhylands » Tue Jan 29, 2019 7:50 pm

Porting the _af.csv file is probably the most difficult part.

I normally copy/paste the table out of the datasheet into a spreadsheet and then do lots of hand massage in a text editor and double check in a spreadsheet program.

If possible, I'd keep the columns the same as say the F4 one.

The pin parser expects underscores to separate the peripheral name and the pin function (i.e. UART6_RX). If there are multiple functions on the same pin, then separate them by slashes.

i.e. SPI1_MISO/I2S1_MCK

The very last column is for ADC so it typically gets entered by hand because it isn't in the AF table from the datasheet.

The pin parser only cares about a subset of the pins:
https://github.com/micropython/micropyt ... py#L11-L21
so only the peripherals mentioned in SUPPROTED_FN and only the function mentioned matter. Anything else is ignored.

romeo
Posts: 25
Joined: Mon Jan 28, 2019 5:57 pm

Re: STM32F3 ports

Post by romeo » Wed Jan 30, 2019 5:33 am

dhylands wrote:
Tue Jan 29, 2019 7:50 pm
Porting the _af.csv file is probably the most difficult part.

I normally copy/paste the table out of the datasheet into a spreadsheet and then do lots of hand massage in a text editor and double check in a spreadsheet program.

If possible, I'd keep the columns the same as say the F4 one.

The pin parser expects underscores to separate the peripheral name and the pin function (i.e. UART6_RX). If there are multiple functions on the same pin, then separate them by slashes.

i.e. SPI1_MISO/I2S1_MCK

The very last column is for ADC so it typically gets entered by hand because it isn't in the AF table from the datasheet.

The pin parser only cares about a subset of the pins:
https://github.com/micropython/micropyt ... py#L11-L21
so only the peripherals mentioned in SUPPROTED_FN and only the function mentioned matter. Anything else is ignored.
Thank you! I will start the process. It only remains the .ld file to figure out!

I'm wondering if I could only duplicate the one for F4 series...

Thanks again,
Romeo

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: STM32F3 ports

Post by dhylands » Wed Jan 30, 2019 7:14 pm

You'd have to compare the datasheets.

The datasheet for the F405 is here: https://www.st.com/resource/en/datashee ... f405vg.pdf The AF table is on pages 62-70

You'd need to find the same table for the F3 part you'll be using and comparing them.

Post Reply