I've setup USART1-4 (USART0 configured for debugger output) but can only get Data through USART1 and 2. 3 and 4 cause the MCU to lock up and freeze.
init before my main loop is the same for all USART
PRINTF("Init started\n\r");
USART_TransferCreateHandle(usart_3, &usart3_handle, USARTUserCallback, &callbackUserData3);
PRINTF("Handle created\n\r");
USART_TransferStartRingBuffer(usart_3, &usart13_handle, ringBuffer3, 100);
PRINTF("Init finished\n\r");
Both messages are printed, but when the USART recives data / sends data on 3 or 4 the MCU frezes up and dosn't react to anything. But also there is no stack trace.
When I try to stop the program in debug mode, it seems to always be inside the interrupts. Breakpoints in the main loop never fire after "hanging".
Pins and Clock are configured with the Configuration Tool and looks correct:
#define USART4_PERIPHERAL ((USART_Type *)USART4)
#define USART4_CLOCK_SOURCE 18000000UL
SWM_SetMovablePinSelect(SWM0, kSWM_USART3_TXD, kSWM_PortPin_P0_19);
SWM_SetMovablePinSelect(SWM0, kSWM_USART3_RXD, kSWM_PortPin_P0_18);
SWM_SetMovablePinSelect(SWM0, kSWM_USART4_TXD, kSWM_PortPin_P0_15);
SWM_SetMovablePinSelect(SWM0, kSWM_USART4_RXD, kSWM_PortPin_P0_14);
Finaly found the root cause. There was an interupt conflict with the PINT component. After removing PINT everything worked as expected.
Hello Burghard Bode ,
Please send your whole project , I will help you check it.
If it can't public, you can send me a private message.
Regards,
Alice
Find the test project here: Project zipped
This code does use the blocking interface, not the interupt functions. I debugged my code further and it seems to be stuck in an endless loop inside PIN_INT6_USART3_IRQHandler. - But the interupt handler is not called in the blocking functions.
Hello Burghard,
You can create a simple project, use MCUXpresso Config tool to config , or you can change code in UART demo under SDK. Then porting code into your project.
I add UART3 configration to SDK demo “lpcxpresso845max_usart_transfer_interrupt”, just test USART_TransferSendNonBlocking() function, it can send word successfully.
Regards,
Alice