Hello Ronan,
I tried the example usart_interrupt_transfer with the pins you mentioned (port1_pin4 and port1_pin9) and it works fine.
For the definitions, do you need USART3 for flexcomm3 (or can you just use USART0 for flexcomm3)?
Yes, you need USART3 for flexcomm3, you can't use the USART0 for a flexcomm that isn't flexcomm0.
Have I set up my pinmux.c file attached correctly?
The PinMuxSet looks fine, you are selecting the correct function for each pin, function 2 for pin 9 and function 5 for pin 4.
Am I configuring the USART correctly?
In the image attached in the line 9 you have the next call to function:
RESET_PeripheralReset(kFC0_RST_SHIFT_RSTn);
But in this case you are not using anymore the flexcomm0 as you mentioned before, so you need to replace the parameter of this function in order to reset the flexcomm3 instead:
RESET_PeripheralReset(kFC3_RST_SHIFT_RSTn);
In the example usart_interrupt_transfer in the main you have the function where you attach the clock to the flexcomm0:
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM0);
For your example you need to change the parameter of this function to attach the clock to the flexcomm3 instead, please validate that you have this on your code.
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM3);
Also it's important to mentioned that in the main of the example you are calling the next function:
BOARD_InitDebugConsole();
This function what it does is that it sets the UART0 as a debug console, so this will cause problems in your program as it will try to send and receive the data through UART0 instead of UART3, so please comment this call to function or delete it.
Finally, please validate that you are connecting the external USART to the correct pins (port1_pin4 and port1_pin9) in the next file (Schematic) in page 6 you will find the schematics.
Following these steps the example should work fine with any USART you want to use!
Please let me know if you have any more doubts.
Have a great day,
Victor.
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------