Skip to main content
Explorer
January 21, 2025
Question

Porting Audio playback and record code from STM32F4 to STM32H5 Nucleo board

  • January 21, 2025
  • 2 replies
  • 1114 views

I would like to build the Audio playback and record example code of STM32F4 controller to STM32H5 controller. Could you please help me with feasible method to make it work. I am planning to use same driver code and middleware code of STM32F4. I have more concern about USB pins. So far i verified USB_DP and USB_DM pins are same for both STM32F4 and STM32H5. Is this enough for USB protocol to work without any problem or should i need to handle USB_ID pin also?

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    January 21, 2025

    Hello @Nagarajan ,

    I advise you to have a look at this application note AN5688 which provides guidelines on both hardware and peripheral migration from STM32F4 to STM32H573/563 and STM32H562 MCUs.

    Make sure that your STM32H5 board supports the required audio features.

    ImenD_0-1737466875953.png

    Super User
    January 21, 2025

    Before starting to port it, have you got it working on the STM32F4-Discovery board?

    Porting is always soooo much easier when you have a good, working reference to start from...

     


    @Nagarajan wrote:

    I have more concern about USB pins


    So start with a simpler project that does just  USB - get that working before the added complications of the audio!

    Again, starting from a good, known-working reference makes this easier

    NagarajanAuthor
    Explorer
    January 21, 2025

    Yeah, i made it work on the STM32F407-Discovery board.

    I am first planning port recording part alone. i have clear idea on I2S Audio communication but i dont have any idea porting USB code. Also Main difference is STM32F4 has micro-USB but STM32H5 has USB type-C. I am not sure same driver code for data transfer will work for STM32H5 or not.

    Super User
    January 21, 2025

    @Nagarajan wrote:

    I am not sure same driver code for data transfer will work for STM32H5 or not.


    Rather than port it, probably makes sense to just use the proper native driver.

    If you need to, add an interface layer between the driver & the application. Again, model this on the F4 first.