2021-04-07 07:46 AM
I work with x-cube-usb UAC and see , that define not exist WHY?
/** @defgroup SAI_Audio_Frequency SAI Audio Frequency
* @{
*/
#define SAI_AUDIO_FREQUENCY_192K 192000U
#define SAI_AUDIO_FREQUENCY_96K 96000U
#define SAI_AUDIO_FREQUENCY_48K 48000U
#define SAI_AUDIO_FREQUENCY_44K 44100U
#define SAI_AUDIO_FREQUENCY_32K 32000U
#define SAI_AUDIO_FREQUENCY_22K 22050U
#define SAI_AUDIO_FREQUENCY_16K 16000U
#define SAI_AUDIO_FREQUENCY_11K 11025U
#define SAI_AUDIO_FREQUENCY_8K 8000U
#define SAI_AUDIO_FREQUENCY_MCKDIV 0U
2021-04-07 08:24 AM
Not sure why it is necessary to look for complexity or reason. I'd hazard that your frequencies are atypical, at least in the MPEG CD/DVD or Telco audio standards I've used in the past.
If it is just taking a numeric value for frequency should it need a define at all? Lot of dsylexic devs who can't transcribe numbers in my experience. The constraining factors here typically are the source clocks, PLLs or divider chains. If the RM says you can free-from these numbers, do so.