Skip to main content
Karl Yamashita
Principal
May 14, 2026
Question

Firmware package bug with UART and DMA in STM32Cube FW_G0 V1.6.3

  • May 14, 2026
  • 1 reply
  • 232 views

There is a bug in the FW package V1.6.3 where the UART and DMA doesn't work correctly.

I've been using FW package V1.6.2 for awhile with UART in DMA circular mode and it has never had an issue.

 

I've recently made a copy of the project to make an A and B comparison because we needed to make some subtle changes. I migrated to the latest FW Package V1.6.3 for the B project.

With V1.6.3, when receiving a string command, i only receive a few character from the beginning of the string and the last few characters from the end of the string. A bunch of characters are missed from the middle of the string. 

 

I decided to go back to FW package V1.6.2 in CubeMX because that is the only thing that really changed and generated the code. The project works correctly.

 

What i see in V1.6.3 are a lot of missing huart->TxXferCount = 0U; and huart->RxXferCount = 0U;  throughout the stm32g0xx_hal_uart.c file compared to V1.6.2

In WinMerge you can see in the left column a bunch of differences, mostly the missing huart->TxXferCount and huart->RxXferCount

  

KarlYamashita_0-1778722634952.png

 

WinMerge also shows in folder mode, a lot of the HAL drivers have changed. 

 

1 reply

Technical Moderator
May 14, 2026

Hello @Karl Yamashita 

To help us investigate the issue more effectively, could you please provide a few additional details?

  • Could you describe the exact scenario in which the issue occurs?
  • Which device is transmitting the UART data to the MCU?
  • Could you please confirm the exact MCU part number being used?
  • If possible, could you also share a minimal example project that reproduces the issue on your side?
"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.Saket_Om"
Karl Yamashita
Principal
May 14, 2026

I'll have to provide a stripped down version of working project later. But for now...

I send this command through a USB-Serial adapter "set i2c address:4, 0x30, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45,0x46,0x47"

I reply back what the buffer received from the DMA which is "set i2c x45,0x46,0x47" so the string in the middle is missing "address:4, 0x30, 0x40, 0x41, 0x42, 0x43, 0x44, 0"

This happens on a custom board using a STM32G071RB on USART2 and also on a NUCLEO-G071RB using FW Package V1.6.3.

When using FW Package V1.6.2 on custom board or NUCLEO, I have no issues.

 

I'm using HAL_UARTEx_ReceiveToIdle_DMA with Size = 16. So it seems something happens during Half Complete Callback after i get the first 8 characters correctly.

 

 

 

 

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source