Search found 155 matches

by Mike Teachman
Tue Jul 05, 2022 7:59 pm
Forum: Raspberry Pi microcontroller boards
Topic: Timer gets stuck when thread is running - RP2040
Replies: 4
Views: 3312

Re: Timer gets stuck when thread is running - RP2040

Mike Teachman wrote:
Tue Jul 05, 2022 5:41 pm
I should likely raise an Issue on this problem
I submitted an Issue:
https://github.com/micropython/micropython/issues/8866
by Mike Teachman
Tue Jul 05, 2022 5:41 pm
Forum: Raspberry Pi microcontroller boards
Topic: Timer gets stuck when thread is running - RP2040
Replies: 4
Views: 3312

Re: Timer gets stuck when thread is running - RP2040

The first thing I found out was that the LED must use a state machine with ID 4-7. If I used ID 0-3, the I2S would stop the LEDS immediately, probably the PIO program or some other config was overwritten. This can definitely happen. Here is a technical description on the problem you observe. The RP...
by Mike Teachman
Tue Jul 05, 2022 5:09 pm
Forum: Raspberry Pi microcontroller boards
Topic: Problem with I2S irq on second thread - RP2040
Replies: 2
Views: 1743

Re: Problem with I2S irq on second thread - RP2040

Here's a possible reason for this behavior - the rate of IRQ callbacks is too fast to be serviced by the Micropython scheduler IRQ callbacks for both Timer and I2S objects don't get serviced immediately. The C code for these modules first push IRQ callback requests into a queue that is managed by th...
by Mike Teachman
Mon Jun 06, 2022 8:57 pm
Forum: ESP32 boards
Topic: ADC unintendedly transformed into an antenna???
Replies: 4
Views: 1601

Re: ADC unintendedly transformed into an antenna???

Is there any chance that the period of the signal is 20ms, not 20s. If that is the case, 50Hz power line interference (20ms period) is likely the cause.
by Mike Teachman
Sat May 21, 2022 1:05 am
Forum: General Discussion and Questions
Topic: Background asyncio event loop
Replies: 5
Views: 2312

Re: Background asyncio event loop

p_j wrote:
Fri May 20, 2022 11:34 pm
Thanks both, I was more thinking it would be good for a testing/debugging perspective, to check what tasks are running, interact with the tasks etc..
It sounds like this might be what you are looking for:
https://github.com/peterhinch/micropython-monitor
by Mike Teachman
Mon May 16, 2022 4:00 am
Forum: General Discussion and Questions
Topic: I2S Master Clock Pin
Replies: 4
Views: 2345

Re: I2S Master Clock Pin

It looks like all those devices need a master clock input. None include an internal PLL for creating the master clock internally. The ESP32 machine.PWM class should be able to create the master clock signal, which is typically 256*audio sampling rate.
by Mike Teachman
Thu May 12, 2022 10:42 pm
Forum: General Discussion and Questions
Topic: I2S Master Clock Pin
Replies: 4
Views: 2345

Re: I2S Master Clock Pin

Master clock support is presently only available with the mimxrt port. It is possible to add master clock support to the esp32 and stm32 ports, but at the moment there is no timeline for this development. As a workaround, you might be able to use the machine.PWM class to create a master clock signal...
by Mike Teachman
Fri May 06, 2022 7:54 pm
Forum: ESP32 boards
Topic: I2S missing
Replies: 3
Views: 1891

Re: I2S missing

The I2S class is presently excluded for all C3 boards.

in ports/esp32/boards/GENERIC_C3/mpconfigboard.h:

Code: Select all

#define MICROPY_PY_MACHINE_I2S              (0)
I don't know the background on this exclusion. I suggest to raise an Issue at https://github.com/micropython/micropython/issues
by Mike Teachman
Tue Mar 29, 2022 7:29 pm
Forum: Programs, Libraries and Tools
Topic: Rotary encoder with asyncio?
Replies: 18
Views: 8945

Re: Rotary encoder with asyncio?

If you are turning an encoder at a slow speed (e.g. manual knob turning), here is a gray code state machine implementation that will likely meet your needs. It includes 2 uasyncio examples. https://github.com/miketeachman/micropython-rotary https://github.com/miketeachman/micropython-rotary/blob/mas...
by Mike Teachman
Wed Mar 23, 2022 2:04 am
Forum: Other Boards
Topic: Teensy 4.0 & 4.1
Replies: 290
Views: 438381

Re: Teensy 4.0 & 4.1

That has to be analyzed further. I do not expect this to be related to the Codec. edit: The unexpected halt on Teensy disappeared. I would like to try reproducing the problem with a Teensy 4.1, then try to find the root cause. Can you recommend a configuration that is likely to cause the audio dist...