Check for 12 ms idle time on serial port of ME 9210

I’m using Net-OS 7.5 with a Connect ME 9210. When I receive data on the serial port I want to wait till there’s at least 12 ms of idle time on the serial port before sending this data on the network. I receive a block of over 1300 bytes on the serial port. The select says I have data and I read all available received data according to tcgetbuffers and it’s over 500 bytes. I know it’s receiving a stream of over 1300 bytes and want to wait for the rest but at this point the select and the tcgetbuffers don’t say that there’s any more data received unless I wait for over 45 ms and then check. I think what’s happening is that it’s using a DMA to receive data and even though there is more it won’t till me the DMA is completed. Is there any way to wait for smaller amount of idle time?

you can try using character gap timer or buffer gap timer

Thanks for the suggestion. I’ve tried this but might be approaching it wrong. I’m using a select and then tcgetbuffers.rxbuf receive data and then want to check to make sure I’m go it all before sending it on the network. This is due to some old equipment that always had all the data for 1 application msg in a single network packet. When I try to use tcgetbuffers.rxbuf to check if more data is coming it it says there isn’t but I know there is, it’s just in the process of the DMA filling the DMA buffer. I there’s no character gap and the DMA buffer isn’t full it says 0 charactrers. I tried making these buffers shorter to improve the status response but maybe what I need to do is make so large I’ll never get the initial select on receive data until a character timeout or all the data is there. Also there’s call tcgetcounters which might help. Thanks for replying.