Hi NXP Team,
I am using S32k311 MCU board UART peripheral for LIN communication.
I would like to use the timeout functionality in the UART peripheral.
In my application i am using 19200 baud rate.
My LIN frame consists of a header, 8 byte data and Checksum.
After receiving the first byte i want to start the timeout value till i receive checksum.
As i have configured 19200 as baud rate the total time for receiving the complete frame till checksum will be 4680 microseconds.
9 bytes ( 8 data bytes and one checksum). Each bit is 52 microseconds and each byte as 10 bits. so total time is 4680 micro seconds.
This is the configuration i am doing.
LIN_REG.TOCR.B.TOIE = 1; //timeout 0 interrupt enable
LIN_REG.TOSR.B.TOF = 1; // Clear interrupt flag
LIN_REG.TIMEOUT[0].B.CFG = 3; //reset the timeout count to 1
/* Set the timeout value */
LIN_REG.TIMEOUT[0].B.TIMEOUT = 8000;// timeout value
/* Enable the TIMEOUT0 counter */
LIN_REG.TOCR.B.TOEN = 1;
I would like to know how the timeout value is to be written in the LIN_REG.TIMEOUT[0].B.TIMEOUT register. for 4680 micro seconds what value should be written or how it should be configured.
Thanks
Kiran