diff --git a/docs/api-guides/ulp.rst b/docs/api-guides/ulp.rst index 9f913ff814..a5e54d062f 100644 --- a/docs/api-guides/ulp.rst +++ b/docs/api-guides/ulp.rst @@ -134,7 +134,7 @@ Each ULP program is embedded into the ESP-IDF application as a binary blob. Appl Once the program is loaded into RTC memory, application can start it, passing the address of the entry point to ``ulp_run`` function:: - ESP_ERROR_CHECK( ulp_run((&ulp_entry - RTC_SLOW_MEM) / sizeof(uint32_t)) ); + ESP_ERROR_CHECK( ulp_run(&ulp_entry - RTC_SLOW_MEM) ); .. doxygenfunction:: ulp_run diff --git a/examples/system/ulp/main/ulp_example_main.c b/examples/system/ulp/main/ulp_example_main.c index 650744e886..ec553357ea 100644 --- a/examples/system/ulp/main/ulp_example_main.c +++ b/examples/system/ulp/main/ulp_example_main.c @@ -80,7 +80,7 @@ static void init_ulp_program() REG_SET_FIELD(SENS_ULP_CP_SLEEP_CYC0_REG, SENS_SLEEP_CYCLES_S0, 3095); /* Start the program */ - err = ulp_run((&ulp_entry - RTC_SLOW_MEM) / sizeof(uint32_t)); + err = ulp_run(&ulp_entry - RTC_SLOW_MEM); ESP_ERROR_CHECK(err); } diff --git a/examples/system/ulp_adc/main/ulp_adc_example_main.c b/examples/system/ulp_adc/main/ulp_adc_example_main.c index 5e43ca22dc..b74392b505 100644 --- a/examples/system/ulp_adc/main/ulp_adc_example_main.c +++ b/examples/system/ulp_adc/main/ulp_adc_example_main.c @@ -87,6 +87,6 @@ static void start_ulp_program() ulp_sample_counter = 0; /* Start the program */ - esp_err_t err = ulp_run((&ulp_entry - RTC_SLOW_MEM) / sizeof(uint32_t)); + esp_err_t err = ulp_run(&ulp_entry - RTC_SLOW_MEM); ESP_ERROR_CHECK(err); }