cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C092 + X-NUCLEO-PLM01A1: UART TX works intermittently, RX not working on STM32G072, BSP init stuck with old API

Midhul_Pk
Associate II

Hello ST Community,

I am working with ST power line communication (PLC) using the X-NUCLEO-PLM01A1 board.

Hardware setup

  • Transmitter MCU: STM32C092

  • Receiver MCU: STM32G072

  • PLC board: X-NUCLEO-PLM01A1 (ST7580)

Issue description

  1. UART TX from STM32C092 works only intermittently

    • Sometimes data is transmitted correctly

    • Sometimes transmission stops and does not continue

  2. UART RX on STM32G072 is not working

    • No data is received on the receiver side

    • UART hardware and baud rate are verified

  3. Old ST7580 BSP/API issue

    • When using the older ST BSP / API, the code gets stuck during BSP initialization

BSP init does not return and execution halts.

 

What I have checked

  • UART baud rate and configuration on both MCUs

  • GPIO connections (TX, RX, T_REQ, RESET)

  • Power supply to X-NUCLEO-PLM01A1

  • UART interrupt is enabled and callback is called at least once

  • Transmission sometimes succeeds, so wiring is likely correct

 

Questions

  1. Are there any known issues using STM32C0 series with X-NUCLEO-PLM01A1?

  2. Is the old ST7580 BSP compatible with STM32C092 / STM32G072?

  3. Is there a recommended UART handling method (DMA / polling) for continuous ST7580 communication?

  4. Are there any specific timing requirements for T_REQ when transmitting?

  5. Is there a reference project for ST7580 using Cube HAL (new API)?

 

Any guidance or reference examples would be greatly appreciated.

Thank you.

 

6 REPLIES 6
Andrew Neil
Super User

It's not clear what "UART communication" you're talking about here?

Is it:

  • between the two STM32 boards? 
  • between the STM32 boards and something else? 
  • Over the PLC link?

 

A diagram would provide a much clearer description...

 

PS:

Also, what boards are your STM32s on, etc?

 

How to write your question to maximize your chances to find a solution

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Let me clarify the issue more precisely.

I am using two identical setups, each consisting of:

  • One STM32 board

  • One X-NUCLEO-PLM01A1 (ST7580 PLC modem)

  • On the transmitting side, UART communication between the STM32 and the ST7580 works initially, but data transmission is not continuous. After some packets, transmission stops.

  • On the receiving side, the STM32 does not receive any data at all from its local ST7580 modem.


@Midhul_Pk wrote:

Let me clarify the issue more precisely.


Again, a diagram would be more helpful!

 

You still didn't say what STM32 boards you are using.

 


@Midhul_Pk wrote:
  • On the transmitting side, UART communication between the STM32 and the ST7580 works initially, but data transmission is not continuous. After some packets, transmission stops.

How do you determine that?

 

Before adding the complications of PLC, did you test plain wired comms direct between the STM32 UARTs?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
TDK
Super User

The UART capabilities of the STM32C092 are functional. If your project is experiencing issues, it is likely due to the code on the chip.

I recommend following some working example projects to understand how UART communication works.

If execution is stopping, debug your project using a debug configuration. Pause the code when it encounters an error and examine the state of the chip to see the reason for stopping.

 

A common bug with user code and UART is overflow. Check for the OVR flag. A band aid solution would be to clear the flag but the proper solution is to ensure overflow never happens in the first place by improving your code or following example projects.

If you feel a post has answered your question, please click "Accept as Solution".

The transmission board MCU is STM32C092, and the reception board MCU is STM32G072.

 

The PLM board is responding and detecting two boards, but data transmission (DL and PHY) to the reception board is not working properly.

 

The reception board is not receiving any data.


@Midhul_Pk wrote:

The transmission board MCU is STM32C092, and the reception board MCU is STM32G072.

 

 Those aren't even full MCU part numbers, and that still doesn't tell us anything about the boards.

Again, please read How to write your question to maximize your chances to find a solution - if they are ST Boards, state what they are (eg, full Nucleo name); if they are 3rd party, give a link to full details; if they are custom, post the schematics.

 

See here for some tips on debugging UART comms.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.