esp-idf icon indicating copy to clipboard operation
esp-idf copied to clipboard

Add UART example where it is setup using raw registers and is controlled by interrupts and ISRs (IDFGH-14943)

Open arasan90 opened this issue 9 months ago • 4 comments

Is your feature request related to a problem?

Yes, I am trying to write a UART abstraction layer that only uses the hardware instead of hardware + OS for speed reasons.

Describe the solution you'd like.

I would like to have an example where the UART setup and usage are performed via raw registers and interrupts

Describe alternatives you've considered.

No response

Additional context.

No response

arasan90 avatar Mar 26 '25 08:03 arasan90

Have you found examples somewhere?

zekageri avatar Mar 26 '25 13:03 zekageri

Not for the v5.x releases

arasan90 avatar Mar 27 '25 12:03 arasan90

Iam about to write my own driver because the idf driver has a lot of flaws. I need dma and proper interrupt handling. With the queue based approach the esp either loses the first two or three bytes or entire packets. Also the write function is unusable because it needs a lot of time to toggle the rts pin after all data sent out. ( this is why is misses the first bytes of the response, the slave is answering too fast )

zekageri avatar Mar 27 '25 13:03 zekageri

Here are some implementations, it's old, but maybe it can be of some use to you。https://github.com/EternityFOR/Personal-Uart_DMA

LYNHQQ avatar Apr 01 '25 13:04 LYNHQQ

Thank you @LYNHQQ but this is still using the driver_install API

arasan90 avatar Apr 03 '25 12:04 arasan90