Hi Lei,
Could you please post your code that can be run on the s32K144 evaluation board (see below link)?
https://www.nxp.com/docs/en/quick-reference-guide/S32K144EVB-QSG.pd
I am very busy on other urgent issues, and I can not spend lot of time on this now. But I can look at or test it if you have proved that the codes work on lower baud rate (1900b/s and 9600b/s).
Thanks,
Kevin
Hello,
Please, refer to the link below, there can be found an answer.
https://community.nxp.com/thread/501287
You can follow the community request which you have created.
It is not necessary to copy your questions into this community request.
Thank you.
Best Regards,
Diana
Hello, I modified the code, now send and receive can be successful. When I receive a byte, there is no problem. When I receive a string of data, there will be FLEXIO - > SHIFTERR = 0x02. This is the time when only the first byte is correct and the next byte is wrong. Here is my receiver function.
void FLEXIO_IRQHandler (void)
{
char byte;
if(FLEXIO->SHIFTSTAT==0x03)
{
byte = (FLEXIO->SHIFTBUF[1] >> 24 ) & 0xFF;
}
if(FLEXIO->SHIFTERR==0x02)
{
FLEXIO->SHIFTERR=0x02;
FLEXIO->TIMSTAT=0x02;
}
}
Hi Dear Reader(s),
I am developing my FLEX IO Uart on the s32K144 evaluation board based on a demo program FlexIO, and I am using the below evaluation board,
https://www.nxp.com/docs/en/quick-reference-guide/S32K144EVB-QSG.pdf
And I first turned FlEXIO_D0 to do Tx to verify that I have timer & shifter work correctly.
Then I followed recommendation on
https://www.nxp.com/docs/en/application-note/AN12174.pdf
to double check my settings.
I still could not get any byte even I saw these bytes appear on Rx line (FLEX_D0).
Could you tell me from my attached zip file FlexIO_Uart_s32k144.zip if I have correctly set up FLEX_D0 to do Rx in
"
/* setup FLEX_D0 to receive */
FLEXIO_UART_D_receive_init();
"
If I did, do I read from the correct buffer
"byte = (FLEXIO->SHIFTBUF[1] >> 24 ) & 0xFF;"
Both the above mentioned are in the file FlexIO.c.
Thank you very much!!
Kevin
Hi Kevin,
I have made a test code for the S32K144 FlexIO UART using your code and code from AN12174. (see attachment)
The main issue in your code was in the wrong clock select for the FlexIO. The SIRCDIV2_CLK was selected, but the SIRC clock was not configurated.
The second thing was in the wrong configuration of PINSEL.
I believe it helps.
Best Regards,
Diana
Hello,
Have you tried to use the test code attached in my previous case "S32K144_FlexIOUart.zip"? There is a possibility that you are using the wrong code (code with mistakes).
Using the test code I can transmit and receive the data, please see the image below.
I'm using S32K144EVB and the PTD0 should be connected with PTC6 and PTD1 with PTC7 in the case we need to use the terminal.
Which MCU do you use?
I can see that you have created the new request with your code. I will check it, however, it will be better when you share your whole project.
Best Regards,
Diana