Search found 22 matches

by jcw
Thu Jun 04, 2020 11:46 pm
Forum: Pyboard D-series
Topic: Overflow in time.localtime()
Replies: 1
Views: 26

Re: Overflow in time.localtime()

MicroPython v1.12 on 2019-12-20; PYBLITEv1.0 with STM32F411RE Type "help()" for more information. >>> import time >>> time.localtime(1<<30) (2034, 1, 9, 13, 37, 4, 0, 9) >>> time.localtime((1<<31)-1) (2068, 1, 19, 3, 14, 7, 3, 19) >>> time.localtime(1<<31) Traceback (most recent call last): File "<...
by jcw
Thu Jun 04, 2020 10:12 am
Forum: Other Boards
Topic: NUCLEO-H743ZI2 Support & MAC address composition
Replies: 2
Views: 34

Re: NUCLEO-H743ZI2 Support & MAC address composition

Ethernet MAC address: looks like this depends on the board. Not surprising, as each type has its own network hardware. For PyBoard D's (and STM32's in general), see: https://github.com/micropython/micropython/blob/master/ports/stm32/boards/PYBD_SF2/board_init.c#L64-L74 , and as you assumed: https://...
by jcw
Thu Jun 04, 2020 9:14 am
Forum: Other Boards
Topic: NUCLEO-H743ZI2 Support & MAC address composition
Replies: 2
Views: 34

Re: NUCLEO-H743ZI2 Support & MAC address composition

The difference regarding the NUCLEO-H743ZI2 versus the previous version appears to be STLINK-V3E vs ST-LINK/V2-1. As for clock: many Nucleo boards don't have a high-frequency crystal on the main processor, they get their clock from the on-board ST-Link instead. Perhaps as a minor cost-saving decisio...
by jcw
Thu Jun 04, 2020 9:00 am
Forum: General Discussion and Questions
Topic: STM32F407VET6 Black Board freeze
Replies: 6
Views: 81

Re: STM32F407VET6 Black Board freeze

Typo? See the error message at the end: $ micropython MicroPython v1.12-496-ge54626f4c-dirty on 2020-06-04; darwin version Use Ctrl-D to exit, Ctrl-E for paste mode >>> paste mode; Ctrl-C to cancel, Ctrl-D to finish === mchp=0 === mchf=0 === mcha=0 === msdb=0 === mchv=0 === mesc=0 === mcui=0 === msm...
by jcw
Wed Jun 03, 2020 8:50 am
Forum: General Discussion and Questions
Topic: STM32F407VET6 Black Board freeze
Replies: 6
Views: 81

Re: STM32F407VET6 Black Board freeze

There are more reasons for hanging than RAM exhaustion. Perhaps one of those pins you changed is essential for the proper operation of the board? Clock pins, serial I/O pins, USB pins, external flash pins, sd card pins, ... To debug, remove half your code, try again, etc - until you have isolated th...
by jcw
Sun May 31, 2020 9:44 am
Forum: General Discussion and Questions
Topic: Avoiding "async def" creep
Replies: 17
Views: 922

Re: Avoiding "async def" creep

This sounds a bit defensive to me: don't do this because it's not right. Note that there are no sleep calls in my application code (again: it's message/dataflow based) and there is no UI. I'm a bit surprised by the pushback. But it did point out a flaw in my thinking: the callbacks I'm using mean th...
by jcw
Sat May 30, 2020 10:29 pm
Forum: General Discussion and Questions
Topic: Avoiding "async def" creep
Replies: 17
Views: 922

Re: Avoiding "async def" creep

The watchdog I mentioned is based on hardware which resets the node. When it fires, it's "fatal" for the app - a full hardware reset happens. This is not an exception or error mechanism, it's a hardware panic button. As for writes: with small messages and TCP/IP's internal buffering, there's rarely ...
by jcw
Sat May 30, 2020 10:16 am
Forum: General Discussion and Questions
Topic: Avoiding "async def" creep
Replies: 17
Views: 922

Re: Avoiding "async def" creep

Thanks for your thoughtful comments. We may not reach agreement, but I appreciate the insights. The distinction of what blocks and what doesn't can be vague. Await says "something else" may happen here (e.g. elapsed time, side effects). I don't see how that is fundamentally different from say a "pri...
by jcw
Fri May 29, 2020 10:47 pm
Forum: General Discussion and Questions
Topic: memory and small int overflow error
Replies: 2
Views: 115

Re: memory and small int overflow error

The memory error may be caused by not having GC enabled (#define MICROPY_ENABLE_GC 1), as don't have "gc.c" in your list.
For the int overflow, my hunch would be that you need multi-precision support (#define MICROPY_LONGINT_IMPL 1).