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?
Solved! Go to Solution.
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.