Search found 2562 matches

by Roberthh
Sun Apr 18, 2021 4:00 pm
Forum: ESP32 boards
Topic: How to handle a fast signal
Replies: 2
Views: 70

Re: How to handle a fast signal

The best results that you can achieve is using machine.time_pulse_us(). See https://docs.micropython.org/en/latest/ ... e_pulse_us.
by Roberthh
Fri Apr 16, 2021 11:57 am
Forum: Raspberry Pi microcontroller boards
Topic: UART not working with today's version of micropython
Replies: 34
Views: 673

Re: UART not working with today's version of micropython

So I made some further tests: Using the previous version for machine.uart does not change the picture a lot. The crashes and lock-ups occur too. Only I have not seen the character doubling. So the latter seems just one variant of misbehavior caused by the underlying bug in threading. Nevertheless I ...
by Roberthh
Fri Apr 16, 2021 9:18 am
Forum: ESP32 boards
Topic: Custom files in the self-compiled Micropython
Replies: 7
Views: 222

Re: Custom files in the self-compiled Micropython

Esptool just copies data to the flash memory and does not care about the type of the data.
by Roberthh
Fri Apr 16, 2021 6:12 am
Forum: Raspberry Pi microcontroller boards
Topic: UART not working with today's version of micropython
Replies: 34
Views: 673

Re: UART not working with today's version of micropython

You can try to use a single thread only with sufficiently large transfer buffers. If that does not fit, I could make a firmware version with the previous version of uart.write().
by Roberthh
Thu Apr 15, 2021 8:39 pm
Forum: Raspberry Pi microcontroller boards
Topic: UART not working with today's version of micropython
Replies: 34
Views: 673

Re: UART not working with today's version of micropython

It seems to depend on the code size as well. With a minimal code I see no error. If I just add some non-executed code lines, I get errors. So there seems to be something fundamentally wrong with threading and interrupts.
by Roberthh
Thu Apr 15, 2021 8:18 pm
Forum: Raspberry Pi microcontroller boards
Topic: UART not working with today's version of micropython
Replies: 34
Views: 673

Re: UART not working with today's version of micropython

When enabling threading I see all kinds of errors, very rarely character doubling, more often just lock-up of the sending thread, or sending completely wrong data. So there seems to be a general issue or challenge with threads and interrupt. Maybe a stack overrun. It does not matter in which thread ...
by Roberthh
Thu Apr 15, 2021 6:12 pm
Forum: Raspberry Pi microcontroller boards
Topic: UART not working with today's version of micropython
Replies: 34
Views: 673

Re: UART not working with today's version of micropython

Not good. The erorr I had seen disappeared with that change. But it also disappeared with setting timeout. About your set-up and threads: - in which thread is the UART communication placed? - can you try to run the UART test with only thread0 active? Edit: I could replicate the bug when the UART sen...
by Roberthh
Thu Apr 15, 2021 4:41 pm
Forum: Raspberry Pi microcontroller boards
Topic: UART not working with today's version of micropython
Replies: 34
Views: 673

Re: UART not working with today's version of micropython

OK. Sending frequent was the trigger. If I do that, I see errors too. Not doubling, but gaps. These should not occur either.

Can you try this firmware version: https://github.com/robert-hh/Shared-Stu ... rmware.uf2
by Roberthh
Thu Apr 15, 2021 3:23 pm
Forum: Raspberry Pi microcontroller boards
Topic: UART not working with today's version of micropython
Replies: 34
Views: 673

Re: UART not working with today's version of micropython

Simple logic analyzer: https://www.amazon.de/AZDelivery-%E2%AD%90%E2%AD%90%E2%AD%90%E2%AD%90%E2%AD%90-Logic-Analyzer-gratis/dp/B01MUFRHQ2/ref=sr_1_5?__mk_de_DE=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=1WTMPVMIYNS55&dchild=1&keywords=logic+analyzer&qid=1618500108&sprefix=logic+%2Caps%2C180&sr=8-5 Good fo...