I know the ULP can wake after so many cycles of the 150khz RTC after a "halt". Once the ULP is running, is it able to access the timer peripherals? We have a ULP program that reads an optical encoder into RAM so the main processors can then scoop it up. But the loop rate of the ULP is unstable. With our current program it loops at a varying rate of about 85-120khz.
Would it be possible to sync it to a timer so the loop was more consistent?
ULP access timer peripherals?
Re: ULP access timer peripherals?
No most peripherals require the main CPU and clock to be powered up and the ulp cannot access that memory space. But if you have a 32khz crystal you may be able to use it as a secondary reference
Re: ULP access timer peripherals?
We are not trying to save power. we just need a clean read of the pins without fear of being preempted by another process. The ULP can do this but without a timer, it is inconsistent.
Would it be possible to have a hardware timer output to a pin that the ULP can see? It would then use that as a reference.
Would it be possible to have a hardware timer output to a pin that the ULP can see? It would then use that as a reference.
Re: ULP access timer peripherals?
Or how about the FRC1? Can the ULP access this?
http://esp-idf.readthedocs.io/en/latest ... _get_timev
http://esp-idf.readthedocs.io/en/latest ... _get_timev
Re: ULP access timer peripherals?
Well in that case I think you can clock the ulp from the crystal/4 reference and instead of doing halt just do a nop counter loop?
Re: ULP access timer peripherals?
The only clock we have been able to access in the ULP is the RTC slow clock (150khz).
I have not found a way to read the FRC1 from within the ULP. Any ideas?
I have not found a way to read the FRC1 from within the ULP. Any ideas?
Re: ULP access timer peripherals?
Ulp can access 0x3ff48000 - 0x3ff48fff and frc is not in that range.
If you don't care about power, implement your own counter/timer loop. And use xtal/4 for a more accurate fast clock.
https://github.com/espressif/esp-idf/bl ... /rtc.h#L91
If you don't care about power, implement your own counter/timer loop. And use xtal/4 for a more accurate fast clock.
https://github.com/espressif/esp-idf/bl ... /rtc.h#L91
Who is online
Users browsing this forum: No registered users and 79 guests