Hi,
I'm testing Serial driver performance.
A simple program only calls
sdWrite(&SD1, buf, 64);
chThdSleepMilliseconds(500);
in the main loop.
SD1 is set to 115200 and 921600 respectively. All ChibiOS debug checks are disabled.
As can be seen from the attached screenshot.
For 115200 baud, there is a 4.54us gap in between two characters.
While for 921600 baud, the gap increased to 19.62us
I understand the gap may be caused by lock/unlock, signaling in the ISR, but why is so that it varies so much for different baud rate?
Thanks
Serial driver and gap between each character
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Serial driver and gap between each character
Hi,
It is caused by the IRQ service times, if you need to operate at very high speeds then try the UART driver, it uses DMA.
Giovanni
It is caused by the IRQ service times, if you need to operate at very high speeds then try the UART driver, it uses DMA.
Giovanni
Re: Serial driver and gap between each character
Giovanni wrote:Hi,
It is caused by the IRQ service times, if you need to operate at very high speeds then try the UART driver, it uses DMA.
Giovanni
Yes understand IRQ causes the delay. But why serving TXE takes longer time for higher baudrate? Should they take same time?
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Serial driver and gap between each character
Hi,
It could be because other IRQ sources, is the UART IRQ at highest priority? usually it is not and that can cause jitter.
Giovanni
It could be because other IRQ sources, is the UART IRQ at highest priority? usually it is not and that can cause jitter.
Giovanni
Who is online
Users browsing this forum: No registered users and 30 guests