cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot add USART2 initialization through CubeMX to the main program when using TouchGFX

ChungEN
Associate II

I'm using RVT101HVSNWC00-B.I use TouchGFX 4.24.0 to generate initial code.

There's no MX_USART2_UART_Init(); , even though I generate code again through CubeMX.

I have to add it by myself to initial USART2.

ChungEN_0-1725870683752.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

To generate the "MX_USART2_UART_Init();" function, you have to go to your .ioc file->Project Manager->Advanced Settings and unselect the "Do Not Generate Function Call" For the Peripheral Instance Name "USART2".

STTwo32_1-1725950692203.png

Best Regards.

STTwo-32

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.

View solution in original post

3 REPLIES 3
STTwo-32
ST Employee

Hello @ChungEN 

If possible, can you add you .ioc file?

Best Regards.

STTwo-32

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.

Here's the .ioc file.

Best Regards,

ChungEn

To generate the "MX_USART2_UART_Init();" function, you have to go to your .ioc file->Project Manager->Advanced Settings and unselect the "Do Not Generate Function Call" For the Peripheral Instance Name "USART2".

STTwo32_1-1725950692203.png

Best Regards.

STTwo-32

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.