possible error in stm32_ll_lpbam.c
@MKISTM đang làm issue này rồi.
Từ ngày 8/5/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
LPBAM_Status_t LPBAM_LPTIM_FillNodeConfig(LPBAM_LPTIM_ConfNode_t const *const pConfNode,
DMA_NodeConfTypeDef *const pDMANodeConfig)
{
LPBAM_Status_t status;
LPBAM_InfoDesc_t desc_info;
...
in stm32_lpbam_lptim.c leaves desc_info uninitialized and calls
LPBAM_Status_t LPBAM_LPTIM_FillStructInfo(LPBAM_LPTIM_ConfNode_t const *const pConfNode,
LPBAM_InfoDesc_t *const pDescInfo)
in stm32_ll_lpbam.c with reference to desc_info.
While LPBAM_LPTIM_FillStructInfo does not set pDescInfo->Request in case of LPBAM_LPTIM_CONFIG_ID with pConfNode->Config.State != ENABLE and pConfNode->Config.Mode != LPBAM_LPTIM_UE_MODE as it can be seen in the following code snippet.
...
/* Check node ID */
switch (pConfNode->NodeDesc.NodeInfo.NodeID)
{
/* LPBAM LPTIM Update Period node ID */
case LPBAM_LPTIM_CONFIG_ID:
{
/* Get control register value */
dummy = pConfNode->pInstance->CR;
/* Check LPTIM state */
if (pConfNode->Config.State == ENABLE)
{
/* Set LPTIM update event request */
pDescInfo->Request = DMA_REQUEST_SW;
/* Set LPTIM state */
dummy |= LPTIM_CR_ENABLE;
/* Check LPTIM start mode update */
if (pConfNode->Config.UpdateStartMode == ENABLE)
{
if (pConfNode->Config.StartMode == LPBAM_LPTIM_START_SINGLE)
{
/* Configure LPTIM to start in single mode */
dummy |= LPTIM_CR_SNGSTRT;
}
else
{
/* Configure LPTIM to start in continuous mode */
dummy |= LPTIM_CR_CNTSTRT;
}
}
}
else
{
/* Set LPTIM state */
dummy &= ~(LPTIM_CR_ENABLE);
/* Check LPTIM mode */
if (pConfNode->Config.Mode == LPBAM_LPTIM_UE_MODE)
{
/* Check LPTIM instance */
if (pConfNode->pInstance == LPTIM1)
{
/* Set LPTIM1 update event request */
pDescInfo->Request = LPDMA1_REQUEST_LPTIM1_UE;
}
else
{
/* Set LPTIM3 update event request */
pDescInfo->Request = LPDMA1_REQUEST_LPTIM3_UE;
}
}
}
/* Set value to be written */
*pConfNode->NodeDesc.pSrcVarReg = dummy;
/* Set DMA source address */
pDescInfo->SrcAddr = (uint32_t)pConfNode->NodeDesc.pSrcVarReg;
/* Set DMA destination address */
pDescInfo->DstAddr = lptim_descitem_tbl[pConfNode->NodeDesc.NodeInfo.NodeID].RegOffset +
(uint32_t)pConfNode->pInstance;
/* Set DMA data size */
pDescInfo->DataSize = lptim_descitem_tbl[pConfNode->NodeDesc.NodeInfo.NodeID].RegDataSize;
break;
}
....
Later code uses Request leading to undefined behavior. The fix that worked for me was adding
...
else
{
pDescInfo->Request = DMA_REQUEST_SW;
/* Set LPTIM state */
dummy &= ~(LPTIM_CR_ENABLE);
...
essentially this problem occurred when adding a lptim stop node with "not from update event detection" in cubemx lpbam scenario.
- Ngôn ngữ chính
- C
- Star
- 184
- Fork
- 94
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của STMicroelectronics/STM32CubeU5
-
LPBAM I2C MasterTx silently writes wrong SADD on bus (STM32CubeU5)Có thể làm lại được @MKISTM đã nhận 173 ngày trước và không có pull request nào đang mở. Đang mởbug cube mx internal bug tracker lpbam
STMicroelectronics/STM32CubeU5#68 · 3 bình luận · 1 người được giao ·
Tất cả issue của STMicroelectronics/STM32CubeU5
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
elf_loader: Xtensa ignores the addend of R_XTENSA_GLOB_DAT / R_XTENSA_JMP_SLOT (C++ vtables)Có thể đã có người làm @diplfranzhoepfinger đã nhận hôm nay. Đang mởelf_loader
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
espressif/esp-iot-solution#813 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Status: Opened Type: Bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày