SAI IO on pins from SAI example
Hi,
I am trying to change the SAI IO pins on the STM32F769_Discovery board using the SAI example.
I would like to point the defined SAI block to arduino pins on the Discovery board so I can view them on the scope.
I get nothing on the scope with changes in code below.
Before the changes I am getting audio playback from the .bin file.
There is no error thrown from setup of the SAI.
Can someone help me understand why the SAI example doesn't change 'UpdatePointer' in the callbacks HAL_SAI_TxCpltCallback or HAL_SAI_TxHalfCpltCallback when I change the SAI pins from the codec to external pins?
or in other words the code waits here and never gets a callback.
/* Wait a callback event */
while(UpdatePointer==-1);Is the code expecting an interrupt from wm8994 or something that i'm missing ?
/* SAI peripheral configuration defines */
#define AUDIO_SAIx SAI1_Block_A#define AUDIO_SAIx_CLK_ENABLE() __HAL_RCC_SAI1_CLK_ENABLE()
#define AUDIO_SAIx_FS_GPIO_PORT GPIOF // GPIOE
#define AUDIO_SAIx_FS_AF GPIO_AF6_SAI1#define AUDIO_SAIx_FS_PIN GPIO_PIN_6 // GPIO_PIN_4 //#define AUDIO_SAIx_SCK_GPIO_PORT GPIOF // GPIOE //
#define AUDIO_SAIx_SCK_AF GPIO_AF6_SAI1#define AUDIO_SAIx_SCK_PIN GPIO_PIN_7 // GPIO_PIN_5 //#define AUDIO_SAIx_SD_GPIO_PORT GPIOF // GPIOE //
#define AUDIO_SAIx_SD_AF GPIO_AF6_SAI1#define AUDIO_SAIx_SD_PIN GPIO_PIN_10 // GPIO_PIN_6 //#define AUDIO_SAIx_MCLK_GPIO_PORT GPIOA // GPIOG //
#define AUDIO_SAIx_MCLK_AF GPIO_AF6_SAI1#define AUDIO_SAIx_MCLK_PIN GPIO_PIN_6 // GPIO_PIN_7 // #define AUDIO_SAIx_MCLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() // __HAL_RCC_GPIOG_CLK_ENABLE() // #define AUDIO_SAIx_SCK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() // __HAL_RCC_GPIOE_CLK_ENABLE() //#define AUDIO_SAIx_FS_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() // __HAL_RCC_GPIOE_CLK_ENABLE() // #define AUDIO_SAIx_SD_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() // __HAL_RCC_GPIOE_CLK_ENABLE() //