Release 4.0.0 - F4 USB device support
Release 4.0.0 marks a major milestone in the development of stm32plus because we now support the USB peripheral in device mode on the F4 series of MCUs. Device mode means that your F4 operates as a peripheral device when connected to a host such as a PC.
- The onboard full speed PHY (12Mb/s) is the only supported PHY. The external ULPI PHY (480Mb/s) is not yet supported.
- The supported device classes are HID, CDC and MSC.
There are a number of new examples that demonstrate the use of the USB peripheral. They're all designed to run out-of-the-box on the popular F4 discovery board so you should be able to get up and running really quickly.
usb_device_cdc_com_port creates a virtual COM port that allows you to talk to your discovery board down the USB cable just as if it were an old style serial port. If you were thinking of using one of those FTDI USB-to-serial converters in your project then this technique just saved you a few dollars.
usb_device_hid_custom_adc shows how to create a HID device that periodically sends back small packets of data to the host. In this example we use the ADC peripheral to do conversions and send back the results to the PC. Real-world examples might be environment monitoring, for example temperature or weather.
usb_device_hid_keyboard shows how to configure a HID device as a keyboard. Our example illustrates how to send back keystrokes to the host as well as to receive LED indicator change updates from the host.
usb_device_hid_mouse creates a wacky mouse out of your F4 discovery board. The built-in accelerometer is used to move the cursor around the screen.
usb_device_msc_internal is a mass-storage device example. A small FAT12 filesystem is compiled into the hex
file that you flash to the F4. When you connect up the F4 to the PC the filesystem is mounted and you can open and view a few sample files.
usb_device_msc_sdcard is the canonical mass storage example and demo's the killer feature of the mass storage device class, that is the ability to hook up an SD card and use it as a disk drive storage device. This is not a standalone example - you'll need to hook up an SD card to your F4 to use it.
In addition to this major new feature there are a number of small features and bug-fixes.
Added the SemiHosting class and example: #80
Semi-hosting is a bad name for a great feature. It allows you to output debug strings from your running firmware to the console of the attached debugger. That means that if you're debugging in Eclipse and are using OpenOCD to connect to your board then you'll see strings output in your OpenOCD terminal window. There's an example to show you how to use it. Thanks to @joac for contributing this code.
Spi: add single byte/half-word send: #88
This new feature allows you to easily send single bytes to the SPI peripheral. Thanks to @punkkeks for this contribution.
Fix FMC #89
This is a small bug fix that fixes usage of the FMC peripheral on the F429 series.