7 years, 10 months ago.

NVIC_DisableIRQ(UART1_IRQn);

Hi, How Can I Disable IRQ (serial) with Nucleo 64 F334R8.

  1. include "mbed.h"

Serial mydevice(USBTX,USBRX); tx, rx

DigitalOut led(LED2);

int j=0;

void keep_sending () { if(led == 0) mydevice.putc('W'); if(led == 1) mydevice.putc('A'); if(j>100) { NVIC_Disabled(mydevice_TxIrq); NVIC_DisableIRQ(UART1_IRQn); }

}

int main() { mydevice.baud(19200); mydevice.format(8, Serial::None, 1); mydevice.putc(0xA5); mydevice.attach(&keep_sending, Serial::TxIrq); mydevice.attach(&keep_sending); mydevice.attach(&RXUSB); interrupcionde recepcion gps while(1) { led=1; wait(1.0); led=0; wait(1.0); j++; if(j>5&j<15) { if(j==6) mydevice.putc('X'); }

} }

Be the first to answer this question.