Skip to main content
AStre
Associate III
February 18, 2020
Solved

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

  • February 18, 2020
  • 4 replies
  • 1201 views

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.
Best answer by AStre

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

Alex

4 replies

waclawek.jan
Super User
February 19, 2020

What problems exactly?

What is PACK?

JW

AStre
AStreAuthor
Associate III
February 19, 2020

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
February 24, 2020

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
February 26, 2020

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

Alex