Search found 35 matches

by thalesmaoa
Mon Nov 29, 2021 8:18 pm
Forum: Programs, Libraries and Tools
Topic: MicroPython CAN bus for ESP32
Replies: 15
Views: 30159

Re: MicroPython CAN bus for ESP32

I've read the topic, but I'm confused.

https://github.com/micropython/micropython/pull/7381

Pull request is open. That means that CAN is not officially supported yet, correct?
by thalesmaoa
Fri Nov 19, 2021 11:15 am
Forum: General Discussion and Questions
Topic: Life expectancy with Micropython
Replies: 7
Views: 2652

Re: Life expectancy with Micropython

Thanks, at least I know that it can't be flash.
by thalesmaoa
Thu Nov 18, 2021 3:22 pm
Forum: General Discussion and Questions
Topic: Life expectancy with Micropython
Replies: 7
Views: 2652

Re: Life expectancy with Micropython

Yes. I can. Wifi starts to fail, apparently, that's all. I'm sure that my code doesn't write into the flash. Bellow are the imports that I'm using, but I'm not sure if they use flash. from machine import UART from machine import Pin from machine import PWM from machine import WDT import esp32 import...
by thalesmaoa
Wed Nov 17, 2021 12:22 pm
Forum: General Discussion and Questions
Topic: Life expectancy with Micropython
Replies: 7
Views: 2652

Life expectancy with Micropython

Does anyone think that is possible that micropython reduces ESP32 life expectancy? Ok, this an odd question... Context: I have 5 ESP8266 running C++ code with an total uptime of 3 years and a half. However, I have an application that uses an ESP32 - Micropython that has failed 2 times in the last ye...
by thalesmaoa
Mon Jul 12, 2021 12:25 pm
Forum: General Discussion and Questions
Topic: RAM Mem Alloc fail even with half space free
Replies: 9
Views: 3304

Re: RAM Mem Alloc fail even with half space free

I'm sorry. I choose the wrong words. English is not my mother language. When I use "stop" means "quit". I have three global arrays and I still getting an error. My code is: 1) I receive an array over UART. 2) Convert the array to numpy.array (sometime a get error with memory allocation). 3) Calc flo...
by thalesmaoa
Sat Jul 10, 2021 7:36 pm
Forum: General Discussion and Questions
Topic: RAM Mem Alloc fail even with half space free
Replies: 9
Views: 3304

Re: RAM Mem Alloc fail even with half space free

I see. It is my misunderstanding. My believe was that, having an global array I can latter assign its values and RAM would use prealloc space. A = [0]*10 def main: for i in range( len(A) ): A[i] = 2*2; But I get it now. Thank you. Besides, I really can't get it to stop with Mem alloc error. I did an...
by thalesmaoa
Fri Jul 09, 2021 12:49 pm
Forum: General Discussion and Questions
Topic: RAM Mem Alloc fail even with half space free
Replies: 9
Views: 3304

Re: RAM Mem Alloc fail even with half space free

Thanks. I am sorry to insist. It really changes the way to think about microcontrollers. Let me put it visual:

Image

I was expecting that manual copying the result, not only the pointed, would fix the fragmentation problem. What I'm not seeing?
by thalesmaoa
Tue Jul 06, 2021 7:38 pm
Forum: General Discussion and Questions
Topic: RAM Mem Alloc fail even with half space free
Replies: 9
Views: 3304

Re: RAM Mem Alloc fail even with half space free

I've followed your suggested approach. async def main(client): gc.collect() # global Va_np, Vb_np, Vc_np Va_rms, Vb_rms, Vc_rms = None, None, None Va_THD, Vb_THD, Vc_THD = None, None, None await client.connect() while True: #sleep_ms(2000) read_ok = await read_serial_values(uart_esp32) gc.collect() ...
by thalesmaoa
Tue Jul 06, 2021 3:38 pm
Forum: General Discussion and Questions
Topic: RAM Mem Alloc fail even with half space free
Replies: 9
Views: 3304

Re: RAM Mem Alloc fail even with half space free

Thanks. I saw the video last weekend. It gave me some ideas. I do believe floating point is the problem as well. Still, I'm confused about something. 1. If I declare a global variable, that space is reserved, right? What if I reassign it over and over? A = 0 def main(): global A while True: A = get_...
by thalesmaoa
Mon Jul 05, 2021 9:13 pm
Forum: General Discussion and Questions
Topic: RAM Mem Alloc fail even with half space free
Replies: 9
Views: 3304

RAM Mem Alloc fail even with half space free

Hi there, please, be sure that I've did everything that I could to debug it. I also know this is too much subjective, but I really need some help here. RAM free 38256 alloc 72912 Traceback (most recent call last): File "main.py", line 260, in <module> File "uasyncio/core.py", line 1, in run File "ua...