Code: Select all
unsigned int rain_readings[MAX_READING];
unsigned int wind_readings[MAX_READING];
Code: Select all
.global wind_readings
wind_readings:
.space 120
.global rain_readings
rain_readings:
.space 120
Code: Select all
extern uint32_t ulp_wind_readings;
extern uint32_t ulp_rain_readings;
I don't believe there are issues with the ULP code, as when I run it without entering deep sleep, these arrays are populated as expected and can be read by the main program.
However, if run the ULP code and enter deep sleep as follows:
Code: Select all
err = ulp_load_binary(0, ulp_main_bin_start, (ulp_main_bin_end - ulp_main_bin_start) / sizeof(uint32_t));
ESP_ERROR_CHECK(err);
ulp_set_wakeup_period(0, 20000);
err = esp_sleep_enable_ulp_wakeup();
ESP_ERROR_CHECK(err);
err = ulp_run(&ulp_entry - RTC_SLOW_MEM);
ESP_ERROR_CHECK(err);
esp_deep_sleep_start();
Any ideas?