cancel
Showing results for 
Search instead for 
Did you mean: 

Which Cortex-4 STM32 for my "USB (device) & I2C" application?

Terje Bøhler
Associate II

Hi.

I am going to develop a “box�? that shall have a USB port (device) to be connected to a PC for SW downloading (to the “box�?) as well as other two-way PC-to-box communications (a PC for monitoring the “box�? and its contents). We also need one I2C port (master) in addition to a couple ADCs and some GPIO ports. I currently use Keil uV5 and ULINK2. I think I will go for the Cortex-M4 STM32F407 series MCU on my target-HW (guess I could have used STM32F105/107, but I prefer Cortex-M4 to Cortex-M3), because there is a matching development kit “STM32F407G-DISC1 - Development Board, STM32F407 High Performance MCU's, Various Sensors, Develop Audio Applications�?.

It’s a jungle of various tools and associated code out there to solve various problems, so my question is:

• Is my STM32F407 and the specified development kit the “best/recommended way�? to develop (USB/I2C) code for my “box�??

• Are there sufficient example projects and/or initializations code available (where?) for this development kit to support my task (writing code for exchanging information over the USB port/cable...)? 

I really appreciate some recommendations…

BR Terje Bøhler

3 REPLIES 3
KnarfB
Principal III

Hi Terje,

it depends... You might also check the STM32F3DISCOVERY board which comes already with an additional USB connector. The F3 are mixed-signal Cortex-F4 you have up to 4 ADCs + OPVs on-chip.

And, take a look at the smaller NUCLEO-32 boards which might be okay for you. Depending on the USB throughput you may use the virtual COM port (VCP) included in the STLINK debugging interface for all NUCLEO/DISCO boards.

You may download and install the STM32CubeMX code generator which lets you choose MCUs/boards depending on the required features in a GUI tool.

Many examples are bundled with the firmware packages. For the STM32F3DISCOVERY this is STM32Cube_FW_F3_V1.10.0. Download it and check the Projects folder. Enjoy!

Bernie
Associate II

Terje,

I have an open-source project called Raging Distro that has a reference project which runs the RTOS NUFR on the STM32F407 Discovery board. This codebase is as simplified and decoupled (it uses no libraries!) a project as you'll find, but still does all the stuff one needs...like initializing the chip clocks, setting up the interrupts, it does pre-main() initializations, then launches NUFR. This is all tied together in a gcc, CMake-based make system. Uses only free tools. I'm using Seggar+Ozone at the moment, but code should easily drop into any environment, like Keil. Project includes documentation.

https://ragingdist.org

https://bitbucket.org/burnwood/raging-release/src/default/

Bernie

Piranha
Chief II

The choice seems to be appropriate. By the way, the old F1 series is not suggested for new developments, as it's quite different and more limited than other series. F2 is OK, but that is also Cortex-M3. If You need Cortex-M4, then also take a look at F3 and definitely the new G4 series.