siteidentity.blogg.se

Nucleo f401re usbdevice
Nucleo f401re usbdevice












  1. NUCLEO F401RE USBDEVICE DRIVER
  2. NUCLEO F401RE USBDEVICE CODE

In this case the USB peripheral behaves as USB HOST. You can also use it to read contents of a flash drive (thumb drive) connected to USB interface of the STM32F401RE. The storage media is a SD (or microSD) card connected with SDIO peripheral. With this demo, you can use your Nucleo board as a Mass Storage Device that shows on your PC as a removable flash drive. You will find the complete demo in my GitHub repository: This demo is a Cocoox COIDE 1.7.7 project using ARM GCC. Without this modification the USB host lib never enumerate the connected flash drive.

  • The modification in USB host core state machine proposed by Michele in this forum.
  • His USB MSC device demo is posted in this forum.

    NUCLEO F401RE USBDEVICE DRIVER

  • Clive1 stm32F4 discovery SDIO driver with modification to support cards with capacity larger than 4GB.
  • Tilen Majerle RTC library to use the internal RTC of the microcontroller ( link here).
  • Tilen Majerle FATFS and SDIO interface for SD card ( link here).
  • All these resources where very helpful and I would like to thank the authors for sharing their knowledge:

    NUCLEO F401RE USBDEVICE CODE

    Nevertheless, in order to make it work the way I wanted to, I merged several pieces of code from several places. The USB library from ST is the "core" of this demo. Beneath the Nucleo board is the SD card socket. Overview of the breakout board with USB connector. You can also use the FATFS to access the SD card.

    nucleo f401re usbdevice

    That is, if you connect a USB flash drive, you can access its contents using the FATFS library. The code also works as a HOST for Mass Storage Devices. That is, in DEVICE mode, your Nucleo will become a generic USB storage device when connected to the USB port of your computer. So, this post is about of programming a Nucleo-F401RE board to use the STM32F401RE USB peripheral as a DEVICE Mass Storage Class with SDCARD (connected with 4bit SDIO interface) as the media. Most of the codes you will find spread in other examples and libraries. I believe that (at least these days) you will not find another internet site with all the stuff I'm posting here in one place.

    nucleo f401re usbdevice

    This post is a result of several hours of hard work, thinking, planning, trial-and-error, debugging, and searching the internet for working code in order to make the USB peripheral of a STM32 act as an USB device (mass storage) and HOST (mass storage too).














    Nucleo f401re usbdevice