Skip to main content
ALeut.1
Associate II
July 26, 2022
Question

Hello. I was trying to build my project and found a driver error. How to fix it?

  • July 26, 2022
  • 8 replies
  • 3653 views

0693W00000QM8OTQA1.png

This topic has been closed for replies.

8 replies

KnarfB
Super User
July 26, 2022

UART5 defined elsewhere in your code?

Work in a new generated project.

hth

KnarfB

ALeut.1
ALeut.1Author
Associate II
July 26, 2022

UART5 is not defined in other parts of the program, only here.

JPeac.1
Visitor II
July 26, 2022

Where is UART5_BASE defined? At a guess you have included an STM32 port definition header that doesn't have the extra UARTs.

KnarfB
Super User
July 26, 2022

Yeah. Check a freshly generated unaltered project and report exact chip type and tool versions. Works here for STM32F429VETX and the newest STM32CubeIDE. Looks like a mixup of prprocessor definitions.

hth

KnarfB

ALeut.1
ALeut.1Author
Associate II
July 26, 2022

Chip: STM32F429ZIT6U;

Board: STM32F429I Discovery;

CubeIDE version: 1.5.0.

I tried building the generated project without making changes. Everything went well.

0693W00000QM8ixQAD.png

ALeut.1
ALeut.1Author
Associate II
July 26, 2022

Using the elimination method, I realized that the error appears when trying to read the value from the data register.

0693W00000QM8pjQAD.png0693W00000QM8pyQAD.png

KnarfB
Super User
July 26, 2022

int p[8] is an array declaration and therefore, the assignment of a value (UART5->DR) to an array makes no sense and causes errors/warnings. The compiler may not be intelligent enough to give the best error message here.

hth

KnarfB

ALeut.1
ALeut.1Author
Associate II
July 26, 2022

Thank you very much for your help. I did not understand the dimension of the received data and made mistakes in the code.