cancel
Showing results for 
Search instead for 
Did you mean: 

I want to set Auto Baud Rate for STM32H7. But I'm having trouble with EXTI and USART settings. Is there a more detailed pdf available? Can't add EXTI to USART Rx pin via CubeMX

sbura.1
Associate II

I'm using STM32H743. I'm trying to apply the following pdf but I'm having difficulties with pin settings and applying the example. I need help. THANK you

13 REPLIES 13
sbura.1
Associate II

0693W00000Nsgf6QAB.pngI can't do this via CubeMX. I am using USART1 channel.The code in the example is prepared for STM32F303. I reviewed the code and the STM32F303 datasheet. The GPIOE pin is not a USART rx pin for the STM32F303. In the description next to the code you said "Configure the USARTx RX pin

to generate an interrupt on

each rising edge." then EXTI is opened to the GPIOE pin in the code part. USART1 Rx pin PA10 for STM32F303 not GPIOE1. I can't understand the situation.

Nikita91
Lead II

On some F3 PE1 is a USART1_RX pin. Example STM32F303xB STM32F303xC in WLCSP100 and LQFP100 packages.

You must port the example to the pins you actually use.

sbura.1
Associate II

Sir,

I set the ports for STM32H743, which is the processor I use. But I can not open STM32H743 Usart1 Rx pin with EXTI and Rx features at the same time.CubeMx won't let me do it.

Clicking in CubeMX is comfortable, but you'll hit this sort of limitations as soon as you want to do something which is not envisaged by CubeMX authors.

In other words, you have to write your code yourself. I don't use Cube, but I know Cube users pulled this out in the past by letting CubeMX set the pin as EXTI input, and then manually changing it to given AF. Try searching in this forum.

Of course, this always can be done by normal programming of the respective GPIO, SYSCFG and EXTI registers.

JW

sbura.1
Associate II

0693W00000NsoDeQAJ.png0693W00000NsoFuQAJ.pngyes, I defined it as EXTI pin on the code. Realizing that CubeMX does not allow this, I wondered if I should not do it this way. I understand that part now, thank you for your help. As far as I understand, when data comes to the RX pin, an interrupt is created over EXTI and the elapsed time is calculated. We reach the baud rate from there. I want to ask one more thing. A variable named end_interrupt_flag is checked in the I Shared to you section of the PDF above, but this variable is not defined anywhere in the example. Could the variable mentioned here be the interrupt_flag variable?

sbura.1
Associate II

yes i got that part done. I don't understand the interrupt-flag part :-

I don't know, there appears to be no acompanying code to that AN. I tried searching Cube examples but could not find any autobaud example.

@Amel NASRI​ can you please help us locate the software for this AN?

Thanks,

JW

Amel NASRI
ST Employee

Hi @Community member​ ,

I confirm that there is no software example provided with this application note.

@sbura.1​ : I agree with your interpretation regarding interrupt_flag variable: for both variables, we speak about the end of the interrupt in the comment.

-Amel

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.

sbura.1
Associate II

Thank you for your help.