cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476RG: Issue with communication between the MCU and BQ79656-Q1 AFE

DivyaJayan
Associate III

Hi,

I am working on a custom Battery Management System (BMS) using STM32L476RG as the MCU, interfacing with an external battery monitor AFE (BQ79656‑Q1).

I first validated the MCU hardware and basic firmware by testing the on‑board LEDs and UART communication via test points using USART2. These tests were successful and confirmed that the STM32 configuration and standard UART peripheral are working as expected.

After this initial validation, I started implementing the communication between the STM32 and the AFE. For this communication path, LPUART1 is used, while USART2 remains dedicated only for basic UART testing and debug output.

As part of this implementation, I took a Single Device Read command frame from a reference software design document for a similar AFE and directly programmed the frame transmission in STM32CubeIDE using HAL UART APIs.

While debugging the firmware in STM32CubeIDE, I consistently encounter a “Target not available” issue during execution, particularly when reaching the code related to LPUART‑based communication.

One additional point to note is that the communication interface between the STM32 and the AFE is implemented through an ISO7741DBQR digital isolator, which sits between the MCU UART signals and the AFE communication pins.

I would appreciate any guidance or insights from the community on potential causes for this issue from the STM32 perspective, particularly related to:

  • Differences in configuration or behavior between USART2 and LPUART1 on STM32L4 devices
  • Debugging behavior or clock/low‑power interactions affecting LPUART1
  • Possible issues introduced by using a digital isolator in the UART signal path
  • Best practices for transmitting raw UART frames from STM32 to external AFEs

Thank you in advance for your support and assistance.

 

Regards,
Divya

1 REPLY 1
Saket_Om
ST Employee

Hello @DivyaJayan 

Please refer to the examles below:

STM32CubeL4/Projects/NUCLEO-L496ZG/Examples/LPUART at master · STMicroelectronics/STM32CubeL4

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