2022-02-18 02:56 AM
With the HAL on an STM32U5 nucleo i can
HAL_SAI_DMAPause()
HAL_SAI_DMAResume()
HAL_SAI_DMAStop()
HAL_SAI_Receive_DMA()
HAL_SAI_Transmit_DMA()
Wouldn't it make sense to have a
HAL_SAI_DMAStart()
?
With this nomenclature i don't have a clue how to tx/rx data to/from an audio device. Where can i find an official, minimal reproducible example utilizing either the receive-function or the rxCompleteCallbacks?
Solved! Go to Solution.
2022-02-18 04:06 AM
HAL_SAI_DMAStart() - start what, RX or TX? ;)
A look into these functions might help...
HAL_SAI_Receive_DMA() starts receiving data, means you have an ADC connected,
HAL_SAI_Transmit_DMA() starts transmitting data, means you have a DAC connected.
I guess you're using CubeMX, so check the local repo (C:\Users\"user name"\STM32Cube\Repository) for examples.
I don't know the STM32U5, but I guess it's very similar most other SAIs, there's some info and tutorials out there.
And in case of doubt, Always read the reference manual!
2022-02-18 04:06 AM
HAL_SAI_DMAStart() - start what, RX or TX? ;)
A look into these functions might help...
HAL_SAI_Receive_DMA() starts receiving data, means you have an ADC connected,
HAL_SAI_Transmit_DMA() starts transmitting data, means you have a DAC connected.
I guess you're using CubeMX, so check the local repo (C:\Users\"user name"\STM32Cube\Repository) for examples.
I don't know the STM32U5, but I guess it's very similar most other SAIs, there's some info and tutorials out there.
And in case of doubt, Always read the reference manual!
2022-02-18 04:33 AM
Alright, found out that calling either HAL_SAI_T/R_DMA() once with the circular mode on acts exactly as i would have imagined a HAL_SAI_DMAStart() to work. It triggers the half- and complete callbacks and fills the buffers autonomously, thank you. I don't understand your mentioning of an ADC or DAC, the SAI is most commonly used with I2S or PCM, both have nothing to do with neither ADC nor DAC (?)