Category: STM32F4 Discovery

USB Flash drive on STM32F4 109

Library 29- USB MSC HOST for USB flash drive on STM32F4

Recently I made a library to read SD cards with FatFs by Chan. Today, I made a new library for USB MSC Host and connect both libraries together, so you can operate with USB flash drives and SD cards simultaneously with STM32F4xx device. USB MSC Host library is a separate library, to handle and do stuff with USB stack. You will also need my FatFS library for SD cards. I will go here step by step, how to configure this...

47

Library 27- Read GPS data on STM32F4 devices

Recently I got a cheap GPS module from ebay, NEO-6M. They said that this is flight controller, but position fix is good only on really flat area. When I made a library, I’ve connected my SDcard to STM32F4 to save data, result are here. To communicate with STM32F4 device, USART is in use. Most GPS modules have by default 9600 baudrate and 1Hz¬†refresh rate of sending data. I got my GPS configured in 115200 baudrate and 5Hz refresh rate, so...

Library 26- Rotary encoder on STM32F4 34

Library 26- Rotary encoder on STM32F4

A rotary encoder, also called a shaft encoder is an electro-mechanical device than converts the angular position or motion of a shaft to an analog or digital. There are 2 types of rotary encoders: Incremental – output indicates just rotation clockwise or counterclockwise Absolute – output indicates current position for encoder For that purpose I made a one simple library. This library works for incremental rotary encoders. It uses an interrupt to handle rotations. On the rotary encoders inside are...

STM32F4 External interrupts tutorial 126

STM32F4 External interrupts tutorial

Each STM32F4 device has 23 external interrupt or event sources. They are split into 2 sections. First interrupt section is for external pins (P0 to P15) on each port, and other section is for other events, like RTC interrupt, Ethernet interrupt, USB interrupt and so on. October 1, 2014: Added external interrupts library. GPIO as Interrupt Interrupt lines I will show now how to configure GPIO pin to be an interrupt and how to handle it in your code with...

AM2301 Temperature and Humidity sensor 18

Library 25- AM2301 (DHT21) sensor for STM32F4

AM2301 or DHT21 is a digital sensor for measure temperature and humidity. It has temperature resolusion up to .1 degree and accuracy to .5 degree celcius. Humidity has .1% resolution and 3% accuracy. This is quite good. Library Features Read temperature from sensor Read humidity from sensor Dependencies CMSIS STM32F4xx STM32F4xx RCC STM32F4xx GPIO TM TM DELAY TM GPIO defines.h

Library 24- Virtual COM Port (VCP) for STM32F4 480

Library 24- Virtual COM Port (VCP) for STM32F4

This library provides Virtual COM port on USB OTG. This means, that you don’t need external USB->UART converter (like FTDI) to communicate with computer. STM32F4xx will be seen to computer like COM port. Library can be used on all STM32F4xx devices. It has also features to support STM32F4- and STM32F429 Discovery boards. To use USB with HAL, check my HAL USB library. Library Features Enables USB VCP Works in USB FS mode Default for STM32F4-Discovery board Works in USB HS...