cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5 LPDMA: Standard Request versus Linked-List mode

coppercrimp
Senior

I'm trying to find the best approach to accomplish the following: Read audio samples from a digital microphone using the ADF1 peripheral and use the LPDMA controller to store those samples in a SRAM4 buffer. An interrupt or event should occur when the buffer is half full and full. I'd like the LPDMA operation to be circular so I don't have to re-initialize it after every buffer write. Performing this task using as little power as possible is important, so the microcontroller should enter STOP2 mode while filling the buffer

It seems there are two ways to configure an LPDMA channel in CubeMX: Linked List and Standard Request Mode. As a side note, there is no mention of Standard Request Mode in the reference manual, but there is something called Direct Programming Mode mentioned. I assume these are different names for the same thing

Getting back to my question: Which is the best mode to use for achieving the above goal? Linked-List or Standard Request mode? I initially thought Standard Request mode would be best, since I'm not trying to execute a complex set of actions while in Stop2. However I'm unable to get Standard Request mode to work in Stop2 and so far I haven't seen any example code showing how this would work. Does Standard Request Mode even work in Stop2?

Thanks in advance for your help

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @coppercrimp

Referring to the RM, ADF1 is indeed one of the autonomous peripherals, i have submitted an internal ticket to add it in the LPBAM function toolbox (Internal ticket number 212491).

For the example, I don't think there is a ready to use example using ADF yet! 

All available references for LPBAM usage are grouped in the shared wiki!

I will keep you updated with the ticket's status!  

Edit: 

There is an example firmware available that demonstrates how to use the ADF in STOP2 mode (equivalent to LPBAM but without the reconfiguration in low power mode). The firmware example can be found under Firmware\Projects\B-U585I-IOT02A\Examples\MDF\ADF_AudioSoundDetector path.

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

6 REPLIES 6
Sarra.S
ST Employee

Hello @coppercrimp 

Standard Request Mode works in STOP2 mode as the ADF1 and LPDMA1 peripherals are autonomous and can access SRAM4 in this low-power state (accessing SRAM4 is usually the constraint, SRAM4 should be assigned as destination buffer); check table 100 "Functionalities depending on working mode" in RM for ADF, LPDMA availability in stop2 mode.

However, the use case you're describing is a typical LPBAM use case

  • Both ADF1 and LPDMA1 are autonomous peripherals: can request their own kernel clock and system clock when needed.
  • You need to operate in stop2 mode

For reference, and if you're not familiar with LPBAM i U5, check this AN: How to build a LPBAM application on STM32U5 MCUs using STM32CubeMX - Application note

And wiki.st.com/stm32mcu/wiki/Getting_started_with_LPBAM  

Hope that helps!

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

coppercrimp
Senior

Hello Sara,

Thanks for the advice and information. I'd like to use LPBAM for my application, except there isn't much information on how to get ADF1 working in a LPBAM application. And ADF1 is the one peripheral that is still missing in the CubeMX LPBAM Scenario and Configuration editor. Do you know if there are plans to integrate ADF1 into the LPBAM configurator? This has been asked about several times over the years but for some reason ADF1 is always left out. See following thread:

https://community.st.com/t5/stm32cubemx-mcus/stm32u5-adf-in-lpbam-mode/m-p/79240

Does ST have any example code showing how to get ADF1 working in LPBAM?

Best regards

Hello @coppercrimp

Referring to the RM, ADF1 is indeed one of the autonomous peripherals, i have submitted an internal ticket to add it in the LPBAM function toolbox (Internal ticket number 212491).

For the example, I don't think there is a ready to use example using ADF yet! 

All available references for LPBAM usage are grouped in the shared wiki!

I will keep you updated with the ticket's status!  

Edit: 

There is an example firmware available that demonstrates how to use the ADF in STOP2 mode (equivalent to LPBAM but without the reconfiguration in low power mode). The firmware example can be found under Firmware\Projects\B-U585I-IOT02A\Examples\MDF\ADF_AudioSoundDetector path.

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi Sarah,

Thanks for your help and pointing out the firmware example. I had not noticed that example previously, and it looks like it could be helpful. I'll accept your answer as the solution and open a new topic if I need additional assistance. It would be great if the CubeMX developers could add the ADF functionality to the LPBAM configurator however

Sarra.S
ST Employee

Hello again @coppercrimp

After double checking, the ADF issue has been fixed since CubeMX version 6.12.0. 

I've tested it on version 6.14 and it works on my end: 

SarraS_0-1750325043630.png

Could you confirm this on your end? 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi Sarra,

I'm also using version 6.14 and can see the settings screen you shared. However, I was specifically referring to the "LPBAM Scenario & Configuration" tab and the "LPBAM function toolbox" (see screenshot). Every LPBAM example I've seen instructs you to build a scenario queue by selecting peripherals in the LPBAM function toolbox. But the ADF and MDF peripherals are missing from this toolbox

LPBAM.jpg