cancel
Showing results for 
Search instead for 
Did you mean: 

The LPBAM scenario fails to be created after the HAL update.

stef333
Associate

 

Hi everyone,

We're experiencing an issue with LPBAM after the latest HAL update. We initially reported the problem on the STMicroelectronics GitHub , but after two weeks without any response or activity, we decided to seek help here.

In the following text, we will try to provide a explanation of the issue we're facing, along with the steps we've taken so far in an attempt to find a solution. Any insights or suggestions would be greatly appreciated.

 

Setup Description:
We used a circular LPBAM setup involving
LPDMA, LPADC, LPTIM, and LPGPIO peripherals.

Bug Description:
As stated in the title, the LPBAM application
scenario fails to be successfully created after
updating the STM32U5 HAL from v1.5.0 to  v1.6.1  (Update of STM32CubeU5 MCU Firmware Package to  v1.7.0).

Steps to Reproduce:
Initializing the LPBAM circular application.

Expected Behavior:
The LPBAM circular application should be successfully created.

Observed Behavior:
The LPBAM application fails to be created successfully, showing an error
indicating that the node cannot be found when setting LPBAM circular mode
to a linked-list queue based on the selected descriptor and node level.

Call hierarchy to error:
- LPBAM_Status_t ADV_LPBAM_Q_SetCircularMode(...)
- HAL_DMAEx_List_SetCircularModeConfig(...)
- DMA_List_FindNode(...)
- if (currentnode_address != ((uint32_t)pNode & DMA_CLLR_LA))

Additionally, an interesting observation is that when compiler
optimizations are enabled (tested with size optimization and debug optimization),
the function ADV_LPBAM_Q_SetCircularMode(...) returns an error.
However, when optimizations are disabled, the function does not return
an error, but the result remains the same—the LPBAM peripherals mentioned
above do not function as expected.

Additional Explanation:
If we move ADV_LPBAM_Q_SetCircularMode immediately after setting
the node as the start of the circular linked list, the function
successfully finds the node and sets it as the start of the list.
However, we still encounter issues with other LPBAM peripherals
used in this application.

During debugging, we identified a few lines of code that were
modified between HAL versions and appear to introduce this issue.
When these lines are commented out, everything functions as expected.
We would like to clarify their exact purpose.

Problematic Lines:
- File: stm32u5xx_hal_dma_ex.c
- Function: DMA_List_BuildNode(...)
- Lines:  3902-3912
- Specific case affecting us:  [3911: pNode->LinkRegisters[NODE_CLLR_LINEAR_DEFAULT_OFFSET] = 0U;] 

While it's clear that these lines were added to reset the node during
initialization, could it be possible that the previous node in the
linked list is being overwritten during the creation of the circular
LPBAM application?

 

Thanks in advance.

0 REPLIES 0