-1

STM32F429 discovery board:

It's not possible to exit from STOP mode on Uart receive interrupt, because all the clocks are stopped? As far as I read any EXTI Line configured in Interrupt mode can wake up the microcontroller.EXTI0 - EXTI15 .

Please, I'd appreciate any advice on how to start with it.

I tried the following with STM32 cube Mx:

  1. PA0 as GPIO_EXT0 and generated the code
  2. how to link the uart receive pin to GPIO_EXT0
EzLo
  • 13,780
  • 10
  • 33
  • 38
Ethane Das
  • 15
  • 5
  • Hi Ethane, welcome to Stack Overflow. It's a good idea to take the [tour] to understand how this site operates, especially when it comes to how to ask questions; yours is a bit unclear at the moment! – Docteur Apr 12 '19 at 06:04
  • STM32F429 discovery board : I am working on low power apllication and want to exit STOP mode on Uart receive interrupt, but as far i read any EXTI Line configured in Interrupt mode can wake up the microcontroller.EXTI0 - EXTI15 . please any advice for the same – Ethane Das Apr 12 '19 at 06:07

2 Answers2

0

While you are correct about the EXTI0 - EXTI15 pins being configurable for a wake up, unfortunately, this particular series of microcontroller (STM32F4) cannot have the USART clock active when stop mode is on. This means that the peripheral cannot see any data. You can; however, use an external watchdog, RTC, etc... this will allow for that with your current microcontroller. There are workarounds for this.

You could use sleep mode, which just the Cortex M4 Clock and the CPU would be stopped while all the peripherals are left running. However, with all the peripheral clocks enabled you will draw more current.

If you are interested in USART clock functionality in stop mode, check out the STM32L0, or STM32L4. Both of these have that feature and it works phenomenally well and I would highly recommend these two series for a low-power application as this is what they are designed for.

0

It can be done in software, but not with STM32CubeMX

GPIO inputs and EXTI (if configured) are active even if the pin is configured as alternate function. Configure the UART RX pin as you would for UART receive, then select that pin as EXTI source in the appropriate SYSCFG->EXTICR* register, and configure EXTI registers accordingly. You'll probably want interrupt on falling edge, as the line idle state is high.

Keep in mind that it takes some time for the MCU to resume operations, therefore some data received on the UART port will be inevitably lost.

PA0 cannot be configured as a UART RX pin, use the EXTI line corresponding to the RX pin of the used UART.