Skip to main content
antonius
Associate III
January 9, 2014
Question

How to play wav on STM32F4 Discovery?

  • January 9, 2014
  • 5 replies
  • 771 views
Posted on January 09, 2014 at 01:20

Guys,

How to play wav on STM32F4 Discovery?

If I want to play from USB Key,

I enable :

#define MEDIA_USB_KEY

and how to connect USB flash drive to this board ? with adaptor ? the socket is too small for USB flash drive...

I'm reading ''Getting started...'' now it seems to be a cable ....

Is it reading from my PC or from USB flash drive....? I'm wondering ??

Thanks

    This topic has been closed for replies.

    5 replies

    Tesla DeLorean
    Guru
    January 9, 2014
    Posted on January 09, 2014 at 01:53

    and how to connect USB flash drive to this board ? with adaptor ? the socket is too small for USB flash drive...

    http://www.ebay.com/bhp/micro-b-usb-host-otg-cable

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    antonius
    antoniusAuthor
    Associate III
    January 9, 2014
    Posted on January 09, 2014 at 04:40

    and how can I define :

    #define WAVE_NAME ''0:audio.wav''

    for USB flash drive ?

    thanks

    antonius
    antoniusAuthor
    Associate III
    January 9, 2014
    Posted on January 09, 2014 at 04:58

    I can't play every wav files, what's the limitation ?thanks

    antonius
    antoniusAuthor
    Associate III
    January 9, 2014
    Posted on January 09, 2014 at 05:08

    is it the limit ?

    /* Audio file size and start address are defined here since the audio file is

        stored in Flash memory as a constant table of 16-bit data */

    #define AUDIO_FILE_SZE          990000

    so  I can't play 20Mbytes wav file ?

    Tesla DeLorean
    Guru
    January 9, 2014
    Posted on January 09, 2014 at 05:40

    You have access to the same code and documentation I do. There may well be limits and types of files it can handle (bits, channels, frequencies, etc), or sizes/limits related to the convenience of coding. Some of these might be artificial or arbitrary. I haven't done the analysis.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..