cancel
Showing results for 
Search instead for 
Did you mean: 

X-Code Audio Problem

Bills
Associate II

Hi,

I am using the Stm32f446RC MCU model for a sound application. I am using the X-Cube Audio library (STM32CubeExpansion_Audio_V1.1.1), which claims to support F4 and F7 versions. I want to control the audio levels using the SVC app, but when I call the svc_reset function, I receive an error with code -7 (SDR_BAD_HW). This issue is not limited to this function, as I encounter the same error in other applications as well. Can you assist me in resolving this problem?

1 ACCEPTED SOLUTION

Accepted Solutions

Yes, using the CRC module macro fixed the issue. I am very grateful to @Imen.D

View solution in original post

4 REPLIES 4
Imen.D
ST Employee

Hello @Bills,

The svc_reset() function is used in SVC library and in BAM library. But SDR_BAD_HW in SDR library only.

What library are you using?

 

 

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hi @Imen.D 
Thank you for replying.
I apologize for my mistake. Instead of 'SVC_BAD_HW,' I mistakenly wrote 'SDR_BAD_HW.' In fact, whether it's SVC or SDR doesn't matter. I am encountering XXX_BAD_HW (-7) errors in other libraries I intend to use. I am using IAR as the IDE and 'SVC_CM4_IAR.a' as the library.

It seems that STM32 CRC Lock inside the library doesn’t “recognize” the STM32F446 MCU.

In the main application before calling svc_reset() function it’s necessary to initialize CRC module.

So, try to initialize CRC module using following macro: __HAL_RCC_CRC_CLK_ENABLE();

In case you have it enabled already, make sure the module is not in use somewhere else.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Yes, using the CRC module macro fixed the issue. I am very grateful to @Imen.D