AnsweredAssumed Answered

STM32 Nucleo F411RE UART

Question asked by khare.ankush on Jul 11, 2016
Latest reply on Jul 12, 2016 by Clive One
Hello, 
I am trying to modify the given code for STM32F411RE nucleo board. 
I want to modify the UARt code by including an interruop section.
I have the following code:
#include "mbed.h"


//------------------------------------
// Hyperterminal configuration
// 9600 bauds, 8-bit data, no parity
//------------------------------------


Serial pc(SERIAL_TX, SERIAL_RX);
 
DigitalOut myled(LED1);
 
int main() {
  int i = 1;
  pc.printf("Hello World !\n");
  while(1) { 
      //wait for 1 sec
      wait(1);
      pc.printf(" \n x= %d  y= %d  z= %d ", i,i,i);
      i++;
      myled = !myled;
  }
}
 

What should I modify from the below lines to make my own uart_rx() ISR ?
InterruptIn mybutton(USER_BUTTON);
mybutton.fall(&pressed);

Thanks,

Outcomes