Search found 80 matches

by Mike Teachman
Fri Jan 31, 2020 4:28 pm
Forum: ESP32 boards
Topic: i2s compatibility
Replies: 21
Views: 4010

Re: i2s compatibility

Hi, Are you using the MicroPython interface for ESP-ADF? https://github.com/espressif/esp-adf/tree/master/micropython_adf This MicroPython work by Espressif is new to me. The commit history in github for this work starts in October 2019. Quite recent activity. Option 2: you can use the I2S pull requ...
by Mike Teachman
Fri Jan 31, 2020 3:33 am
Forum: ESP32 boards
Topic: MicroPython Startup Time
Replies: 26
Views: 2135

Re: MicroPython Startup Time

You might improve @pythoncoder's suggestion by putting the first dog feeding into boot.py. I tried this test with a non-psram ESP32 and unfortunately it doesn't make much of an impact. Only a 30ms improvement by moving the first watchdog feed to boot.py. but, it's something ! yellow=reset green=GPI...
by Mike Teachman
Sun Jan 26, 2020 3:49 pm
Forum: ESP32 boards
Topic: i2s compatibility
Replies: 21
Views: 4010

Re: i2s compatibility

Hi, This I2S class does not yet exist on any hardware platform. The page you listed is a proposal for a MicroPython I2S API. About a year ago I implemented the simplex, buffer-oriented part of this proposal, for the ESP32 platform. The stream part was started by @blmorris for the Pyboard in 2015 but...
by Mike Teachman
Sat Jan 25, 2020 10:11 pm
Forum: ESP32 boards
Topic: MicroPython Startup Time
Replies: 26
Views: 2135

Re: MicroPython Startup Time

Would it help to have a separate main.py and app.py (maybe both frozen) with main.py being (pseudocode): Yes. That approach (main.mpy + app.mpy, both frozen) shows a faster startup compared to a single frozen main.mpy -- startup time went from 660ms to 584ms (ESP32 no psram) and from 1.80s to 1.70s...
by Mike Teachman
Fri Jan 24, 2020 6:06 am
Forum: ESP32 boards
Topic: MicroPython Startup Time
Replies: 26
Views: 2135

Re: MicroPython Startup Time

I ran some more startup time benchmarking tests with two ESP32 dev boards: Lolin D32 (non-psram) Lolin D32 Pro (4MB psram) startup time = rising edge of reset to rising edge of GPIO pin MicroPython program is 798 LOC Lolin D32: main.py in filesystem: 2.85s main.mpy in filesystem (not frozen): 1.31s ...
by Mike Teachman
Fri Jan 24, 2020 1:55 am
Forum: ESP32 boards
Topic: MicroPython Startup Time
Replies: 26
Views: 2135

Re: MicroPython Startup Time

Right, no SPIRAM. Sorry, I didn't make any timing measurements with non-frozen mpy files. I'm curious now .... I'll try it tonight.
by Mike Teachman
Mon Jan 20, 2020 1:43 am
Forum: ESP32 boards
Topic: MicroPython Startup Time
Replies: 26
Views: 2135

Re: MicroPython Startup Time

Here's another datapoint for the discussion Lolin D32 ("regular" ESP32) board. MicroPython v1.12. ESP32 @240Mhz. I used an oscilloscope to measure the startup time. Startup time = time between rise of the Reset signal and rise of a GPIO pin (which the first MicroPython code that runs). Startup time,...
by Mike Teachman
Tue Dec 31, 2019 5:44 pm
Forum: ESP32 boards
Topic: Avoid code crash and exit
Replies: 5
Views: 323

Re: Avoid code crash and exit

good suggestion @stijn. I'll update my post to remove the file create bit - left the mode as 'at' --- '+' is for reading and not needed in this use case
by Mike Teachman
Tue Dec 31, 2019 4:29 pm
Forum: ESP32 boards
Topic: Avoid code crash and exit
Replies: 5
Views: 323

Re: Avoid code crash and exit

Pretty much the same as previous poster ... here is a technique I find useful to identify where application code is crashing on an unhandled exception. wrap the whole application in a try statement log the exception to a text file, using append mode so you can log multiple exceptions force a hardwar...
by Mike Teachman
Thu Nov 14, 2019 2:47 pm
Forum: ESP32 boards
Topic: i2s compatibility
Replies: 21
Views: 4010

Re: i2s compatibility

You might want to check out the ADC Data Collection feature in the Loboris port of the ESP32. https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki/adc This feature uses an I2S peripheral to read an ADC and collect samples in the background using DMA. This capability is not yet implemented in...