Stopping ULP & ULP Lockup
Posted: Mon Feb 18, 2019 4:31 am
Hi,
I have been running into a strange issue on some of my esp32 units (all rev1).
I use a small ULP task to read two ADC inputs, and also to control some LED indicators.
Sometimes after an esp_reset() call, the ULP keeps running (which in itself might be okay), however when the code starts up and tries to reload the code into the ULP (RTC Slow mem), sometimes the ULP doesn't start running at all even when the timer is started. Also had some cases where the ULP does keep running, but it appears to be running really slow (blinking a light goes at half speed).
The code flow is :
Also I have not found any reliable method to recover from a "crashed" ULP / one that is running slow. calling esp_reset repeatedly sometimes unsticks it after a few iterations but sometimes it never unsticks.
What are methods to recover from this situation?
I have tried hacks such as zero'ing out the slow ram before loading the ulp code, but this doesnt seem to improve things.
Power cycling the esp is not an option at this point, so I am open to any software methods to reset the ULP block / unstick this unit.
I have been running into a strange issue on some of my esp32 units (all rev1).
I use a small ULP task to read two ADC inputs, and also to control some LED indicators.
Sometimes after an esp_reset() call, the ULP keeps running (which in itself might be okay), however when the code starts up and tries to reload the code into the ULP (RTC Slow mem), sometimes the ULP doesn't start running at all even when the timer is started. Also had some cases where the ULP does keep running, but it appears to be running really slow (blinking a light goes at half speed).
The code flow is :
- Move led state by 1 and decode to on/off state
- Take 2 adc measurements
- store adc measurements to ram
- halt
Also I have not found any reliable method to recover from a "crashed" ULP / one that is running slow. calling esp_reset repeatedly sometimes unsticks it after a few iterations but sometimes it never unsticks.
What are methods to recover from this situation?
I have tried hacks such as zero'ing out the slow ram before loading the ulp code, but this doesnt seem to improve things.
Power cycling the esp is not an option at this point, so I am open to any software methods to reset the ULP block / unstick this unit.