UART corruption with tickless idle/auto light sleep

Snedig
Posts: 24
Joined: Sat Apr 04, 2020 3:18 pm

UART corruption with tickless idle/auto light sleep

Postby Snedig » Thu Oct 01, 2020 9:52 am

I'm working on a project that uses an external 4G-modem to communicate, and will also employ BTLE. To reduce power consumption, I require BT sleep to work (we have added a 32k crystal for this), so I must have tickless idle enabled, however with this enabled I have problems getting UART1 or 2 to communicate stably over pins 16 and 17, and I am also seeing some instability on pin 23 which I'm using to toggle the modem on and off.

Is this expected behaviour? I am using the refclk option for the UART.

Snedig
Posts: 24
Joined: Sat Apr 04, 2020 3:18 pm

Re: UART corruption with tickless idle/auto light sleep

Postby Snedig » Mon Oct 12, 2020 11:18 am

An update to this, I have narrowed it down to the internal UART queue.

If I disable sleep for the duration of UART use, it works fine if I sample it manually with uart_read_bytes, but if I define it with a queue to use pattern interrupt and call xQueueReceive, it gets nearly none of the sent data, (perhaps a few percent gets through).

nilesh-dryad
Posts: 6
Joined: Mon Jun 28, 2021 3:45 pm

Re: UART corruption with tickless idle/auto light sleep

Postby nilesh-dryad » Tue Oct 26, 2021 9:52 am

Hi Snedig,

I am facing the similar problem with my LTE modem. I am trying to put ESP into automatic light sleep but it is simply not working with modem driver running.

Were you able to resolve it? May be we can share the idea.

Who is online

Users browsing this forum: Baidu [Spider], Sheepling and 76 guests