2022-07-25 10:13 PM
2022-07-25 10:51 PM
UART5 defined elsewhere in your code?
Work in a new generated project.
hth
KnarfB
2022-07-25 10:59 PM
UART5 is not defined in other parts of the program, only here.
2022-07-25 11:06 PM
Where is UART5_BASE defined? At a guess you have included an STM32 port definition header that doesn't have the extra UARTs.
2022-07-25 11:11 PM
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
2022-07-25 11:26 PM
Chip: STM32F429ZIT6U;
Board: STM32F429I Discovery;
CubeIDE version: 1.5.0.
I tried building the generated project without making changes. Everything went well.
2022-07-25 11:47 PM
Using the elimination method, I realized that the error appears when trying to read the value from the data register.
2022-07-25 11:57 PM
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
2022-07-26 12:50 AM
Thank you very much for your help. I did not understand the dimension of the received data and made mistakes in the code.