Skip to main content
AStre
Associate III
Feb 18, 2020 11:07 PM UTC
Solved

Does anybody have an software examples that allow to set up and send data for STM32L496 Serial Audio Interface (I2S)?

Hello,

I've faced some problems with setting up and sending data for STM32L496 Serial Audio Interface (I2S) using HAL functions from the PACK. Could you recommend some software examples or a sequence of actions?

Thanks,

Alex

This topic has been closed for replies.
AStre
AStreBest answer
Associate III
Feb 26, 2020 3:54 PM UTC

Everything works fine now. It just takes some time to make it work.

Alex

4 replies

waclawek.jan
Super User
Feb 19, 2020 3:54 AM UTC

What problems exactly?

What is PACK?

JW

AStre
AStreAuthor
Associate III
Feb 19, 2020 3:20 PM UTC

I use the PACK 2.3.0. for the micro STM32L496 on the Nucleo-L496ZG board.

After SAI1_A initialisation using HAL_SAI_Init(&hsai_BlockA1), I tried to send data using

HAL_SAI_Transmit(&hsai_BlockA1, (u8*)&test_sai, countof(test_sai), HAL_MAX_DELAY).

Everything is supposed to be OK: PLLSAI1, clock selection, settings for SAI1, frame and slot settings, etc.

There is nothing on SAI1_A pins.

Thanks,

Alex

AStre
AStreAuthor
Associate III
Feb 24, 2020 7:26 PM UTC

Hello,

I can set up SAI's pll, frame, slot parameters successfully. Unfortunately, there is some problem with sending data. When I use the function HAL_SAI_Transmit, I can see that FIFO is fully loaded with data, SAI is enabled using __HAL_SAI_ENABLE(hsai), but there is no data on the SD pin. I can see FS and SCK signals.

Does anybody have any ideas what could cause the problem?

Thanks,

Alex

AStre
AStreAuthorBest answer
Associate III
Feb 26, 2020 3:54 PM UTC

Everything works fine now. It just takes some time to make it work.

Alex