Skip to main content
sbura.1
Associate
June 24, 2022
Question

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

  • June 24, 2022
  • 11 replies
  • 5989 views

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

This topic has been closed for replies.

11 replies

sbura.1
sbura.1Author
Associate
June 24, 2022

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
June 24, 2022

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
sbura.1Author
Associate
June 27, 2022

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.

waclawek.jan
Super User
June 27, 2022

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
sbura.1Author
Associate
June 27, 2022

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
sbura.1Author
Associate
June 28, 2022

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

waclawek.jan
Super User
June 28, 2022

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
Technical Moderator
June 28, 2022

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 "Best Answer" on the reply which solved your issue or answered your question.
waclawek.jan
Super User
June 28, 2022

Thanks, Amel.

It's a pity. That AN deserves a bunch of examples, IMO.

Jan

@Amel NASRI​ 

Amel NASRI
Technical Moderator
June 28, 2022

I consider your feedback, escalating it internally.

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
sbura.1
sbura.1Author
Associate
June 28, 2022

Thank you for your help.

sbura.1
sbura.1Author
Associate
July 5, 2022

Hi again, I edited the EXTI1_IRQHandler() function in my own code for my own pin, but where should I put it in main.c. I am having trouble trying to implement EXTI interrupt to autobaudrate. Has anyone dealt with autobaudrate before? Is this system a ready-to-use system? I'm trying to do it but I haven't been successful yet.

@Amel NASRI (ST Employee)​ can you please help?