Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: how many time to start the ESP3 core from ULP interrupt ? #31

Closed
Vorms opened this issue Jan 13, 2024 · 4 comments
Closed

Question: how many time to start the ESP3 core from ULP interrupt ? #31

Vorms opened this issue Jan 13, 2024 · 4 comments

Comments

@Vorms
Copy link

Vorms commented Jan 13, 2024

Hello,
I deveopp an application that receive infra red slave.
I would like to know if the TSOP (infra red receiver) Can start the ESP32 via ulp and if the ESP32 will be able to decode the infra red trame ?

I can send the infra red trame 3 times with a small time between.
Do ou think it is reallistic to wake up the ESP32 by the ULP and decode the trame ?
Is ther some example to wake up the ESP32 by the way of the ULP GPIO ?

Many thanks for your help.

@boarchuz
Copy link
Owner

Hi @Vorms,
Yes, if I understand the timings in the datasheet correctly then it shouldn't be a problem. I would have the ULP polling the TSOP output until it goes low, decode the signal using the ULP, and then conditionally wake up (or decode the signal while the SoC is waking).
If you wanted lower power, you could use the wakeup stub to start the ULP only when the pin goes low.
You could even avoid the ULP entirely and do all of this in the wakeup stub.

@Vorms
Copy link
Author

Vorms commented Jan 15, 2024 via email

@boarchuz
Copy link
Owner

Typically it takes a few hundred ms to app_main. If you tweak the build configuration, you can easily reduce this to 20-30ms, which is probably far too long still for your application.
If the ULP remains on at all times, polling the pin, it won't miss anything. The downside is that you would need to program a decoder for the ULP.
Stub takes about 1ms, which is probably quick enough, so you could go the stub+ULP or stub-only route too.

Another option, given you control the transmitter, would be to send a 'wakeup' preamble to prompt the receiver to exit deep sleep, wait ~50ms to allow the receiver to initialise, and then send the command.

@Vorms
Copy link
Author

Vorms commented Jan 16, 2024 via email

@boarchuz boarchuz closed this as completed Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants