Logging data to USB
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-16 7:54 AM
Posted on September 16, 2016 at 16:54
Hello to everyone,
I am developing an application that reads data from sensors mounted on a STM32L4 discovery board, but since I need to log for hours I need to save data on a big storage support, such as an USB.Is it possible to do so using the microUSB link on the board?I read some posts here suggesting to use the DFU usb profile, but I don't think this is the right case...Has someone some sample code or at least any useful suggestion on how to implement the function I described?Thank you #power #stm32l4 #usb #stm32cube
Labels:
- Labels:
-
STM32Cube MCU Packages
-
STM32L4 series
-
USB
This discussion is locked. Please start a new topic to ask your question.
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-16 10:18 AM
Posted on September 16, 2016 at 19:18
You'd probably want an MSC OTG w/FATFS, the F4 DISCO had a firmware upgrader example that demonstrated the use of USB Sticks to update the board, but could just as easily write files, etc.
Not using the L4 or HAL/CUBE, but I'd presume a similar set of functionality would be workable.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-20 2:48 AM
Posted on September 20, 2016 at 11:48
Thank you clivel,
in fact I've based my program on the stm32f4 FATFS example. The problem that I have is that seems that Vdd pin is not managed, so the usb is not powered (I measured it with a tester and I can see it since USB LED is turned off).If I force that pin to high as a generic IO pin I get only 3V out, which are not sufficient to power on the device.Has someone some suggestions about it?Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-20 3:42 AM
Posted on September 20, 2016 at 12:42
An update:
I managed to correctly handle the Vdd line by acting on PowerSwitchOn pin; now I have almost 5V (really 4.7, there are some losses around...).But since the voltage is sent to USB, a continuous series of interrupts is issued and the program flow is stopped. Any clue?Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-20 4:15 AM
Posted on September 20, 2016 at 13:15I also attach a screenshot where I show the interrupt register: it seems it's the HPRTINT interrupt that is occurring but no library function manages it.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-20 4:32 AM
Posted on September 20, 2016 at 13:32
It seems I got it...
the function that chooses between interrupts seems to do not correctly interprete the connection interrup HPRTINT...More correctly the values that I see from Registers tab in IAR debugger do not agree with value assigned by the function USB_ReadInterrupts: