Author Topic: Memory selection for STM32F205RG  (Read 1017 times)

0 Members and 1 Guest are viewing this topic.

Offline trungosuTopic starter

  • Contributor
  • Posts: 14
  • Country: us
Memory selection for STM32F205RG
« on: March 21, 2018, 03:06:04 pm »
Hi,

I want to build a data logger and I want to use an micro usb to access the data in memory.
Looks like the options are Flash memory, EEPROM or NAND memory but I could not find any information about how to access it from micro usb.
Imagine something like a phone when I plug a usb cable with pc, I could access some media folder.

Thank you very much.
« Last Edit: March 21, 2018, 03:15:21 pm by trungosu »
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2300
  • Country: gb
Re: Memory selection for STM32F205RG
« Reply #1 on: March 21, 2018, 03:35:56 pm »
Lots of examples on the web e.g.:

http://www.keil.com/download/docs/362.asp

Try search terms:
mass storage device microcontroller
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Memory selection for STM32F205RG
« Reply #2 on: March 21, 2018, 08:16:31 pm »
This means you need two parts: to store the data and to get the data. That is two separate tasks for the firmware and have to be dealt with separately.

You can store data into some kind of non-volatile memory, like Flash memory, be it bare NAND on FSMC, managed NAND (eMMC or microSD) on SDHC, or NOR on QSPI.

To access the data over USB you need some kind of USB-based protocol. If your data can be treated as files and you don’t mind using a file system (especially on a managed NAND) you can use the USB Mass Storage class, allowing accessing the data as a disk to the computer. For this use case your firmware must unmount the storage device (thus disable datalogging) before allowing the host to access it, or locking the data will be a nightmare.

If you want more flexibility or need to keep the datalogging going even when connected, depending on the bandwidth requirement, you might need your own USB class protocol or use USB Human Interface Device interface. USB HID is capped at 64kbps over Full-Speed though, but it can be programmed more easily using libusbhid across all platforms. For your own custom class protocol libusb is pretty straightforward on all platforms but you need some trickery or deep pockets to allow Windows to load the appropriate driver.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf