Skip to main content
Associate
November 14, 2023
Solved

X-Code Audio Problem

  • November 14, 2023
  • 1 reply
  • 2612 views

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?

This topic has been closed for replies.
Best answer by Bills

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

1 reply

Technical Moderator
November 21, 2023

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?

 

 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
BillsAuthor
Associate
November 21, 2023

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.

Technical Moderator
November 21, 2023

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.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks