Sticky: STM32F3 Boards - Limited support

Limited support for STM32F3 based boards, e.f STM Discovery and Nucleo line
Post Reply
User avatar
RogerClark
Posts: 6719
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Sticky: STM32F3 Boards - Limited support

Post by RogerClark » Wed Apr 29, 2015 10:53 pm

STM32F3 files have been supplied by Frank-Michael Krause.

The API is not as up to date as in the STM F103 files.

I have not looked at the files in detail, or tested them, but they do not appear to be updated much from the original LeafLabs libmaple, for Arduino version 0022

The API is for pre - Arduino 1.0 and doesn't include a lot of functions in the 1.0 API, and the class inheritance will be different in a number of places, most importantly in the Serial class. Specifically Stream.cpp / .h are not present in this port.

Please feel to try the files, and if you have the time, please contact me and I can explain the best method to bring the files up to date (which probably would be 1 to 2 days work)

Funsailor
Posts: 5
Joined: Tue Jul 14, 2015 10:51 am

Re: Sticky: STM32F3 Boards - Limited support

Post by Funsailor » Tue Jul 14, 2015 11:11 am

Hi,
now my STM32F3 Discovery Board is running with Arduino (I used the FHEMDuino project for test. https://github.com/mdorenkamp/fhemduino).
But I have following problem:
I have set the LEDs to test the functions in FHEMduino, so I see the incommig pulses from the 433MHz receiver. It works fine.
But when I connect the user usb for reading out the information from FHEMDuino, the board hang up.

When I disconnet the 433 MHz receiver I can send and receive over the user-usb port (i.e I can send a 'V' for version control and get the right answer, as often as possible)
I use the Maple R3 Driver for the communication port.
Do you have an idea?

victor_pv
Posts: 1607
Joined: Mon Apr 27, 2015 12:12 pm

Re: Sticky: STM32F3 Boards - Limited support

Post by victor_pv » Tue Jul 14, 2015 3:05 pm

Funsailor wrote:Hi,
now my STM32F3 Discovery Board is running with Arduino (I used the FHEMDuino project for test. https://github.com/mdorenkamp/fhemduino).
But I have following problem:
I have set the LEDs to test the functions in FHEMduino, so I see the incommig pulses from the 433MHz receiver. It works fine.
But when I connect the user usb for reading out the information from FHEMDuino, the board hang up.

When I disconnet the 433 MHz receiver I can send and receive over the user-usb port (i.e I can send a 'V' for version control and get the right answer, as often as possible)
I use the Maple R3 Driver for the communication port.
Do you have an idea?
I'm not familiar with the F3 series, but I believe the peripherals are close enough to the F1. So starting from that.
What MCU is used in the F3 discovery?
Is the user usb port connected to an uart or to the STM32 usb peripheral (pa11 and pa12).
If connected to an uart which one?
And finally, what is the 433 receiver connected to?
Make sure the pins and peripherals you use for one and the other won't interfere.

Also in libmaple I understand that serial and USB drivers use interrupts. Are you enabling/disabling or modifying your interrupt settings in your project?

User avatar
RogerClark
Posts: 6719
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Sticky: STM32F3 Boards - Limited support

Post by RogerClark » Tue Jul 14, 2015 10:29 pm

When you say USB is not working, which USB do you mean.

The primary USB interface on the STM Discovery boards is via the STLink chip, but on the Discovery line of boards, this only provides Upload and GDB capabilities, not USB serial ( only the Nucleo range of boards has Serial on the STLink chip as well as having STLink capabilities)

AFIK the other usb port on the Discovery boards was intended for USB OTG, but i dont know how the copy of libmaple in the STM32F3 folder is configured, as you are the first person who has tried to use it.

I have a F3 Nucleo board, but the code in the folder does not work with that board and most people seem to think the F3 is a dead end and have switched to F4 instead,
hence we have put very little effort into it.

Funsailor
Posts: 5
Joined: Tue Jul 14, 2015 10:51 am

Re: Sticky: STM32F3 Boards - Limited support

Post by Funsailor » Wed Jul 15, 2015 3:03 pm

@ victor_pv
@RogerClark
I use the second USB "USB USER" (the Onboard USB of the STM32F3) and set
#define BOARD_HAVE_SERIALUSB
in my project.
I use the first USB for download via STLink.

@ victor_pv
The MCU in the F3 series is cortex M4
The F1 Series used cortex M3
The 433 receiver is connected to PB2.
I use the original files, so I don't change anything on the interrupt settings

@RogerClark
The STM32F3 has only usb device.

See datasheet (DocID023353 Rev 10) page 27:
The STM32F303xB/STM32F303xC devices embed an USB device peripheral compatible with the USB full-speed 12 Mbs. The USB interface implements a full-speed (12 Mbit/s) function interface.

I have a stable communication with the board when I disconnect the 433 receiver.
When I don't use the USB - communication (user usb not connected) the Interrupt is running (I set a LED port On/Off as a copy of the input of PB2)

------------------------------------------------------------------------------------------------------------------------
In the moment I attempt to transfer the project to the KEIL environment, but this is hard stuff.
But with the KEIL environment its posibble to debbug a project.

First result:
:mrgreen:
-> LED On/Off is working!

User avatar
mrburnette
Posts: 1796
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Sticky: STM32F3 Boards - Limited support

Post by mrburnette » Wed Jul 15, 2015 4:30 pm

Funsailor wrote: ------------------------------------------------------------------------------------------------------------------------
In the moment I attempt to transfer the project to the KEIL environment, but this is hard stuff.
But with the KEIL environment its posibble to debbug a project.

First result:
:mrgreen:
-> LED On/Off is working!

Some great work has been done here on using the BMP, BlackMagic Probe, for realtime debugging.
Just one of many: viewtopic.php?f=17&t=26&start=10&hilit=blackmagic


Ray

gbulmer
Posts: 67
Joined: Wed Sep 23, 2015 12:04 am
Location: UK

Re: Sticky: STM32F3 Boards - Limited support

Post by gbulmer » Mon Mar 14, 2016 9:32 am

RogerClark wrote:...

I have a F3 Nucleo board, but the code in the folder does not work with that board and most people seem to think the F3 is a dead end and have switched to F4 instead,
hence we have put very little effort into it.
I like the F3. IMHO it is aimed at different applications than F4.

Folks at LeafLabs were told that it was partly an upgrade, and fix for some of the F103's weaknesses. For example the I2C peripheral seems a bit difficult to get working properly on the F103. (The libmaple I2C was soft for a long time).

The F3 has a Cortex-M4 CPU vs the Cortex-M1 of the 103. So the F3 had the hardware FPU and DSP extensions, the same as the F4.

The F303 have improved peripherals vs 103:
  • SPI with 4-16 bit frames
  • better I2S with separate clock
  • 32bit timers
  • touch sensing support
The F303 also has much better analogue than most of the other STM32 parts:
  • 5 mega-samples/second analogue-to-digital-converters (ADCs)
  • a pair of ADCs can run 'interleaved' to give 10 mega-samples/second ADC.
  • mega-sample/second digital-to-analogue-converters (DACs).
  • programmable gain analogue amplifiers (PGA)
  • comparators, with one input from a DAC.
It also comes in Maple-mini size 48pin packages, and even an Arduino Nano size 32pin package.

So F4 has better throughput, but the F303 is a very interesting part, especially for analogue work.

cassyarduino
Posts: 15
Joined: Tue Nov 08, 2016 12:52 pm
Location: Hungary

Re: Sticky: STM32F3 Boards - Limited support

Post by cassyarduino » Tue Jan 03, 2017 11:55 pm

Hi All!

I modified STM32F3 directory.
I copied more files from STM32F1.
I modified usbserial, and hardwareserial for Abstract print class compatibility.
I tested only with compile, not upload.

Best regards.

Post Reply