2025-01-21 05:30 AM - edited 2025-01-21 05:46 AM
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?
2025-01-21 05:45 AM
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.
2025-01-21 06:36 AM
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
2025-01-21 07:13 AM
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.
2025-01-21 07:18 AM
@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.