You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
esp32/adc: Updated the module to use new driver (esp_adc).
Tested and confired working on:
- esp32
- esp32 C3
- esp32 S2
- esp32 S3
esp32/ulp: Enable RISCV ULP by default on targets
which support it
esp32 S2 & S3 have an option of reverting back
to using the FSM in a custom build.
Signed-off-by: Damian Nowacki (purewack) bobimaster15@gmail.com
When any sources are defined like this, the ULP code will be automatically added the the firmware.
324
+
Any variables prefixed with *var_* will be automatically added to the ULP class and you can use them to reference a memory location for reading and writing
325
+
326
+
Example usage with embedded code::
327
+
328
+
import esp32
329
+
u = esp32.ULP()
330
+
u.run_embedded()
331
+
print(u.read(u.VAR_TEST))
332
+
333
+
334
+
Example usage with external code::
335
+
336
+
import esp32
337
+
u = esp32.ULP()
338
+
339
+
with open("test.bin","rb") as file:
340
+
buf = file.read()
341
+
342
+
u.run(buf)
343
+
print(u.read(0x500000dc))
344
+
345
+
Example usage with external code (FSM)::
346
+
347
+
import esp32
348
+
u = esp32.ULP()
349
+
350
+
with open("fsm.bin","rb") as file:
351
+
buf = file.read()
352
+
353
+
u.run(0x1c,buf)
354
+
print(u.write(0x500000dc, 42))
355
+
356
+
Example usage with embedded code using ADC1 channel 1 on ESP32 S3 (GPIO_2)::
357
+
358
+
import esp32
359
+
u = esp32.ULP()
360
+
361
+
u.adc_init(1)
362
+
u.set_wakeup_period(100)
363
+
u.run_embedded()
364
+
print(u.write(u.VAR_DO_ADC_SAMPLING, 1))
307
365
308
-
This class does not provide access to the RISCV ULP co-processor available
309
-
on the ESP32-S2 and ESP32-S3 chips.
366
+
.. note::
367
+
Exposed variables are relative address offsets from RTC_SLOW_MEM address,
368
+
369
+
however you can use full address values also, if loading ULP code from outside the compilation process.
310
370
311
371
.. class:: ULP()
312
372
313
373
This class provides access to the Ultra-Low-Power co-processor.
0 commit comments