Hi, my name is Leandro, and I working with MCUXpresso, Configuration Tools and my FRDM-K64F board. My problem is as follows:
I start a project with MCUXpresso and an SDK from my board to receive data using UART4 from a Bluetooth module. The data consists of a 10-byte stream that is sent from an Android device.
I wrote the following interrupt routine to receive data:
void UART4_SERIAL_RX_TX_IRQHANDLER(void)
{
UART_ReadBlocking(UART4, data, 10);
#if defined __CORTEX_M && (__CORTEX_M == 4U)
__DSB();
#endif
}
and the main function is as simple as:
int main(void) {
BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitBootPeripherals();
BOARD_InitDebugConsole();
while(1) {
PRINTF("Hello world!\r\n");
}
return 0 ;
}
The problem is, when I receive some 10-bytes data packages, the program is trapped inside the interrupt, particularly in the function UART_ReadBlocking(), and never leaves there. It seems that there is some problem with RCFIFO flag.
The configuration of the UART4 is shown in the next figures:


What is the correct form to receive the 10-bytes of data using UART4??
NOTE: I attached the sample project that uses UART and interrupts, but it doesn't work either.
Thanks,
Best regards.