Search found 41 matches

by bradstew
Thu Dec 09, 2021 5:24 pm
Forum: General Discussion and Questions
Topic: is os.sync a non-blocking?
Replies: 4
Views: 6220

Re: is os.sync a non-blocking?

Thanks. Now it makes sense.
The FAQ link was difficult to see on my browser.
by bradstew
Wed Dec 08, 2021 4:33 pm
Forum: General Discussion and Questions
Topic: is os.sync a non-blocking?
Replies: 4
Views: 6220

Re: is os.sync a non-blocking?

So a possible solution is to insert some delay (more than 10ms) after os.sync()?
by bradstew
Tue Dec 07, 2021 6:58 pm
Forum: General Discussion and Questions
Topic: is os.sync a non-blocking?
Replies: 4
Views: 6220

is os.sync a non-blocking?

Hi, Using MPy 1.17, stm32F405 I have a program that will do some os tasks on the flash memory such as renaming and moving files and directories. After this, it issues: os.sync() pyb.hard_reset() In some rare cases, it won't reboot as the file system became corrupted. So is it possible that os.sync()...
by bradstew
Wed Sep 22, 2021 4:12 pm
Forum: Programs, Libraries and Tools
Topic: How do I create and use integer array?
Replies: 5
Views: 10478

Re: How do I create and use integer array?

To create an integer array with a fixed length.
x=array.array('i',[0]*10)
This seems to create an array of 10 ints with zero initialization.
Very handy!
by bradstew
Mon Sep 20, 2021 7:54 pm
Forum: General Discussion and Questions
Topic: Sucure Boot? Freeze boot.py?
Replies: 1
Views: 2463

Re: Sucure Boot? Freeze boot.py?

I found a solution. Basically it involves disabling USB (CDC and MSF) under certain conditions. Secure BLE is used to lock/unlock the REPL.
by bradstew
Tue Sep 14, 2021 4:50 pm
Forum: General Discussion and Questions
Topic: Sucure Boot? Freeze boot.py?
Replies: 1
Views: 2463

Sucure Boot? Freeze boot.py?

Hi, I would like to utilize a method to run python code that is signed or to look for a key file on the filesystem. I'm not looking for the ultimate security, but something better than what exists. I am not looking at encrypting code at the moment. Just a mechanism that resets the MCU if a signature...
by bradstew
Thu Sep 09, 2021 9:34 pm
Forum: Programs, Libraries and Tools
Topic: What's mean 'opt=3' in manifest.py for frozen ?
Replies: 7
Views: 3910

Re: What's mean 'opt=3' in manifest.py for frozen ?

so 'opt=3' prevents emitting any code for "assert" statements. So if I am using assert, I should set it to another value?
Where can i find a list of the options?
by bradstew
Tue Sep 07, 2021 5:14 pm
Forum: General Discussion and Questions
Topic: Can't freeze __init.py__
Replies: 3
Views: 4022

Re: Can't freeze __init.py__

Well. This is embarrassing. :oops:
Thanks for pointing this out. Sometimes you can't see the forest from the trees...
by bradstew
Tue Sep 07, 2021 3:47 am
Forum: General Discussion and Questions
Topic: Can't freeze __init.py__
Replies: 3
Views: 4022

Can't freeze __init.py__

Hi, I am trying to freeze some code. Board is a modified pyboard using a STM32F405 It works fine if I do not include __init.py__ in the manifest. Here is my manifest file: include("$(MPY_DIR)/extmod/uasyncio/manifest.py") freeze("$(MPY_DIR)/drivers/dht", "dht.py") freeze("$(MPY_DIR)/drivers/display"...
by bradstew
Wed Jun 30, 2021 11:22 pm
Forum: Other Boards
Topic: [BLACK STM32F407VET6:STM32F407] Battery-backed/persistent memory
Replies: 5
Views: 4643

Re: [BLACK STM32F407VET6:STM32F407] Battery-backed/persistent memory

I am able to read and write to this region of SRAM with MicroPython with a STM32F405 (same as PyBoard) using upower.py.
Is it safe from normal MicroPython programs? In other words, is there a chance the bytecode or data can overwrite this region?