#circuitpython-dev

1 messages ยท Page 310 of 1

tulip sleet
#

this server is about adafruit products and software and related topics

surreal scarab
#

oo thought it was about putting out ADs/commercials sorry

tulip sleet
#

no, sorry

ionic elk
#

@slender iron welp, I've got no idea. Have to go to dinner but I'll take another look tomorrow morning, if that's cool.

#

I've tried putting every pin that's been affiliated with flash, USB or SWD in never_reset and it's still not booting. At this point I'm probably going to go back and cross test with the EVKs to make sure we didn't get a global boot bug in here somehow

slender iron
#

@ionic elk all good. it may be simplest to binary search it based on port and pin number

manic glacierBOT
#

I'm also not sure what kind of primitives you require. Maybe you could give me a simple example of the kind of a program you wanted to write with those counters, and I can show you how this can be done with that library?

I've been thinking quite a bit on this topic about the primitives that I DO want.

When I write threads in normal python (NP) using the threading library, I essentially have two choices as how to create a thread:

  1. create a threading.Thread() on an existing functio...
manic glacierBOT
indigo wedge
#

@gentle bronze I saw you created a uf2 repo for esp32s2, why not use tinyuf2? i thought that was the idea, to not have a separate bootloader for each platform

manic glacierBOT
lucid solar
#

@indigo wedge nice project! I'll add some boards later

manic glacierBOT
#

a) easy way to say "run this function"

await your_function()

b) easy way to say "run this method with this object"

await your_object.your_method()

c) easy way for those methods to give up control, either after performing some work and to say it needs to wait for

await

c) a way for the cooperating segments of code to say "I'm done", to say "wait for that cooperating segment to say its done", and for them to be reaped

return

d) some primitive th...

split summit
#

just got a new clue and im trying to upload a simple code can any one help me pls.

stuck elbow
#

where are you stuck?

manic glacierBOT
#

Does the whitespace change leave one blank line at the end of the file? I think we tend to.

It leaves an empty line the way Emacs and other editors do โ€” which matches what the Adafruit_CircuitPython_* libraries appear to have. It seems to be different in this repo though, and a lot of files have two empty lines, which is what it's correcting.

Looks like some test outputs were changed and broken. They'll need to be exempted.

Yeah I'm still trying to get this all to pass, it's no...

#

This fails to compile for the teensy41

jerryneedell@jerryneedell-ubuntu-macmini:~/projects/circuitpython_master/ports/mimxrt10xx$ make BOARD=teensy41 
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
QSTR updated
boards/teensy41/board.c: In function 'board_init':
boards/teensy41/board.c:33:5: error: implicit declaration of function 'common_hal_never_reset_pin' [-Werror=implicit-function-declaration]
   33 |     common_hal_...
manic glacierBOT
ionic elk
#

@onyx hinge double checking an i.mx crash this morning but I'll check out your GetTick issue as a part of my wider clock rework

lone axle
ionic elk
#

I'm not seeing any stm32 boards on the support matrix

#

@raven canopy did something get changed with the support matrix generator?

raven canopy
lone axle
#

(as far as I can tell, though I am less in tune with some of the newer boards)

#

The 5.0 support matrix page does not have one of the "warning this document is for an older version" alert boxes. Also to be honest I still find myself on old docs pages lots of times from google searches and for some reason the orange / red color of that alert does not stand out to me much so I often don't realize it's old until something in the API seems wonky to me. I wonder if it might be worthwhile to make that warning a little bit more "in your face" within the docs. Perhaps a bolder color, or "scroll with the page".

onyx hinge
#

@ionic elk I appreciate it, thank you

#

Let me know if I can furnish any additional info

ionic elk
#

dang I hate debugging without a debugger

#

wish these teensy people had at least stuck a couple pads or something on there I could tap into

#

@lone axle I agree, landing on an old version of the docs and not noticing for a couple seconds is a daily frustration for me

solar whale
#

@ionic elk how do you upload code to the imxrt1010-evk?

ionic elk
#

You can use the jtag connector or the DAP link (onboard debugger)

solar whale
#

I have a JLINK on the connect, but it is not seeing it -- anything special I need to do -- is is SWD?

ionic elk
#

the DAP is super easy, move the J1 power connector from the furthest left to the second-to-furthest left and plug into the J41 USB

#

if the J1 power connector is already on the second-to-left the Jlink and USB-OTG might not work

solar whale
#

ah --- checking

ionic elk
#

wait no hang on I'm looking at the manual

lone axle
#

RE docs pages old version warning: I will spend some time brainstorming this week and looking at other projects docs to find some good examples (I use Django docs pretty regularly and don't have the same problem with it, perhaps we can take inspiration that or other docs pages). I'll make a note to discuss it in the weeds next week.

ionic elk
#

Ok, so J1 position 1 (pins 1 and 2) is power from J41 (CMSIS DAP) so I was wrong

#

J1 position 2 (pins 3 and 4) is J9, the main USB-OTG connector, which shares a circuit with the JTAG

#

Or rather it doesn't interfere with the JTAG? I think that if you have the DAP powered, it prevents the Jlink from working.

#

Also yes, your JLink settings should be for SWD.

solar whale
#

so - should I remove the jumper on J1 1-2?

ionic elk
#

I'm saying JTAG here as a name for the header but that's not the protocol you're using

#

Move the jumper from J1 1-2 to J1 3-4

#

and plug in the USB cable to J9

#

then start your Jlink

#

@lone axle thanks for checking that out, if you can figure out what they do to always route to the latest docs that'd be sweet

solar whale
#

that works!

#

thanks!

ionic elk
#

np

#

I'd consider grabbing the Hardware Guide from the NXP website. You have to sign up for an account to get it (sigh) but it's got all this info about the power and USB connections in it.

solar whale
#

thanks -- I am working through that now!

ionic elk
#

Not that it'll solve all your problems, NXP docs are pretty garbo in my opinion. You need to cross reference with the schematic PDF a lot

solar whale
#

do you then just load the firmware.hex file

ionic elk
#

I use firmware.bin but yeah whichever

#

if you're using GDB use the .elf

solar whale
#

with .bin do you need to specify an address?

ionic elk
#

You're using a Jlink, right? Are you using Jlink FlashLite or something?

#

Normally with a Jlink you always use gdb and an .elf file for symbol information, then connect and use load

solar whale
#

tried with JLinkExe ```J-Link>loadfile build-imxrt1010_evk/firmware.hex
Downloading file [build-imxrt1010_evk/firmware.hex]...
Comparing flash [100%] Done.
Erasing flash [100%] Done.

****** Error: Failed to erase sectors.

Unspecified error -1

#

I'll try gdb

ionic elk
#

what's that trick with JLinkExe?? I was bugging dan about that the other day

#

what are the commands you're using?

solar whale
#
what's that trick with JLinkExe?? I was bugging dan about that the other day
[11:05 AM]
#
SEGGER J-Link Commander V6.70g (Compiled Apr 23 2020 09:14:12)
DLL version V6.70g, compiled Apr 23 2020 09:14:02

Connecting to J-Link via USB.../opt/SEGGER/JLink_V670g/JLinkGUIServerExe: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory
O.K.
Firmware: J-Link V10 compiled Mar 19 2020 11:10:39
Hardware version: V10.10
S/N: 260101649
License(s): FlashBP, GDB
OEM: SEGGER-EDU
VTref=3.333V


Type "connect" to establish a target connection, '?' for help
J-Link>con
Please specify device / core. <Default>: MIMXRT1011XXX5A
Type '?' for selection dialog
Device>
Please specify target interface:
  J) JTAG (Default)
  S) SWD
  T) cJTAG
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "MIMXRT1011XXX5A" selected.

#
Found SW-DP with ID 0x0BD11477
DPIDR: 0x0BD11477
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770041)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FD000
CPUID register: 0x411FC272. Implementer code: 0x41 (ARM)
Found Cortex-M7 r1p2, Little endian.
FPUnit: 8 code (BP) slots and 0 literal slots
CoreSight components:
ROMTbl[0] @ E00FD000
ROMTbl[0][0]: E00FE000, CID: B105100D, PID: 000BB4C8 ROM Table
ROMTbl[1] @ E00FE000
ROMTbl[1][0]: E00FF000, CID: B105100D, PID: 000BB4C7 ROM Table
ROMTbl[2] @ E00FF000
ROMTbl[2][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[2][1]: E0001000, CID: B105E00D, PID: 000BB002 DWT
ROMTbl[2][2]: E0002000, CID: B105E00D, PID: 000BB00E FPB-M7
ROMTbl[2][3]: E0000000, CID: B105E00D, PID: 000BB001 ITM
ROMTbl[1][1]: E0041000, CID: B105900D, PID: 001BB975 ETM-M7
ROMTbl[1][2]: E0042000, CID: B105900D, PID: 004BB906 CTI
ROMTbl[0][1]: E0040000, CID: B105900D, PID: 000BB9A9 TPIU-M7
ROMTbl[0][2]: E0043000, CID: B105F00D, PID: 001BB101 TSG
Cache: Separate I- and D-cache.
I-Cache L1: 16 KB, 256 Sets, 32 Bytes/Line, 2-Way
D-Cache L1: 8 KB, 64 Sets, 32 Bytes/Line, 4-Way
Cortex-M7 identified.
ionic elk
#

Thanks! I'm not practiced at Jlink Commander yet. I'll try and wrap all that up in a script when I have a free second

solar whale
#

but loadhex fails -- for loadbin I need the load address -- is it at 0?

ionic elk
#

I don't know that off the top of my head, I'm not a pro on the i.MX flash loading shenanigans yet

#

I'd probably just try loading with GDB and then following what it does

solar whale
#

I tried, but it did not work either -- will try again -- loaded, but immediately halted when I typed c

#
A program is being debugged already.
Are you sure you want to change the file? (y or n) y
Reading symbols from firmware.elf...
(gdb) load
Loading section .dtcm_bss, size 0x228 lma 0x20000400
Loading section .flash_config, size 0x200 lma 0x60000400
Loading section .ivt, size 0x30 lma 0x60001000
Loading section .text, size 0x50010 lma 0x6000c000
Loading section .ARM.exidx, size 0x8 lma 0x6005c010
Loading section .data, size 0xc08 lma 0x6005c018
Loading section .itcm, size 0x1ab0 lma 0x6005cc20
Loading section .dtcm_data, size 0x400 lma 0x6005e6d0
Start address 0x6002318c, load size 339752
Transfer rate: 16589 KB/sec, 12134 bytes/write.
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x20201d78 in ?? ()
(gdb) 
#

I'm rusty with gdb -- am I missing something simple -- started with tar extended-remote:2331 then loaded file

ionic elk
#

try mon halt, mon reset, load

#

and check out the actual Jlink process to see if it's telling you about failing to halt or inability to access code locations or something

#

if all else fails you can try loading with the DAP, after swapping over the power connector like I mentioned

#

it's just drag and drop

solar whale
#

thanks -- I'll keep working at it. sorry to taek so much of your time. -- just got the maunal

#

for DAp -- which file do you load?

tulip sleet
#

I have some .gdbinit aliases that allow simpler connection and loading:

define jlink
  target extended-remote :2331
end

define jload
  jlink
  mon reset
  load
  mon reset
end

define jloadc
  jload
  echo Starting...\n
  continue
end
solar whale
#
(gdb) mon halt
(gdb) mon reset
Resetting target
(gdb) load
Loading section .dtcm_bss, size 0x228 lma 0x20000400
Loading section .flash_config, size 0x200 lma 0x60000400
Loading section .ivt, size 0x30 lma 0x60001000
Loading section .text, size 0x50010 lma 0x6000c000
Loading section .ARM.exidx, size 0x8 lma 0x6005c010
Loading section .data, size 0xc08 lma 0x6005c018
Loading section .itcm, size 0x1ab0 lma 0x6005cc20
Loading section .dtcm_data, size 0x400 lma 0x6005e6d0
Start address 0x6002318c, load size 339752
Transfer rate: 19517 KB/sec, 12134 bytes/write.
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0xfffffffe in ?? ()
(gdb) 
#

which file type does the DAP drag/drop accept?

ionic elk
#

.bins

solar whale
#

hmmm -- not my day -- that results in a FAIL.TXT file with error: File sent out of order by PC. Target might not be programmed correctly. type: transient

ionic elk
#

for the record I'm in the same boat, trying to get the 1062 to do literally anything and it's failing at every turn

#

I dunno if Jlink just isn't up to date with these boards or what

solar whale
#

Thanks for trying to help -- good luck with the current issues...

ionic elk
#

such is the price for cutting edge I guess.

solar whale
#

life in the fast lane ๐Ÿ˜‰

#

it's a miracle!! ( I reconnected) to J41 -- ws goin g to try Ozone -- and CIRCUITPY came up ``` Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.4.0-beta.0-483-g5f1398f27 on 2020-06-03; IMXRT1010-EVK with IMXRT1011DAE5A

help('modules')
main collections microcontroller supervisor
_os digitalio micropython sys
_pixelbuf displayio neopixel_write terminalio
_time errno os time
analogio fontio pulseio touchio
array gamepad random ulab
bitbangio gc re usb_hid
board io rtc usb_midi
builtins json storage vectorio
busio math struct
Plus any modules on the filesystem

ionic elk
#

so you're powering it off J41 but using USB on J9?

solar whale
#

sorry only on J9, not J41

prime flower
#

specifically - any pin mapping problems ?

solar whale
#

@ionic elk so -I'm not sure how it got loaded -- via JLink or DAP, but it is working via J9 --- BTW this build does not work on the teensys.

ionic elk
#

I'm not sure anything is working on the 1060

#

Jlink can't load onto a 1060 which makes everything really slow to determine, but it seems to be crashing directly after boot

solar whale
#

I am just using teensy_loader_cli for the teensys

ionic elk
#

aaaand now Jlink can't connect to it at all

solar whale
#

hmm -- now I can repeatedly load the .hex file cleanly via J-Lin -- Uising JLinkExe -- just set device , SWD default speed then loadfile firmware.hex ```J-Link>loadfile firmware.hex
Downloading file [firmware.hex]...
Comparing flash [100%] Done.
Erasing flash [100%] Done.
Programming flash [100%] Done.
Verifying flash [100%] Done.
J-Link: Flash download: Bank 0 @ 0x60000000: 1 range affected (393216 bytes)
J-Link: Flash download: Total time needed: 7.635s (Prepare: 0.051s, Compare: 2.837s, Erase: 1.324s, Program: 1.992s, Verify: 1.424s, Restore: 0.004s)
O.K.

#

needs a RESET after load (press SW9) or power cycle

manic glacierBOT
solar whale
#

teensy41 works ```Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.4.0-beta.0-485-gc93ccd1e9 on 2020-06-03; Teensy 4.1 with IMXRT1062DVJ6A

manic glacierBOT
solar whale
#

teensy40 boots ok with PR 3001 as well --

idle owl
#

Is there any reason to be using busio.I2C(board.SCL, board.SDA) anymore with board.I2C being a thing?

ivory yew
#

@idle owl not that I can imagine, especially for examples because it lowers the cognitive overhead.

idle owl
#

right.

ivory yew
#

The longer form is useful if you have multiple i2c buses available.

idle owl
#

I kind of want to push using it directly even.

ivory yew
#

But that can be explained in the guide specifically about i2c

idle owl
#
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_ahtx0.AHTx0(i2c)```
becomes 
```python
sensor = adafruit_ahtx0.AHTx0(board.I2C())```
#

But that can be explained in the guide specifically about i2c
@ivory yew entirely valid.

ivory yew
#

Yeah I'm all for that.

#

Especially since most folks will only use one i2c bus unless they're doing some fancy stuff.

idle owl
#

What is the concept of board.I2C() called? I'm trying to include a comment in this code about it but realised I'm not sure how to refer to it.

ivory yew
#

I don't know if we have any intentional terminology for that, but I generally refer to those types of things as helper constructors.

idle owl
#

hmm

#

I think I'll gloss over it for now

ivory yew
#

"alias" or "shortcut" works too

raven canopy
#

i'd agree with alias.

blissful pollen
#

I ran into the one/multiple I2C bus thing not long ago. One potential source of error is some drivers may take the pins SDA/SDC and not the board.I2C reference. That prevented re-use (or I did it wrong been a couple weeks now).

raven canopy
#

but now i'm trying to remember exactly where the object is created/handled. ๐Ÿ˜„

blissful pollen
#

If all drivers took board.I2C() rather then pins that would simplify things (or your own created I2C object)

slender iron
#

@idle owl I think you want singleton. It always refers to the same object even if you do it more than once.

idle owl
#

@slender iron It was for a comment in a simpletest. I went with something simpler that says essentially "create the object with I2C." It wasn't the place for programming terminology.

#

@slender iron But thank you for letting me know. I'll use that if I'm ever explaining it more thoroughly.

slender iron
#

kk, np

solar whale
#

so that's what singleton means ๐Ÿ™‚

manic glacierBOT
slender iron
#

@onyx hinge would it make sense to have sdcardio.SDCard take in a bus that is either a busio.SPI or sdioio.SDIO?

#

that way you don't duplicate the block API

onyx hinge
#

To a user, absolutely. The structure of the C code didn't turn out to share any implementation, though.

slender iron
#

are the command sets related? aka is there a world where it could be?

#

I think it's ok if the C impl splits hard

onyx hinge
#
GitHub

This commit adds sdcardio.SDCard. It presents the interface required by storage.VfsFat for mounting additional filesystems. It is nearly, but not quite, compatible with adafruit_sdcard.SDCard: It...

manic glacierBOT
slender iron
#

@onyx hinge I don't think the Python API should reflect the reality of the C

onyx hinge
#

would the type exposed to Python use function pointers for the "real functionality" then?

#

whether with protocols or not

#

I'll need to think about how that would work, but it is probably doable

slender iron
#

ya, if you want to do it that way

#

I think you answered the Python API question though ๐Ÿ™‚

onyx hinge
#

thanks for the check on my natural laziness. Jot something down on the PR so I keep going in the right direction?

slender iron
#

๐Ÿ‘ will reply there

onyx hinge
#

maybe write what the constructor should look like, it might take an SPI bus plus a required CS pin, or an SDIO bus; either one takes a frequency/baud rate

#

SDCard(bus, *, frequency, chip_select=None)

#

?

slender iron
#

I wonder if it's time to make bus device native

#

(it handles exactly that)

manic glacierBOT
#

I think it'd be better to separate the bus from the SDCard APIs here.

# Connect to the card and mount the filesystem.
bus = busio.SPI(board.SD_SCK, board.SD_MOSI, board.SD_MISO)
device = adafruit_bus_device.SPIDevice(bus, board.SD_CS) # Also takes frequency, polarity and phase.
# For SDIO
# device = sdioio.SDIO(clock=board.SDIO_CLOCK, command=board.SDIO_COMMAND, data=(board.SDIO_DATA,), frequency=25000000)
sdcard = sdcardio.SDCard(device)
onyx hinge
#

@slender iron yeah we can't use busdevice here unless it's in C too

#

and it's having to cooperate with foreground python use that gets us https://github.com/adafruit/circuitpython/issues/1762 -- the way that this PR was going to solve it also involved taking sole usage of the whole SPI bus ๐Ÿ˜ฆ

GitHub

I tried to make a game that would have both music and graphics. I decided to make a simple Tetris game for the Hallowing. The code is here: https://github.com/deshipu/hallowing-tetris Unfortunately...

#

er maybe that's not the bug I meant, the one where SD card access in foreground interferes with background

#

the "solution" is that only C code touches the bus, never python code that locks it via busdevice

topaz quest
#

@slender iron so, uh, I was trying to figure out if I could use some scripting magic to full the SPDX copyright lines in circuitpython (because those are definitely not as straightforward as the other repos) and I have a feeling that a .mailmap might be useful :)
you appear to have four separate email addresses in the log XD

#

sorry, five

solar whale
#

@ionic elk I was just playing with the imxrt1010-evk a bit and ran out of memory when running a test -- is this correct? ```
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.4.0-beta.0-483-g5f1398f27 on 2020-06-03; IMXRT1010-EVK with IMXRT1011DAE5A

import gc
gc.mem_free()
27792

topaz quest
#

Hah, the docs already use the grouped option: copyright = '2014-2020, MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)'

#

I guess I can do that

ionic elk
#

@solar whale I know there's an issue where the i.MX chips are showing a way smaller stack size than they're supposed to have, but I don't know an easy way to solve it. On STM32 it was just changing a variable that wasn't supposed to be set.

solar whale
#

I was trying to run a test with an ESP32SPI Airlift board but it runs out or memory loading the libraries.

#
Adafruit CircuitPython 5.4.0-beta.0-483-g5f1398f27 on 2020-06-03; IMXRT1010-EVK with IMXRT1011DAE5A
>>> import esp32spi_simpletest
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "esp32spi_simpletest.py", line 4, in <module>
  File "adafruit_esp32spi/adafruit_esp32spi_socket.py", line 37, in <module>
  File "adafruit_esp32spi/adafruit_esp32spi.py", line 146, in <module>
  File "adafruit_esp32spi/adafruit_esp32spi.py", line 527, in ESP_SPIcontrol
MemoryError: memory allocation failed, allocating 376 bytes
>>> 

#

not surprising if < 28K is avaialble

#

the teensy41 shows >900k availalbe !

#

I was just curious if this was expected or if something was not configured properly

#

Maybe that is consistent - the teensy41 has 1M of ram and shows ~930K free. CP must be using ~90K of the avaialble RAM

#

or somthing is taking 90K out of avaiability

onyx hinge
#

ports/mimxrt10xx/linking/chip_family/MIMXRT1011.ld:ram_size = 128K;

solar whale
#

it appears to reserve 64K for other purposes

onyx hinge
#
OCRAM (rwx)           : ORIGIN = 0x20200000, LENGTH = ram_size - 64K
solar whale
#

so only 28K available is realistic -- too bad -- really limits the usefulness

#

an M4 only has 192K to start but ~160K is avaialbe once CP starts up. Since this chip only has 128K and holds back 64K ....

#

I guess thats why its an EVK

slender iron
#

@slender iron so, uh, I was trying to figure out if I could use some scripting magic to full the SPDX copyright lines in circuitpython (because those are definitely not as straightforward as the other repos) and I have a feeling that a .mailmap might be useful :)
you appear to have four separate email addresses in the log XD
@topaz quest heh, oops!

ionic elk
#

@lucid solar when you were setting up the clocks for the F746, was there a particular reason you wanted the USB on the SAI PLL? Or was it just circumstantial?

lucid solar
#

@ionic elk I think I took the defaults from cubemx

slender iron
#

@solar whale the 64k is used for ITCM and DTCM (which is where the stack lives)

#

32k each

solar whale
#

but 28K is not enough to live on ...

topaz quest
#

@topaz quest heh, oops!
@slender iron I'll send a mailmap on the pull request for reuse. You're far from the only one so it's nice to sort out names ๐Ÿ˜‰

lucid solar
#

@ionic elk or...no...there was no reason...so if you need to change it...do it...as long as it works ๐Ÿ˜„

solar whale
#

for importing libs

ionic elk
#

@lucid solar there was a reason you can't remember?

slender iron
#

that's why I've said the 1010 is small but fast

lucid solar
#

@ionic elk no reason

ionic elk
#

The F412 uses it, but that's because the divisors to achieve 100MHz are mutually exclusive with getting 48M for the USB

solar whale
#

just too bad it can't support esp32spi....

slender iron
#

if you don't have the TCMs you are relying on the CPU cache to keep you going fast. otherwise you are fetching from flash

#

arturo frozen esp32spi in

#

we have tons of flash

solar whale
#

ah -- great idea -- I'll play with that

ionic elk
#

Ok, all good! Just wanted to make sure. I'm leaving it in there as an option just in case somebody wants to set their system clock to something weird.

lucid solar
#

@ionic elk Is this for disco, or nucleo, or both?

solar whale
#

@slender iron which board did arturo do that for? freeze esp32spi?

slender iron
#

his feather

solar whale
#

thanks

slender iron
#

np

manic glacierBOT
lucid solar
#

@ionic elk ok...yes...there was a reason...now I remember ๐Ÿ™‚ The nucleo board has it on PLLQ...which is fine. But the disco needs it because the clock speed should be 200mhz max (for the external sram, or external flash...I forget which). And I couldn't get the clocks to calculate by having it on the PLLQ...so it's on SAI...which is what the default is on cubemx

ionic elk
#

Oh that's right yeah you were talking about that

lucid solar
ionic elk
#

Did you actually ever implement the external SRAM?

lucid solar
#

No, but it's on my todo list.

ionic elk
#

In any case, OK! good reason to keep that whole option available.

manic glacierBOT
#

This is a request for capability for slice manipulation for multi-dimensional arrays. This would allow more of the code to be performed "down" at the C-level rather than item-by-item manipulation up at the CircuitPython level.

Use case description: For developing an updated text display capability to reduce memory usage vs. label when using imported BDF files, one way is to create a bitmap buffer to contain the text, rather than a group of tileGrids. To do this, I copy each glyph bitmap ...

manic glacierBOT
#

Pretty low-key PR. These are some changes I've been holding onto while working on RosiePi.

  • Biggest change is to the use of async as a parameter/variable. async became a keyword in CPython 3.7, so its usage would raise an exception.

  • Updated usage of pyserial to match the changes from version 3.

  • Ran black on the file.

  • Added VID/PID for itsybitsy_m4_express to the respective USB device lookup functions

manic glacierBOT
onyx hinge
#

Oh this is awesome, you can zoom in on just one commit out of all of the commits in a PR

#

so I could look at the parts before "run black formatter", which made the other changes harder to spot

manic glacierBOT
raven canopy
#

oh. did the new UI go GA? or are you on the preview too?

pseudo gale
#

Are there any other good examples of games utilizing the Stages library aside from Vacuum-Invaders and Jumper-Wire?

stuck elbow
#

@pseudo gale not that I am aware of

#

I'm working on a sokoban clone, but it's not ready yet

hybrid scarab
#

I'm in your GitHubs, wrangling your APDS9500 library!

onyx hinge
#

@raven canopy I may be on preview

balmy sail
#

@pastel panther im looking at your code for i2c on adxl34x and notice that when calling to read data you only use 0x32 which equates to X-Axis Data 0, you never call the y or z data, yet you get all three channels. i cant find this written in the datasheet anywhere that it pull all the data from 0x32

hybrid scarab
#

@balmy sail you mean x, y, z = unpack("<hhh", self._read_register(_REG_DATAX0, 6)) ?

stuck elbow
#

you can read consecutive registers if you read more bytes from them

hybrid scarab
#

That reads 6 bytes starting from 0x32, using register auto-increment, and then uses struct to unpack them into three two-byte, little-endian, signed integers (short).

#

Whether the i2c device at the other end sends the same byte, or auto-increments is an exercise left to the manufacturer though ๐Ÿ˜†

timber mango
manic glacierBOT
#

This is a very excellent point, and I don't consider it a nit-pick at all.

I don't expect many people are using this. I point to it as an example how to interact with boards via a PC, but that's about it.

A lot of the semantics are so that it remains py2/py3 compatible, from what I understand (its base is MicroPython's tools/pyboard.py. I'll likely give it more scrubs for a multitude of reasons. One of those scrubs will include removing Python2 use; not worth using at this point.

onyx hinge
#

๐Ÿ‘ for not clinging to python2 compatibility at this point

ionic elk
#

@onyx hinge Hey I'm sorry for not getting to your PR yesterday, I should be able to check it out this afternoon.

onyx hinge
#

@ionic elk that's fine, thanks!

hybrid scarab
manic glacierBOT
manic glacierBOT
#

This PR significantly reworks the STM32 clock system, moving all LSE related settings to the peripherals directory, and streamlining clock settings across all development boards. Resolves a number of crashes that could occur across dev boards due to incorrect LSE setup, and adds LSE capability to the F7 and H7 chip families.

The restructuring of the clock system merges the clock setup of all SoCs in a family, reducing chip-line differences and defaults to macros only. Also introduces the ...

old smelt
#

Hi All - I noticed that there is no option for getting 5.3.0 nor 5.4.0-beta on our CircuitPython.org page. Is that because our board was merged after those builds were released?

https://circuitpython.org/board/aloriumtech_evo_m51/

The Evo M51 is an FPGA-enhanced Feather compatible compute module from Alorium Technology that features a 32-bit SAMD51 microcontroller along with an Intel MAX 10 FPGA.Designed for use as an embeddable system-on-module, all of the standard Feather I/O are also routed to castel...

slender iron
#

@old smelt yup! which reminds me that I meant to release a beta this week

old smelt
#

Thanks @slender iron . So, if I want to make a clean build for our boards, I could do that locally by checking out the 5.3.0 branch?

slender iron
#

that won't have your board

ionic elk
#

@onyx hinge what's with the _ prefix on sdcardio?

slender iron
#

the beta will be on master

old smelt
#

Oh. Yeah, that makes sense.

#

Ok. It's not urgent. I'll just wait for the next Beta release.

slender iron
#

๐Ÿ‘ will do by the end of tomorrow

old smelt
#

Cool. I'll message you at 11:59:59pm PDT. ๐Ÿ™‚

slender iron
#

๐Ÿ˜„

onyx hinge
#

@ionic elk we expect it's not the final API

#

and/or the final API will be wrapped by adafruit_sdcard

ionic elk
#

So are you going to replace it? Or is it a new class of common-hal module for a wrapped API?

onyx hinge
#

It's going to change compared to what's there now

#

ultimately, we want a "bus object" for SDIO buses, for instance. Not sure if joking, tannewt suggested "sdioio"

#

is the "_" causing a problem for you at this time?

ionic elk
#

oh no I was just curious, didn't mean it to sound abrasive

ivory yew
#

ah yes, sdioioioioioio.

pastel panther
#

@balmy sail re: x-axis vs. y and z, it's a common (and good) practice to read all of the measurement registers at once rather than individually, and most sensors will have a way to automatically increment the register address that you're reading from. We use this to start reading at the first byte of the x-axis data and read through all six bytes of data to get it all at once

onyx hinge
#

@ivory yew are you working on the theme song for "eye on sdio"?

pastel panther
#

@balmy sail Regarding spidev vs. adafruit_spi_device, the former is a CPython (normal python) library and the later is a CircuitPython library meant to be used with microcontrollers running CircuitPython, though it can be used on the RPi and other computers through Blinka.

#

since Adafruit_CircuitPython_ADXL34X is a CircuitPython library, the later is what we use

static jay
#

@onyx hinge @ivory yew I think Phil Collins already wrote one...

old smelt
#

Also - @slender iron - still up for an abstraction library discussion?

slender iron
#

sure, when works for you?

#

@old smelt

ionic elk
#

@slender iron could you help me to understand how Systick works in the low power system? Is it disabled by your low power code, or turned on periodically? I don't see references to it in port.c so I'm kinda confused.

slender iron
#

systick isn't used at all

#

what's turned on periodically is a period interrupt from the rtc

ionic elk
#

huh

#

I'm puzzled at how basically anything in the HAL is working then, because they all use GetTick all the time, and that depends on Systick incrementing

slender iron
#

the hal could turn it on

ionic elk
#

I think it's got to be on right now for all ST boards

manic glacierBOT
#

The altfunction is GPIO_AF12_SDIO. Do you think we should bring this in as a peripheral in the peripherals/ directory? I'm a little split on it because the pins are actually the exact same across every F4, F7 and H7 chip line, including the altfunction. That was also the case for the DAC, so I just defined it in-module. But it's a bit of a deviation from the rest of the ST modules to have actual chip information in the module itself instead of using peripheral instances.

#

I'm not totally sure what to do here. In Micropython's low power implementation, HAL_GetTick isn't overridden at all - they use the system version, which depends on SysTick. HAL_Delay dynamically selects whether to run a SysTick based delay or a busy loop depending on whether interrupts are enabled or not.

I don't know how anything in the HAL could even be working without HAL_GetTick since it's used more or less constantly for timeouts, which implies to me that the Systick is currently tu...

slender iron
#

@old smelt going for a run now but will be around after

manic glacierBOT
ionic elk
#

@onyx hinge what was your actual experience trying to overwrite HAL_GetTick()

#

Like what happened

onyx hinge
#

@ionic elk it hung at startup. I think, because there are (were) HAL_GetTick() calls inside the clock setup stuff

#

fwiw I have merged your clock PR into my sdio branch and the SDIO code isn't working

#

and then I started going down a rabbit hole

ionic elk
#

Yeah. This is going to be tricky. Right now I don't think that the low power code on STM32 is actually doing anything, because Systick is turned on by HAL_Init and is never explicitly turned off

onyx hinge
#

I have not made sure to fully power cycle (vs just doing a jlonk flash) so I should do that

ionic elk
#

So basically all of this RTC stuff is running in parallel to just normal, full speed SysTick driven operation

onyx hinge
#

Possibly, but my testing shows that the SysTick interrupt stops being called, with SysTick->CTRL set to 0 and I don't know why yet (that's the rabbit hole)

ionic elk
#

does it really?

#

The issue is that every single HAL init function uses HAL_GetTick for timeouts, and it depends on SysTick. So right now, if Systick turns off, that means that every single module is going to stop working.

onyx hinge
#

I see SysTick_Handler be hit 4 times as a breakpoint after reset, and then no more

ionic elk
#

On my new power PR?

onyx hinge
#

yes, though likely also before it

#

(because that's consistent with what I saw before it, that the GetTick value never increased)

#
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/jepler/src/circuitpython/ports/stm/build-feather_stm32f405_express/firmware.elf 
[Switching to Thread 57005]

Breakpoint 11, HAL_InitTick (TickPriority=15)
    at st_driver/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c:256
256      if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U)
(gdb) c
Continuing.

Breakpoint 8, SysTick_Handler () at supervisor/port.c:190
190        SysTick->CTRL;
(gdb) 
Continuing.

Breakpoint 11, HAL_InitTick (TickPriority=15)
    at st_driver/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c:256
256      if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U)
(gdb) 
Continuing.

Breakpoint 8, SysTick_Handler () at supervisor/port.c:190
190        SysTick->CTRL;
(gdb) 
Continuing.

Breakpoint 8, SysTick_Handler () at supervisor/port.c:190
190        SysTick->CTRL;
(gdb) 
Continuing.

Breakpoint 8, SysTick_Handler () at supervisor/port.c:190
190        SysTick->CTRL;
(gdb) 
Continuing.
``` (and never after that, while typing in the repl)
ionic elk
#

Man that is pretty baffling, I don't know how it's even getting through my clock code if that's the case. And that PR works fine on all my chips, I just tested it

#

I must be missing something

lapis hemlock
#

@onyx hinge Jeff, do you happen to have a snippet, where you pass a ulab array to something with the buffer protocol? I thought your blood pressure sensor did that, but I don't see it now.

onyx hinge
#

@lapis hemlock I may not. Here's what the fft demo did: mic.record(samples_bit, len(samples_bit)) samples = ulab.array(samples_bit[3:])

ionic elk
#

wait not my new power pr my new clock pr? the one I just posted

#

with all the new clock setup shenanigans?

onyx hinge
#

the clock PR

ionic elk
#

hmmm

lapis hemlock
#

@lapis hemlock I may not. Here's what the fft demo did:...
@onyx hinge That should probably do, thanks!

ionic elk
#

Ok. I'm going to take a quick break and then come back to this. I don't want to completely dive down the rabbit hole without @slender iron around, I'm worried I might waste time rediscovering something he already solved

onyx hinge
#

OK, let me just recap. I have an stm32f405 feather with an attached jlink. I flashed it with Adafruit CircuitPython 5.4.0-beta.0-493-gfffe171d5 on 2020-06-04; Feather STM32F405 Express with STM32F405RG via jlink, restarted and re-powered everything

#

I set a breakpoint on SysTick_Handler and continued in gdb. The breakpoint is only hit 3 or 4 times before it stops

#

I think that explains why Hal_Delay and Hal_GetTick do not work as expected

#

but I have not found what resets SysTick. It ends up looking like this: ```(gdb) p $SysTick = (SysTick_Type*)0xe000e010
$1 = (SysTick_Type *) 0xe000e010
(gdb) p *$1
$2 = {CTRL = 0, LOAD = 5040, VAL = 5028, CALIB = 1073760574}

#

Old value = 7
New value = 5
0x080500c6 in common_hal_mcu_delay_us (delay=840000) at common-hal/microcontroller/__init__.c:48
48        while ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) {}
(gdb) 
Continuing.

Hardware watchpoint 2: -location $1->CTRL

Old value = 5
New value = 0
0x080500da in common_hal_mcu_delay_us (delay=840000) at common-hal/microcontroller/__init__.c:50
50    }
#

oh.

ionic elk
#

Right. But it doesn't explain why everything else is working. Right now I don't understand conceptually what the state of SysTick is. If it's turned off, then without overrides of Hal_GetTick and Hal_Delay, basically nothing should be working - not the clock setup, GPIO, nothing. But you're saying that it is turned off, and I know that the chips aren't totally broken because I just tested them. So I'm confused.

#

@onyx hinge what's your revelation?

onyx hinge
#

That common_hal_mcu_delay_us is what is changing SysTick setup

#
    uint32_t ticks_per_us = HAL_RCC_GetSysClockFreq()/1000000;
    delay *= ticks_per_us;
    SysTick->LOAD = delay;
    SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk;
    while ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) {}
    SysTick->CTRL = 0;
}
ionic elk
#

so this turns on SysTick for the duration and then turns it off again

onyx hinge
#

Frustratingly, since I thought my code and hardware worked, my sdio test code is failing before I merge in your code, so that's a red herring

#

๐Ÿคท

ionic elk
#

Maybe the HAL turns on the SysTick for every HAL function?

onyx hinge
#

I don't see any code doing that, and my gdb session is telling me that SysTick isn't usually being executed

#

and if the "watch" of the CTRL register is working, it's telling me there aren't any manipulations of CTRL from C code

#

I think it is working during early setup until the first common_hal_mcu_delay_us and broken after that

#

many of the uses of GetTick that I saw are for waiting for something to time out; so if things happen on schedule, it doesn't matter that the ticks aren't counting up. But there are explicit delays in the sdio setup and it is well after the rest of circuitpython startup, and those definitely fail

ionic elk
#

Yeah that seems likely to me. So basically the low power code isn't really running until a module calls common_hal_mcu_delay_us and then it probably breaks. I don't think many (any?) of my existing modules call it so I may simply have just never noticed it in testing

#

yeah only PulseIn uses it

onyx hinge
#

I'm stepping away, before I get too frustrated at my own code which stopped working while I wasn't watching. I hope this is useful food for thought.

#

(not because of you, the code I pushed also isn't working)

ionic elk
#

Well it's possibly a pretty big bug so yeah! Good we found it. I'll think about a quick/long term fix for now

#

I'll try and use PulseIn on Master and see if it crashes everything

#

If so we might want to disable low power as a short term fix and then I'll need to spend some time messing with the HAL_Delay and HAL_GetTick overrides so they can use SysTick for the beginning of Port Init for clock setup and then turn it off and use the RTC code only after that.

manic glacierBOT
manic glacierBOT
steep oasis
#

Hello. I have a custom board Iโ€™ve made using Adafruitโ€™s Itsy Bitsy M0 board. I can get the ITSYBOOT. But when I drag a CircuitPython file over, it copies, goes away, and nothing else happens.

lucid solar
slender iron
#

@old smelt free in 20 minutes?

steep oasis
#

Yes. Iโ€™ve tried that and the 5.4.0 beta.

lucid solar
#

In the ITSYBOOT drive, there is a file INFO_UF2.txt, can you see what version of the bootloader you have? @steep oasis

steep oasis
#

@lucid solar UF2 Bootloader v3.10.0 model ItsyBitsy M0 Express.

lucid solar
#

OK, that's the latest

steep oasis
#

@lucid solar I want to point one thing in the HW. Adafruit doesnโ€™t list the memory chip they use. I sourced my own. Not 100% sure if itโ€™s the right one. Or if it even matters.

lucid solar
#

Ah, did you make your own board? not a board with an Adafruit's Itsy Bitsy on it?

steep oasis
#

@lucid solar thatโ€™s correct! I took their schematics and made my own PCB.

lucid solar
#

Aha, I misunderstood ๐Ÿ™‚ That explains it though...there is probably something custom that the default firmware won't work. What's the flash chip you brought?

steep oasis
#

MX25R2035FZUIL0. One sec and I can bring up a data sheet link.

lucid solar
#

That's ok...don't need that.

#

It seems 'W25Q16FW, GD25Q16C' are the ones used on the itsy-bitsy M0 according to the code.

steep oasis
#

Dang. I didnโ€™t think to look at the code for the PN they used. Iโ€™m guessing the quickest path forward is to replace the part? Probably easier than making my own board variant?

tough flax
#

Hi Folks - been a while - hope everyone's healthy and safe

lucid solar
#

Well...maybe that's best if you want to use the pre-built firmware....but it might be quick to add support for your chip...are you able to compile circuitpython yourself @steep oasis

steep oasis
#

@lucid solar link for getting started with that?

tough flax
#

Does anyone know of a USB C jack that is pin-compatible with the USB Micro jacks on the Feathers? I have a project that basically needs a feather but needs USB-C support to connect to an ios device

lucid solar
#

@steep oasis I can try to compile it for you quickly...just need some settings...maybe you can get them from the datasheet to save me time?

tough flax
#

That would allow the NRF52840 Sense feather to do everything in CP instead of building a custom board

lucid solar
#
    .total_size = (1 << 21), /* 2 MiB */ \
    .start_up_time_us = 5000, \
    .manufacturer_id = 0xef, \
    .memory_type = 0x60, \
    .capacity = 0x15, \
    .max_clock_speed_mhz = 133, \
    .quad_enable_bit_mask = 0x02, \
    .has_sector_protection = false, \
    .supports_fast_read = true, \
    .supports_qspi = true, \
    .supports_qspi_writes = true, \
    .write_status_register_split = false, \
    .single_status_byte = false, \
}``` This is what info we need to find out.
old smelt
#

@slender iron - in a meeting right now... Not sure if I'll be done.

#

I'll let you know

tulip sleet
steep oasis
#

@lucid solar ooooof. Let me see if I can find all this quickly.

tough flax
#

@tulip sleet the goal is to connect a lightning -> USB-C cable to the device

#

Honestly, what I want is an NRF52 board w/a USB-C jack on it.

#

I haven't found one yet (from the fruit or on CP.org)

tulip sleet
#

as opposed to lightning to USB A female

tough flax
#

It might work

#

I have found the fewer adapters the better with ios

#

But it's higher cost and doesn't have the charging support

#

I will send that cable to them and ask if it's OK

slender iron
#

@old smelt I'm around just ping me when you are done

steep oasis
#

@lucid solar Iโ€™ll need to get to you on this info. Unsure on some of these values.

lucid solar
#

@steep oasis I'll take a look...

steep oasis
#

@lucid solar thanks. Iโ€™ll be back on in a bit. Thanks for your help!

lucid solar
#

@steep oasis One thing to note, the chip you have is 2M-bit, but the one on the itsy is 2M-byte...that's a big part of the issue

old smelt
#

@slender iron - looks like I need to head to the Home Office from the Office Office. So, I'll be traveling for a bit. You free for a while? Or should we try for tomorrow instead?

slender iron
#

@old smelt I'm around for three hours at least so today should work

old smelt
#

ok

manic glacierBOT
#

The ST Hal makes extensive use of the HAL_Delay and HAL_GetTick for timing out operations. Normally, these functions use the SysTick interrupt to increment every millisecond - this remains true for the startup period of the STM32, as SysTick is turned on by HAL_Init and is not explicitly turned off until the common_hal_mcu_delay_us is called, which sets the SysTick->CTRL register to 0 (typically the first instance of this function is in microcontroller __init__.c). After SysTick is turned...

lucid solar
#

@steep oasis This is the firmware for CircuitPython with the settings I believe should work. However...you might need an updated bootloader also. Try this, if it fails I'll take a look.

steep oasis
#

@steep oasis One thing to note, the chip you have is 2M-bit, but the one on the itsy is 2M-byte...that's a big part of the issue
@lucid solar bits. Bytes. Whatโ€™s the difference? ๐Ÿ˜‰๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ

#

@lucid solar I was tasked with cooking. Iโ€™ll try after dinner.

lucid solar
#

ok, good luck

steep oasis
#

@lucid solar with cooking or updating? Expert in neither.

old smelt
#

@slender iron - back online. Have a few minutes?

slender iron
#

@old smelt yup, let me grab some water

simple pulsar
#

I just noticed an error in my program caused REPL to appear ```Traceback (most recent call last):
File "code.py", line 646, in <module>
File "code.py", line 413, in broadcastAndReceive
NameError: name 'seqs' is not defined

Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit Circuit Playground Bluefruit with nRF52840

``` but usually Press any key to enter the REPL. Use CTRL-D to reload. pops up before that. Is that expected in this case? This is 5.3.0 on a CPB. Added later: I can't recreate this with simple code perhaps I'd pressed a key after Cntrl-D but I don't think I did.

steep oasis
#

@lucid solar same behavior. I just copied the file you sent to the ITSYBOOT drive since it was a UF2 file. Rebooted. And nothing after that. Adafruit is probably not using the W25Q16FW since the max voltage is 1.95V. I found the GD25Q16CEIGR on digikey. Iโ€™ll get it ordered one of these days and test it out. Iโ€™m willing to try compiling it if you can point me to the right direction.

timber mango
#

I have been tinkering with I2C as I start working on the multi-display code for the HT16K33 library. When I dopython import board import busio i2c = board.I2C()My script can not get a lock on the bus. However, if I switch topython i2c = busio.I2C(board.SCL, board.SDA)everything works as expected. Is this a problem for anyone else? Circuitpython v5.3.0 on a Feather M4 Express.

topaz quest
#

uh this is fun โ€” extmod/crypto-algorithms/ is imported from http://web.archive.org/web/20180225071418/http://bradconte.com/sha256_c โ€” which is hosted on github https://github.com/B-Con/crypto-algorithms with a single note that the code is public domain
except that's a bit ... iffy for me to contribute to now ๐Ÿ˜

lucid solar
#

@steep oasis Just so you know, I'm on European time (CET). Shame that didn't work. We can try to compile something that's more simple...like a blink test for example. Let me know when you're next working on it and I'll guide you through things.

topaz quest
#

Update: I might have a way to contact the author, and see if I can get a proper license attached to those files, and see if they can be synced then

manic glacierBOT
#

Just a heads up for now -- I'l try to characterize this better.

when I copy/paste code to the REPL on MIMXRT boards I have seen the following
on Teensy 41 - trying to past this

import adafruit_sdcard
import digitalio
import board
import storage
import sys
# Connect to the card and mount the filesystem.
spi = board.SPI()

causes the board to enter the bootloader (red LED starts "breathing" - CIRCUITPY drive disconnects)

on the IMIXRT1010-EVK - a similar large-ish past ...

steep oasis
#

@lucid solar Iโ€™ll be around most of the day. Iโ€™m on EST time.

lucid solar
#

@lucid solar Iโ€™ll be around most of the day. Iโ€™m on EST time.
@steep oasis switching to a direct-message so as to not clutter this channel.

manic glacierBOT
#

I've been experimenting with SPI on the IMIXRT1010-EVK and have found that I can only connect to SPI devices if I use D10 as the CS pin
I have tried D9 and D5 and they both fail - I have not tried every pin ... yet
I tried this with a FRAM_SPI, BMP_388 , SD Card Breakout
All work on D10 but fail on other pins.

Is there a known reason for this?
The board document - shows SDP_CS on D10 but on other boards - any GPIO works,

I have verified that other pins work fine on the Teensy41 and...

odd warren
#

Hi ๐Ÿ™‚ I have a nRF52840 development board that will be available soon, and I was wondering where to get started adding support for CiruitPython as well as the eligibility of the board to get a VID/PID donation.

stuck elbow
#

@odd warren check out the ports/nrf52 directory of the source code

#

@odd warren and check the closed issues on that repo for examples of vid/pid requests

odd warren
#

is there one that comes first in the process? as in should I get the board working with circuit python before requesting for a VID/PID or the other way around?

stuck elbow
#

you need to know vid/pid to write the board definition

odd warren
#

ok, thanks!

stuck elbow
#

oh, you may also need a bootloader config, that's in the uf2-samdx1 repo

#

also in the boards directory

odd warren
#

I put in a pull-request to add my board to the adafruit-nrf52-bootloader repo, but that's where I got told to come here first for a vid/pid

stuck elbow
#

ah, sorry, of course, that's nrf52 not samd, my bad

tidal kiln
#

@timber mango can't recreate that issue.

>>> import board
>>> import busio
>>> i2c = board.I2C()
>>> i2c.try_lock()
True
>>> 
Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit Feather M4 Express with samd51j19
>>> import board
>>> import busio
>>> i2c = busio.I2C(board.SCL, board.SDA)
>>> i2c.try_lock()
True
>>> 

but also, you generally shouldn't be calling try_lock directly. instead, use i2c_device with a context manager

manic glacierBOT
crimson ferry
#

@timber mango meaning i2c.try_lock() is never True, you can't scan the bus, etc? I've been running 5.3.0 and 5.4 beta with board.I2C() and haven't noticed any issues scanning or using devices.

timber mango
#

@crimson ferry @tidal kiln I can not reproduce it this morning either. I have no idea what was wrong last night.

tidal kiln
#

ah. the classic wait a day solution. i use that one also ๐Ÿ™‚

#

it might start happening again though. if it does, post the full stack trace.

ionic elk
#

@onyx hinge could you help me understand this little snippet you used?

uint8_t subticks;
uint32_t result = (uint32_t)port_get_raw_ticks(&subticks);
return (result * 1000) + (subticks * 1000 / 32);
#

is it returning milliseconds from boot?

manic glacierBOT
#

When setting a bitmap palette item to transparent using palette.make_transparent(0), the display is not redrawn.

This test code shows a full-screen bitmap that is first printed as red. Then the bitmap's palette color is updated to white. Then the bitmap's palette color is set to transparent. However, this does not trigger the screen to redraw as transparent, instead the color remains white in this example.

Perhaps this is an issue with the dirty rectangle tracking in displayio.
...

onyx hinge
#

@ionic elk One misunderstanding I had was thinking that HAL ticks were us, not ms. so I was trying to return us from this function, which is not right.

#

"subticks" are apparently 32us each from what I could see

ionic elk
#

Yeah I've been poking at it since I posted and I've just swapped over to a direct return of port_get_raw_ticks

#

working ok so far

onyx hinge
#

er still not sure how long a subtick is, but subticks are a red herring here

ionic elk
#

Ok I think I've got it

#

Try merging my latest push to the clock PR

#

It has overrides for HAL Delay and GetTick

manic glacierBOT
ionic elk
#

Also, is this new style checker trying to actually automatically change things and failing, or is it functioning as a warning system that I need to go in and manually correct? It's a little hard to tell.

#

@onyx hinge sorry, should have pinged directly. My new push should have a fix for your SDIO clock issues.

teal bear
#

redirected me to a login page - is that expected ?

ionic elk
#

I just tried it on an incognito page and it worked fine

#

@teal bear what browser are you using?

teal bear
#

FF... hmm.. let me dig

ionic elk
#

maybe delete your cookies or something

teal bear
#

weird, works now

#

yeah, works everywhere. never mind :p

onyx hinge
#

I sometimes get sent to an unexpected page when visiting learn.adafruit.com, haven't figured out the pattern.

#

@ionic elk I'll try your latest code with my sdio code today or tomorrow.

solar whale
#

@ionic elk if you are asking about the "black" formatter check, in my experience, once you submit, it checks and flags if it finds anything it does not like. it is up to you to run it locally to actually make the changes.

simple pulsar
slender iron
#

@onyx hinge a tick is 1/1024 of a second and it has 32 subticks. basically standardizing on a 32.768khz crystal

tulip sleet
#

@slender iron q re type hints in c code doc. I am seeing stuff like:

//|      some_property: bool = ...
//|      "The docstring for some_property"""

but in the mypy doc, they use @property, e.g.:

//|      @property
//|      def some_property(self) -> bool:
//|          ...

Did you intend in the long run to do the former or the latter?

2nd q: I am seeing def __init__(self, ) with the extraneous comma. Was that deliberate or just the result of some auto-generation.

(All the above is due to me doing a bit of cleanup in _bleio as part of the the bleak work.) Tnx

slender iron
#
  1. either way is fine with me as long as it works
#
  1. it's something dylan did. I'm not sure why
tulip sleet
#

tnx, I think the @property is actually the way that's expected. It is a big task to clean all the defns up. I'll open one or more issues eventually.

#

@trim elm do you have any comment on the above (starting 1:38pm)

ivory yew
#

the first form is super common in Sphinx documentation, so it should work just as well.

tulip sleet
#

but does mypy and pycharm etc, understand it?

#

also it doesn't distinguish r/o vs r/w

ivory yew
#

MyPy should be able to pick up that type annotation.

tulip sleet
#

ok, tnx, I am looking at the mypy doc and don't see any examples like that

ivory yew
tulip sleet
#

i was looking at PEP484 only

manic glacierBOT
trim elm
#

@tulip sleet Yeah, I was more or less just copying the stubs generated by the previous version of make stubs. If it's something that need fixing (or testing) I'd be willing to do either.

#

oh, yeah, and on question 2, that was a result of auto-generation. It was discussed at some point during the process that it would be better for me to remove them, but that completely slipped my mind

tulip sleet
#

@trim elm not a big deal; there has to be a lot of hand cleanup of these annotations anyway, so it can be part of that. e.g. Most of the Anys have to get more specific

trim elm
#

Ok. Sounds good. I was asked to help with that but I've been out most of this week since the school-year is ending today. I'll try to put in some work on that in the coming week

tulip sleet
#

i am not the keeper of your task list, so check what else is more important first

manic glacierBOT
#

I saw your comment on discord and I don't think it matters too much. Every instance I've seen the HAL use these functions is to do this:

uint32_t tickstart = HAL_GetTick();
while ((HAL_GetTick() - tickstart) <=  timout_dur) {

with a timeout_dur of 2 or 4 or something. It doesn't strike me as super precise, and the HAL even allows for the frequency and timeout durations to be tweaked. So I don't think the 2.3% difference is going to cause any differences in behavior.

ionic elk
#

@lucid solar can you remind me what was up with the external RAM on the F746DISCO so I can summarize it in a comment? Something about the RAM speed capping out at 200MHz? @slender iron asked me for a more informative description in the board profile.

#

Which I think is reasonable, it'll be a good example of manually overriding the clocks to meet a board spec.

slender iron
#

the ram clock should be separate from the core clock though

ionic elk
#

ยฏ\_(โŠ™๏ธฟโŠ™)_/ยฏ

#

@slender iron awesome bender project - I've been thinking of doing an LED-Matrix version of Expression Engine, I think it'd be fast enough on a F4 or H7

inland tusk
#

@slender iron are you doing a deep dive today.

slender iron
#

@inland tusk yup, plan on it

inland tusk
#

what time. I am EST

slender iron
#

normal time. just under three hours from now

inland tusk
#

good see you then.

slender iron
#

๐Ÿ‘

manic glacierBOT
solar whale
#

yikes -- another DHT22-like sensor https://learn.adafruit.com/adafruit-aht20 The AHT20 is a nice but inexpensive temperature and humidity sensor from the same folks that brought us the DHT22. let the fun begin

flat moss
#

hello

prime flower
#

@solar whale I2C though!

onyx hinge
#

@ionic elk My "working" code for sdio had suddenly stopped working. I traced back through my git history, and I believe that it's because I reverted a change (that was not intended to be shared) that made DEBUG=1 build have "-Og" optimization (enable optimizations that do not interfere with debugging)
When I turn off DEBUG, I also get working code. Any advice on debugging it?

#

usually it's the reverse, code that is bad or has missing "volatile" qualifications gets broken by the debugger

solar whale
#

@prime flower so was the am2320 --not a huge improvement over the DHT22 -- hope this one is less quirky

onyx hinge
#

is dht22 the one that's fine unless you're trying to read it from something with unreliable timing like the rpi?

solar whale
#

it can be a mess on the Pi

prime flower
#

@solar whale ๐Ÿคท dunno. I haven't used it yet, might for something soon.

#

agreed tho

solar whale
#

I'll get some as soon as they are available -- really nice to have STEMMA connecters.

#

I have an hts221 arriving today -- looking forward to trying it

ionic elk
#

@onyx hinge I'm confused. What do you mean by reverse? Typically for me introducing optimizations can lead to all kinds of bad stuff happening if you combine it with the wrong CFLAGs

#

I've never had a program have errors because it didn't have optimizations

onyx hinge
#

That's why I'm scratching my head

#

it fails (I/O error) with DEBUG=1, works with DEBUG=0

ionic elk
#

But you just said you turned on -Og

onyx hinge
#

confusing things, I had a local change which added -Og when DEBUG=1, and that worked too

ionic elk
#

have you tried not turning that on?

onyx hinge
#

so basically it's a bug under "no optimization", which is normally introduced by DEBUG=1

#

but beyond that I don't know what the bug is yet

ionic elk
#

Have you tried not setting any optimizations at all.

onyx hinge
#

That's what DEBUG=1 does, right?

#
ifeq ($(DEBUG), 1)
        CFLAGS += -ggdb
        # You may want to enable these flags to make setting breakpoints easier.
        CFLAGS += -fno-inline -fno-ipa-sra
else
        CFLAGS += -Os -DNDEBUG
        CFLAGS += -ggdb
        # TODO: Test with -flto
        # CFLAGS += -flto
endif
ionic elk
#

not if you put -0g in there

onyx hinge
#

I am sorry I mentioned -Og, it's a red herring. Disregard it.

#

(it just complicated my troubleshooting)

ionic elk
#

Ok, if you're experiencing errors with no optimization I don't know what that is

#

Sorry, I don't totally understand the conditions where it is failing vs not

onyx hinge
#

DEBUG=0 -> WORKS
DEBUG=1 -> Fails at runtime with IOError

ionic elk
#

I just ran two builds, one with DEBUG and one without, and neither failed.

#

IOError where

onyx hinge
#

this is about code in my sdio branch, and it's a runtime error accessing the SDIO card

ionic elk
#

Ok. I thought you were running into issues at boot. I'd say it's probably a timing problem. Maybe you had something that got inlined and your program started relying on it for timing, and then you dropped the optimization, it slowed down, and failed.

#

or something like that

onyx hinge
#

Thanks, I'll look into it further.

#

I know my explanation was disjointed, it's one of those situations where I just spent what feels like too much time trying to diagnose a thing, and I got frustrated.

ionic elk
#

having/not having optimization can definitely screw up timing.

#

also totally cool, same thing happens to me all the time

onyx hinge
#

Yeah it might just be timing

#

there's a loop that has to keep a FIFO full, maybe it just doesn't when not optimized

#

it "only" has to place a new item on the FIFO every 320ns or something

ionic elk
#

It's definitely weirder for it to go backwards like that but I'd check out the HAL implementation and see if there's anything that might be fishy with timeouts

onyx hinge
#

(average)

#

I "should" convert it to DMA, except that the direct I/O did seem to work

#

anyway, messing with that stopped me from reviewing your code so far. I will try to get to that tomorrow when I have a fresh mind.

ionic elk
#

Or, you know, enjoy your weekend lol

#

I'm doing a Screenless Saturday tomorrow so I won't get to it until Monday probably

onyx hinge
#

Enjoy!

solar whale
#

Yay! Finally got an airlift working with the imixrt1010-evk. Running cheerlights

prime flower
#

@ionic elk TIL about screenless saturday unless you just made that up

#

@solar whale fastest cheerlights example out there?

solar whale
#

all behind the sceens ...

ionic elk
#

I made it up. but everyone should do it

#

I get more ideas on that day than the rest of the week combined.

#

focuses your whole week its noice

lucid solar
#

@ionic elk The external SDRAM on the disco board has a max speed of 200mhz, whilst the F7 MCU can go 216mhz. So we have to cap it at 200mhz...and that means using different settings for the clocks, especially the 48mhz USB clock.

slender iron
#

@lucid solar why is the ram speed tied to the core speed?

#

shouldn't it just introduce a wait state?

lucid solar
#

No idea...but what's wrong with having a different clock speed?

slender iron
#

I don't think there is anything wrong with it. I just don't think it should correlate to the ram speed

lucid solar
#

I'll do some research at some point.

#

Trying to build CPY for the saola before the stream...so I can actually test things in the stream...now I have an awesome baseboard for my Saola!

manic glacierBOT
#

This PR fixes a very old typo in the pin definitions of the 1060 that lead to incorrect enums for a subset of pins used for flash memory. This was causing these pins to never be protected from reset, causing the chip to cut off its own flash memory.

Also fixes an issue for the Teensy pin definitions that skipped the protections for a critical pin, as it is grounded in the schematic, but which still needs to retain its pullup and drive settings across resets.

Properly solves #2998 - 10...

slender iron
#

@ionic elk nice!

ionic elk
#

turns out it was a hecka old typo in the pindefs.

#

like, first PR of mimxrt old

#

but I'm better at GDB now so that's nice!

#

Ok now imma do some RGBMatrix stuff and take a break from all this bugfixing

slender iron
#

๐Ÿ’ฏ

simple pulsar
#

@tulip sleet For adafruit_ble, is there a way to start_scan for a specific Advertisement sub-class/type and get the associated scan responses back too?

tulip sleet
#

the scan responses should come back automatically for the specified sublcass

simple pulsar
#

Would't that confuse typical code, i.e. listen for MyAdvertisement and then extract myfield but myfield won't be present on a scan response?

#

So on device A I am sending ```>>> send_ad = JoinGameAdvertisement(game="SRTEST")

ble.start_advertising(send_ad)
and I'm receiving on device B>>> for adv in ble.start_scan(JoinGameAdvertisement, minimum_rssi=-127, timeout=2):
... print(adv)
...
...
...
<JoinGameAdvertisement manufacturer_data=<ManufacturerData company_id=0822 data=0a 30 fe 53 52 54 45 53 54 00 00 > >
<JoinGameAdvertisement manufacturer_data=<ManufacturerData company_id=0822 data=0a 30 fe 53 52 54 45 53 54 00 00 > >
<JoinGameAdvertisement manufacturer_data=<ManufacturerData company_id=0822 data=0a 30 fe 53 52 54 45 53 54 00 00 > >
...etc..
so there's only one type of received Advertisement. Peering inside to see if it has waited for and embedded the subsequent scan response in it somewhere, I see>>> type(adv.complete_name)
<class 'NoneType'>
type(adv.tx_power)
<class 'NoneType'>
type(adv.scan_response)
<class 'bool'>
adv.scan_response
False

tulip sleet
#

@simple pulsar we have the scan response requested automatically on the scanner side. Are you supplying a scan response when you set up the JoinGameAdvertisement?

simple pulsar
#

@tulip sleet No, just allowing the default one to be created with tx_power and complete_name.

#

If you listen for Advertisement you get everything and it works. But for MyAdvertisement the default scan response doesn't seem that useful if one is listening for MyAdvertisement only.

#

Is the expectation that the API user creates something like MyAdvertisementScanResponseExtraBits and passes that to start_advertising scan_response kwarg?

tulip sleet
#

i'm looking at the code...

tulip sleet
#

@simple pulsar I believe the filtering code was written on the assumption that the single advertisement would be enough. When Scott wrote the filtering code I don't think he had the model of a general BLE central in mind, necessarily. Also, the hardware he was using (iPhone 7 and later) supported extended advertising, which allows for longer advertisements.

I agree that the filtering could be more sophisticated. Also, the scan response fields could be merged into a single large "Advertisement+ScanResponse" kind of thing. @slender iron Am I misinterpreting the capabilities you had in mind?

lucid solar
#

@tulip sleet scott is streaming right now, guess he'll reply later ๐Ÿ™‚

tulip sleet
#

(thanks! @lucid solar )

manic glacierBOT
#

JP ran into problems with playing multiple MP3 files within the same program. One stumbling point was around the MP3Decoder.file property.

Before this, it was the responsibility of the user to close the old file, which led to inconvenient and non-obvious code such as

    old_file = decoder.file
    decoder.file = open("example.mp3", "w")
    old_file.close()

Compatibility with this idiom is preserved, as it's permitted to close() a file as many times as desired; the second...

simple pulsar
#

@tulip sleet The merge/stick the SR in a single Advertisement might be tricky to implement. If there's no help in the underlying api then you're just getting a stream of Advertisements over a fairly lossy comms channel, i.e. you have to wait and then timeout. And possibly between that other Advertisements will appear from other devices/etc.

#

@tulip sleet There's no rush on this, I have a plan B as I've already implemented local matching of Advertisements and I only need the scan_responses for one thing. Actually, I could abandon them altogether and just send the name in my ad packet...

tulip sleet
#

see "Variant #1" at the bottom of that chart

lucid solar
#

When making a new port....do we still use "MINIMAL"? or ?

tulip sleet
#

so I'm a little confused why you're not seeing the scan response data included.

#

@lucid solar let's ping @ionic elk about this, because he reorganized it. There's a file somewhere with all the CIRCUITPY_SOMETHINGIO etc, turned off, and you can start with that. I'm not sure MINIMAL is interesting anymore.

timber mango
#

I have been using vscode for editing. I have one file that pylint says there is one problem, but I do not know how to find out what it is not happy with. I need some help here please. ๐Ÿ˜‰

tulip sleet
#

what is the problem?

timber mango
#

I do not know what the problem is. PyLint just says there is one problem, indicated by the file name in vscode.

tulip sleet
#

pylint is going to print out an error message or warning, so what does it print

#

paste everything pylint printed

lucid solar
#

@tulip sleet sorted it, thanks!

timber mango
#

Vscode just indicates there is one problem. It is possible it is not a PyLint problem. I just do not know how to find out what the problem is.

tulip sleet
#

does vscode run pylint? Doesn't it show you the details of what pylint complained about?

#

paste a screenshot if necessary

lucid solar
#

Most polite error message:
../../py/misc.h:179:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI

tulip sleet
#

thumb-1, huh? does they chip not have thumb-2?

lucid solar
#

@tulip sleet new chip family...still implementing a lot of stuff...ignore the actual message...just thought it was nice that it said sorry.

tulip sleet
#

i agree it's polite ๐Ÿ™‚

simple pulsar
#

The HAL-9000 said sorry too.

tulip sleet
#

passive-aggressive

timber mango
#

@tulip sleet I got it figured out. I just found the Problem Panel. ๐Ÿ™‚

#

I almost hate to admit this, but I am actually starting to like PyLint. I am also using Black, just like Adafruit. ๐Ÿ™‚

tulip sleet
#

i find it catches a lot of silly errors i make; i don't mind

timber mango
#

Same here. Hopefully, running PyLint and Black on my code locally will help me get through CI a lot quicker and save me some commits to fix stuff.

odd warren
#

Is there instructions (or a template) anywhere on how to add board support for a new board to CircuitPython, or should I just use other similar boards as reference?

timber mango
#

@odd warren It is a great tutorial! I have been using it. ๐Ÿ™‚

slender iron
#

@lucid solar I started with the fomu port for esp32s2

#

@tulip sleet I think the filtering adv + sr is tricky because you may only hear the sr

lucid solar
#

@slender iron I'm past that now...a lot further ๐Ÿ˜‰ Thanks anyway

slender iron
#

maybe we should add a flag to not filter SRs

tulip sleet
#

that sounds like a nice solution. It's true we are using the filtering right now in a lot of the librries, and maybe be missing some data in the scan response that we might need, like the complete name. I think it's been an accident that I haven't hit that yet (e.g., the iBBQ thermometer complete name is in the initial advertisement).

odd warren
#

When does the #define MICROPY_HW_LED_STATUS LED get activated by circuit python? I have it set to the right pin, but it isn't lighting up.

pastel panther
#

@tulip sleet @slender iron are there any docs on how/when the garbage collector runs and how to make best use of it? I'm thinking about possible solutions to memory overhead from Register

slender iron
#

it runs after import, on gc.collect and when an allocation fails

pastel panther
#

@slender iron ok, thanks. I'm thinking about having something like a context manager to create and then destroy the register helpers as needed so you don't have to have a bunch sitting around that you only use for init and the occasional rate change or similar

slender iron
#

it's a tricky tradeoff because that's then code size

pastel panther
#

right

#

๐Ÿค”

#

@slender iron do you know the approximate overhead of a class instance? Like how many LOC is it worth? or does that comparison even make sense?

slender iron
#

an allocation is always in 16b blocks

#

so that's the minimum. I'd encourage you to look at the heap stuff I did if you want to dig in

#

one thing I changed early on was any buffers created in __init__

#

code in the register classes is shared amongst instances

pastel panther
#

where should I look to see more about this? I'm interested in what you meant about buffers created in __init__ because if I'm understanding, that is the incremental cost of a new instance, right?

manic glacierBOT
ionic elk
#

@lucid solar @tulip sleet There are no flags anymore, other than FULL BUILD, which you turn off on certain Atmel chips only. I thought I'd put the list in the porting guide but either it didn't make it in or someone got rid of it? Anyway, right now you explicitly turn off everything you don't support in mpconfigport.mk and then work on it as a sort of todo list.

timber mango
#

If I have the following code:python with self.i2c_device: # Byte 0 is 0x00, address of LED data register. The remaining 16 # bytes are the display register data to set. self.i2c_device.write(self._buffer)Is the second i2c_device redundant? Could it be shortened to just write(self._buffer)?

timber mango
#

It seems like the way the original code is written that it defeats the whole purpose of the with in it.

tulip sleet
timber mango
#

self.i2c_device is a device, in this case a display device.

tulip sleet
#

those methods are called when the with block is entered and exited

timber mango
#

OK, got that now. However, with the shortened version inside the with, wouldn't the proper methods be called anyway?

#

Because of the way the with is initialized?

tulip sleet
#

you can say with self.I2c_device as x, and then do x.write(...), etc

#

but you can't say just write(...)

#

in general, you would do as <something>, and then use the <something> inside the with

timber mango
#

Oh, OK, I see the difference now. Thank you Mr. Wizard. ๐Ÿ˜‰ ๐Ÿ™‚

tulip sleet
#

i slightly misunderstood your original question.

#

good night!

timber mango
#

That is OK, we got it figured out. ๐Ÿ˜‰

#

Good night @tulip sleet

shy zephyr
#

need help w basic python

static jay
#

@shy zephyr please ask

shy zephyr
#

I'm using tkinter and I'm having trouble closing the main window after a new window opens

#

basically there's a button and a textbox. if the password is entered correctly a new window opens, but idk how to close the old window

static jay
shy zephyr
#

ok i did. thanks

timber mango
#

@gilded cradle I am working on the multi-display support for the HT16K33 library now. I am almost done modifying ht16k33.py. I still have to deal with _get_buffer() and _set_buffer(). I also just successfully initialized three alphanumeric displays. Everything works as it does now when there is just a single display. ๐Ÿ˜‰ I do have a power problem I have to deal with, but I expected that with three displays.

gilded cradle
#

Sounds excellent @timber mango

timber mango
#

Thank you. It is taking quite a bit of work to make everything work transparently, regardless of how many displays there, but I believe it is worth it to not break any existing code. ๐Ÿ™‚

manic glacierBOT
somber garden
#

I'm experimenting with capacitative sensing at the moment, and the only interface I seem to have is the touchio module. It's entirely boolean - either it senses something or it doesn't. Is there anything that will give me a more graduated reading, or is the boolean reading built into the hardware?

#

Quick'n'dirty code: ```python
import time
import board
import touchio
import neopixel

touch_pad = board.A1

touch = touchio.TouchIn(touch_pad)

pixels = neopixel.NeoPixel(board.D8, 10)

state = False

while True:
if touch.value and state == False:
state = True
for p in range(10):
pixels[p] = (64,64,64)
elif not touch.value and state == True:
state = False
for p in range(10):
pixels[p] = (0,0,0)
time.sleep(0.05)

ruby smelt
#
Feather Sense Sensor Demo
---------------------------------------------
Proximity: 0
Red: 310, Green: 291, Blue: 307, Clear: 856
Temperature: 26.8 C
Barometric pressure: 973.315
Altitude: 337.8 m
Magnetic: -1.184 -35.165 26.235 uTesla
Acceleration: 0.00 0.00 0.00 m/s^2
Gyro: 0.00 0.00 0.00 dps
Humidity: 53.3 %
Sound level: 8
#

Is it possible the sensor is faulty or are there some settings I am missing?

ruby smelt
#

ok, got it working fine with some example code

somber garden
#

๐Ÿ‘

ruby smelt
#

And I think this should be added to demo code

#

default lsm6ds33 accelerometer_data_rate and gyro_data_rate is at 0Hz. If I set it to 1066Hz, it works like a charm, otherwise it is just zeros.

timber mango
#

@somber garden You do not have to compare boolean variables to True or False. You can just use if state or if not state in your if statements. ๐Ÿ™‚

somber garden
#

@stable aspen I know, but I often put those in for clarity.

#

I ran the code through black and pylint later on and took them out anyway :)

keen fiber
manic glacierBOT
#

The issue actually looks to be in https://github.com/adafruit/circuitpython/blob/master/ports/esp32s2/supervisor/port.c#L118 . The code ends up dividing tv_usec by 32768 to get all_subticks, and then divides that by 32 before adding it in the return statement. That is equivalent to dividing by 1048576. Since tv_usec seems to run from 1 to 1,000,000; the result is that nothing gets added to tv_sec and the return from port_get_raw_ricks(NULL) is always going to be just seconds.
So, in a Python...

manic glacierBOT
#
from adafruit_ble.services.standard.hid import HIDService
from adafruit_hid.gamepad import Gamepad

hid = HIDService()
gp = Gamepad(hid.devices)

This returns an error:

Traceback (most recent call last):
  File "code.py", line 5, in 
  File "adafruit_hid/gamepad.py", line 55, in __init__
  File "adafruit_hid/__init__.py", line 56, in find_device
ValueError: Could not find matching HID device.

While using keyboard/mouse works fine. Is gamepad not supported as a ...

ivory yew
#

Anyone super familiar with the ESP32SPI library? I'm designing something similar and have some questions about how y'all handled SPI.

orchid shell
#

Hello I have a adafruit feather bluefruit sense. How do I convert it from circuit python to arduino?

crimson ferry
#

@ivory yew as far as I've grokked, it was dictated by the NINA implementation, I think ladyada wrote most of the early foundation for the ESP32SPI library

ivory yew
#

Yeah

#

The biggest question is why the ready pin was needed

#

I'm also running into issues with using the SAMD21 as a SPI peripheral with higher frequency clocks from the main chip. :/

solar whale
#

@orchid shell no conversion necessary. Just upload your Arduino sketch. It will replace CIrcuitPython.

orchid shell
#

@solar whale but I get an error that says cannot compile for adafruit bluefruit sense

solar whale
#

Then your Arduino environment is not properly configured. Did you install the necessary BSP for the nrf52840 boards?

indigo wedge
timber mango
#

I am battling with the can not get a lock on the I2C bus problem again. ๐Ÿ˜ฆ I have a small script that demonstrates the problem. It first scans the I2C bus and then tries to initialize a display at each address.

indigo wedge
solar whale
crimson ferry
#

I always assumed the Ready pin was to keep from having to poll the esp32 for indeterminate-length operations

timber mango
#

This I2C problem seems to be a sporadic thing and I do not know what triggers it. Is it possible this is a bug that will be very difficult to fix?

orchid shell
#

@solar whale Yeah I followed that guide

timber mango
#

Never make assumptions, especially with respect to electronics and software. ๐Ÿ˜‰

solar whale
#

@orchid shell try the standard blink example. What code is failing to build?

crimson ferry
#

@timber mango gotta start somewhere ๐Ÿ˜‰

timber mango
#

I am starting somewhere. ๐Ÿ˜‰ I am thinking about opening an issue on this.

orchid shell
#

@solar whale just some code to control a neopixel strip over Bluetooth

solar whale
#

Does blink compile?

timber mango
#

I have gone through all the troubleshooting steps to remove my Feather M4 as a cause of this, including erasing it and reinstalling Circuitpython.

solar whale
#

One step at a time ๐Ÿ˜‰

orchid shell
#

@solar whale It does not

solar whale
#

Something basic is missing. What error is it giving? I suggest going back through the guide to make sure something was not missed

orchid shell
#

Arduino: 1.8.12 (Windows 10), Board: "Adafruit Feather Bluefruit Sense, 0.3.2 SoftDevice s140 6.1.1, Level 2 (Full Debug)"

exec: "C:\Users\Aidan\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.20.1/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe": file does not exist
Error compiling for board Adafruit Feather Bluefruit Sense.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
@solar whale

solar whale
#

\Arduino15\packages\adafruit\hardware\nrf52\0.20.1/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe": file does not exist

#

nrfutil is not installed

orchid shell
#

@solar whale How do I install it?

orchid shell
#

@solar whale I am using Windows 10

#

I am going to try to reinstall the nrf85240 boards

solar whale
#

Sorry, I donโ€™t know. I suggest posting in #help-with-arduino - hopefully someone else can help.

manic glacierBOT
#

I have been running into a problem off and on where a script can not get a lock on the I2C bus. This is one of those soft failures that only shows up once in a while. :( I have a small script that demonstrates this problem when it occurs. I can scan the I2C bus successfully and show what devices are there, but I can not instantiate a display. I believe this might be a bug in the underlying C code.
[i2cscan_displays.zip](https://github.com/adafruit/circuitpython/files/4743228/i2cscan_displa...

orchid shell
#

Ok @solar whale thanks for trying ๐Ÿ™‚

solar whale
#

Good luck!

pseudo gale
#

Am I correct in the assumption that pin.P0_## means a pin is being treated as โ€œinternalโ€?

#

I just noticed that two of the pins on my nRF52840 dongle, 20 and 21, arenโ€™t showing up in the board module, despite them being listed on the pin out. In microcontroller it shows up like this. P0_18 -- microcontroller.pin.P18
P0_19 -- microcontroller.pin.P19
P0_20 -- microcontroller.pin.P0_20
P0_21 -- microcontroller.pin.P0_21
P0_22 -- microcontroller.pin.P22
P0_23 -- microcontroller.pin.P23
P0_24 -- microcontroller.pin.P24

timber mango
#

I just loaded 5.4.0-beta.0 on my Feather M4 with the same results on I2C. Can scan, but not initialize a display.

#

Assumptions are dangerous things... ๐Ÿ˜‰

#

@pseudo gale That does look suspicious.

crimson ferry
#

@pseudo gale microcontroller.pin shows all of the pins, but if they aren't in board then they're typically either not exposed, or may go by another name, e.g., SDA, RX, etc. Could be an oversight in the board config.

#

Nordic, or MakerDiary?

pseudo gale
#

@crimson ferry MakerDiary

#

Board does have 19 and 20, though only listed as pins.

#

AIN0 -- microcontroller.pin.AIN0
AIN1 -- microcontroller.pin.AIN1
AIN2 -- microcontroller.pin.AIN2
AIN3 -- microcontroller.pin.AIN3
AREF -- microcontroller.pin.AIN2
VDIV -- microcontroller.pin.AIN3
P2 -- microcontroller.pin.AIN0
P3 -- microcontroller.pin.AIN1
P4 -- microcontroller.pin.AIN2
P5 -- microcontroller.pin.AIN3
P6 -- microcontroller.pin.P6
P7 -- microcontroller.pin.P7
P8 -- microcontroller.pin.P8
P9 -- microcontroller.pin.P9
P10 -- microcontroller.pin.P10
P18 -- microcontroller.pin.P18
P19 -- microcontroller.pin.P19
P22 -- microcontroller.pin.P22
P23 -- microcontroller.pin.P23
P24 -- microcontroller.pin.P24
LED_RED -- microcontroller.pin.P23
LED_GREEN -- microcontroller.pin.P22
LED_BLUE -- microcontroller.pin.P24
BUTTON -- microcontroller.pin.P18

crimson ferry
#

@pseudo gale What do you get in the REPL when you do:?```>>> import board

dir(board)```

pseudo gale
#

['class', 'AIN0', 'AIN1', 'AIN2', 'AIN3', 'AREF', 'BUTTON', 'LED_BLUE', 'LED_GREEN', 'LED_RED', 'P10', 'P18', 'P19', 'P2', 'P22', 'P23', 'P24', 'P3', 'P4', 'P5', 'P6', 'P7', 'P8', 'P9', 'VDIV']

crimson ferry
#

21 seems to be an oversight, but then it isn't in MakerDiary's file either

#

so they're all in microcontroller.pins, but 20 and 21 are not in board ...maybe I'm missing something, but perhaps an issue is in order on the repo

#

at least for now you can do DigitalInOut(microcontroller.pin.P0_21) (or however it shows up)

pseudo gale
#

@crimson ferry alright, thx

manic glacierBOT
#

in your example , you are locking the I2C bus -- I think you have to unlock before using it
try adding i2c.unlock() before you initialize the disply

#!/usr/bin/env python3
import board
import busio
from time import sleep

from adafruit_ht16k33.segments import Seg14x4

i2c = busio.I2C(board.SCL, board.SDA)

displays = []

print()
print("Simple I2C bus scanner")
print()

while not i2c.try_lock():
	sleep(0.5)

scan = i2c.scan()

if scan:
	print("Found:")

	for addr ...
manic glacierBOT
#

Before this change, if you keep old_file around, it was an open file that you could perform operations on. After it, if you keep old_file around, it is a closed file and most operations raise an exception.

My assumption was that it was important to reach the file's close() / __exit__ or some resource would be leaked (like file descriptor numbers on linux would be, in the absence of reference counting in cpython3). However, this may not be true. The identity of the opened file cy...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

The calculations being done in port_get_raw_ticks basically insured that only seconds were being returned. Since the tv_usec ranges from 1 to 1000000, and ticks are 1/1024 of a second, the correct calculation would be to divide usec by 1024, not 32768 and then 32. A quick script to show the issue and fix:

import time
print (time.monotonic_ns())
for a in range(10):
    time.sleep(0.9)
print (time.monotonic_ns())
for a in range(10):
    time.sleep(1.1)
print (time.monotonic_ns())
...
idle owl
prime flower
#

@idle owl They should be able to have the library name prefix added in a way it makes sense for each of the platforms it supports: (azureiot_central_example and azureiot_hub_example seem like good example names to me). @cyan breach may know more as he recently redid that library/examples.

idle owl
#

Alright, I'll file an issue on the lib and engage with Jim there.

prime flower
#

Thanks for noticing it @idle owl

timber mango
#

Could I get a voice check please?

lone axle
#

@timber mango I can jump in the voice channel for a moment to help with a sound check.

#

The beginning was cut off but I did hear the end of "hello" I think

crimson ferry
#

@slender iron ckd . tech & saola adapter url are 404?

slender iron
#

the ckd.tech urls from the board? I know. They are basically version numbers ๐Ÿ™‚

#

I should swap it away from my token. looks like it's logged in as me

onyx hinge
#

Hi! If you're going to be in the Discord meeting but not talking, please let us know here that you'll be "lurking". If you have notes you'd like us to read, please put them in the document. The meeting will be getting started soon

modern wing
#

Happily lurking today, updated the Google Doc to reflect as such ๐Ÿ™‚

onyx hinge
#

If you update the doc with your lurking status, so much better!

turbid radish
#

Lurking

uncut nexus
#

lurking today, thanks!

drowsy geyser
#

Also lurking

old smelt
#

Canโ€™t attend today. One hug report added.

thorny jay
#

Sorry, forgot the meeting... did not update the Doc. Hug report to all.

onyx hinge
#

@slender iron gathering lurks ... but don't that delay you

#

or kattni beat me ๐Ÿ™‚

timber mango
#

How do I turn off the gallery in Android?

idle owl
#

Article

timber mango
#

OK, got it. ๐Ÿ™‚ Is there a way to make just the speaker show on video when they are talking?

idle owl
#

Interview.

onyx hinge
sterile bronze
#

lurking

mental nexus
#

Lurking text only. Left a couple of notes in the Doc.

modern wing
#

That's a nifty project ๐Ÿ™‚

onyx hinge
drowsy geyser
#

I have seen pre-COVID shipping times.

turbid radish
#

Awww, thanks @slender iron

ionic elk
#

๐Ÿ‘‰ ๐Ÿ˜Ž ๐Ÿ‘‰

onyx hinge
onyx hinge
thorny jay
#

There is something I never understood about the Blinka description: "Add CircuitPython hardware API and libraries to MicroPython & CPython devices". (1) CPython device (like a Trinked) does not need Blinka. (2) Raspberry Pi and other SBC do need Blinka. (3) Can I really add a bit of Blinka to a MicroPython to make it CP compatible and use CP library?

onyx hinge
#

It's because I kept adding more hug reports when I remembered how everyone was helping me and doing good this week

gilded cradle
#

@thorny jay it was originally written to run on MicroPython boards, but I've personally never tried it on there.

thorny jay
#

@gilded cradle Since you are the expert, maybe you can adapt the description? ๐Ÿ˜‰

lapis hemlock
lone axle
#

Looks really cool to me!

lapis hemlock
onyx hinge
lapis hemlock
#

Looks really cool to me!
@lone axle Thanks!

onyx hinge
#

I always forget what the acronym is: digital audio workstation (DAW)

#

@ionic elk I would like to subscribe to your hot sauce

idle owl
#

@ionic elk Yes! Bundle it!

ionic elk
#

I send you all virtual hot sauce energy ๐Ÿ”ฅ ๐ŸŒถ๏ธ ๐Ÿ”ฅ

modern wing
#

scoville++;

ionic elk
#

recipe is actually super easy: as many peppers as you can fit in your jar, carrots/onion/garlic if you want, 5tsp salt for every 2 cups water, a little sourcrout or kimji liquid as a starter, blend, cover, and leave it for a year

drowsy geyser
#

Just incrementing by one?

ionic elk
#

then strain it and add white wine vinegar

solar whale
lone axle
#

Cat Cage is amazing! that is a really cool idea.

gilded cradle
#

I like the cat cage idea as well.

solar whale
#

the cats love it!

onyx hinge
#

awww if our cats were still with us I'd feel bad that I wasn't going to drop everything and make one for them

#

Not if it succeeded

#

๐Ÿคท

ionic elk
#

if it fails usually I see a button

#

but usually I just force push and that restarts it

onyx hinge
#

๐Ÿ‘‹

gilded cradle
#

Great to see you again @ruby atlas

mental nexus
onyx hinge
#

@lapis hemlock Your "fork" of micropython should be able to function as a fork of circuitpython, it just takes a little more care when creating pull requests. "My" fork is a circuitpython fork but I've successfully created PRs against micropython. However, I know we ran into trouble when we tried together to have you create a pull request to upate ulab in circuitpython, and we decided to just postpone figuring it out

lapis hemlock
#

Oh, the Wizard:)

onyx hinge
#

If you're still stuck ask on the chat and we'll get through it together

lapis hemlock
#

I don't want to dwell on your time, so I will try to figure it out, and if I become really desperate, I will reach out to you.

#

But thanks for the offer!

#

That would actually be interesting.

#

I mean ulab with framebuffers.

onyx hinge
#

@lapis hemlock I recommend creating a new "git clone" of adafruit circuitpython, so that is the "origin" repository; then add your own fork as a remote. That's a part of how I switch between authoring circuitpython and micropython PRs

lapis hemlock
#

But you'll need tensors of rank 3, won't you?

onyx hinge
#

for RGB images, seems like you do need (x,y,3) shapes

lapis hemlock
#

Right.

timber mango
#

@lapis hemlock Are the pins on those carrier boards 0.1" spaced or smaller?

lapis hemlock
#

1 mm.

#

The board measures 19x25 mm, plus USB connector.

#

But you can break off the USB connector, if you don't specifically need it.

solar whale
#

๐Ÿ‘

onyx hinge
#

๐Ÿ‘

modern wing
#

๐Ÿ‘

drowsy geyser
#

๐Ÿ’ฏ

onyx hinge
#

(I didn't know you could re-assign a PR's branch)

gilded cradle
#

๐Ÿ‘

idle owl
#

They're just branches @onyx hinge

onyx hinge
#

.github/workflows/pre-commit.yml: branches: [master]

ionic elk
#

I'm a little concerned about the affect on beginners

#

since all tutorials on git refer to master

#

and we can't control guides outside of Adafruit

solar whale
#

Is there a plan to change the terminology in I2C?

tulip sleet
#

main/secondary have the same first letters. I have seen that suggested for SPI

drowsy geyser
#

Yeah, as @solar whale says, hardware is going to take a while (SCSI has the same problem)

onyx hinge
#

somebody's got to do it first, or 99'th, or 999'th

lapis hemlock
#

for RGB images, seems like you do need (x,y,3) shapes
@onyx hinge OK, so it is time to step up my efforts on the higher-dimensional branch.

ruby atlas
#

the master branch could be empty with a RENAMED.md

tulip sleet
#

some lobbying of GitHub may be in order in the long run too

ionic elk
#

a lot of board silkscreens too

#

is there something that still implies the correct control relationship?

lapis hemlock
#

@slender iron @onyx hinge If you change anything in I2C, then I would also like to move spectrogram from the extras sub-module of ulab๐Ÿ˜‰

ionic elk
#

master/subsidiary?

onyx hinge
#

moose / squirrel

ionic elk
#

I don't feel like master has the intense connotations that slave has

ruby atlas
#

primary, secondary?

#

parent, child.

ionic elk
#

master is used for a lot of stuff, it's not just an ownership term

solar whale
#

Thanks for bringing it up!

timber mango
#

@lapis hemlock That is tight pitch! I would need a long carrier board with 0.1" spaced holes in order to use that so I could use it on a breadboard. I will just stick to the Feathers then.

onyx hinge
#

๐Ÿ‘‹

lapis hemlock
#

@lapis hemlock That is tight pitch! I would need a long carrier board with 0.1" spaced holes in order to use that so I could use it on a breadboard. I will just stick to the Feathers then.
@timber mango The feather does not expose all pins.

timber mango
#

I know. That is why I asked about your new boards.

modern wing
#

Thanks everyone!

lapis hemlock
#

If you need all 60 pins, than it is going to be something like 60mm x 40 mm, which is huge.

timber mango
#

@lapis hemlock Well, I can dream. ๐Ÿ˜‰

lapis hemlock
#

That's actually not smaller than the raspberry pi zero...

#

Do you think that a 1-mm pitch is too small?

timber mango
#

I just do not like to be limited even if I may never use all the pins. Do you expose any MCU resources that Adafruit does not expose?

#

For me, 1mm is too small. I am old and have old eyes.

lapis hemlock
#

I just do not like to be limited even if I may never use all the pins. Do you expose any MCU resources that Adafruit does not expose?
@timber mango I wanted to make it "compatible" with the feather, so the same bootloader can be used. But what kind of MCU resources do you have in mind?

timber mango
#

More DAC and ADC, more I2C and SPI buses, I2S, and anything new that has not been exposed before.

lapis hemlock
#

Scott told me last week that the circuitpython firmware does not hide hardware resources, even if the hardware itself does not expose them.

#

But I still have to assemble the board, and flash it with firmware to see where I stand.

#

More DAC and ADC, more I2C and SPI buses, I2S, and anything new that has not been exposed before.
@timber mango I think the nrf52840 has no DACs, but I might be wrong.

ionic elk
#

@slender iron found manager/subordinate online just now

lapis hemlock
#

Or mad/sane...

ionic elk
#

or supervisor/minion if you want to cause a ruckus

timber mango
#

I am looking for something that has support for quadrature encoders, preferably at least two and four would be better.

slender iron
#

lots of interesting examples of projects changing terms. looks like most choose more specific terms

manic glacierBOT
timber mango
#

Nope, no DAC on the nRF52840 as far as I can tell now.

manic glacierBOT
lapis hemlock
#

Nope, no DAC on the nRF52840 as far as I can tell now.
@timber mango If you need DAC, you would have to add that yourself. I didn't actually want to make a board that has everything, like a bigger version of the feather, because you can't have eveything, you always have to be selective, and I don't know what people would need. On the other hand, having a piece of hardware that you can easily embed into your hardware is useful, because you have then something that you can customise.

manic glacierBOT
topaz quest
#

@onyx hinge sorry I just noticed your comment on the pull request โ€” did you find how to update .mailmap or should I send you a pull request for it?

onyx hinge
#

@topaz quest if it's been committed already I can make a PR to update it, that's fine

topaz quest
#

hm I thought it was but maybe it wasn't, then I'll just fix it here!

ionic elk
#

@slender iron I think Manager/Subordinate actually describes the relationship between devices more accurately than before (implies a back-and-forth of information), and it matches the existing acronyms.

timber mango
#

@lapis hemlock True on all accounts! External DACs can be had at much higher resolutions than are found in MCUs, at a price of course. I notice that two I2C buses are available, one master and one slave. Are both exposed? QSPI exposed?

lapis hemlock
#

@lapis hemlock True on all accounts! External DACs can be had at much higher resolutions than are found in MCUs, at a price of course. I notice that two I2C buses are available, one master and one slave. Are both exposed? QSPI exposed?
@timber mango As I said, all pins are exposed, but without any specific role. You can actually use the SPI pins as GPIO pins on the nrf52840. But this is just a bare board with a single voltage regulator, and two resistors for the USB port, nothing more. You decide what you want to do with the pins.

#

All this board does is bring out the pins of the nrf52840 in a human-usable form factor (I know, we might disagree on this).

slender iron
#

Here is the notes document for Mondayโ€™s CircuitPython Weekly meeting. It is at the normal time of 11am Pacific / 2pm Eastern here on Discord. Everyone is encouraged to attend! Please add your hug reports and status updates even if youโ€™ll be attending the meeting - itโ€™s super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and weโ€™ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1CZOWdmPGYcvt9WVl_NBxi-M3RXRtTklC13YtziBAu_Y/edit?usp=sharing

manic glacierBOT
timber mango
#

I have run up on and interesting situation with my multi-display code. I have three alphanumeric displays addressed at 0x70, 0x71, and 0x72. I hold the displays for these addresses in a list. When I cycle through the list, everything always goes to display 1 (0x70) and never to the others. I have attached a short script that demonstrates this issue.

#

Is it not possible to hold these in a list and use them as display[0].show(), display[1].show(), and display[2].show?

ionic elk
#

@onyx hinge couple quick questions about your RGBMatrix tutorial: https://learn.adafruit.com/rgb-led-matrices-matrix-panels-with-circuitpython/example-simple-two-line-text-scroller

  1. is there an official way to lower the speed of the scrolling? It seems that inserting a time.sleep delay over 15ms borks it.
  2. would it be possible to edit the fritzing diagram for the STM32 to match the proto shield diagrams? All the pins are named different things (R0 = R1, R1 = R2) and it's a bit confusing
Adafruit Learning System

RGBMatrix creates brilliant light displays

onyx hinge
#

@ionic elk I have never gotten the hang of displayio refresh rate stuff. And yes my fritzing diagrams are not great. Matching other sources was apparently not my priority

ionic elk
#

it's all good

onyx hinge
#

Constructive criticism is good

#

Yours was very constructive

ionic elk
#

that's good because I've got some more ๐Ÿ˜† I can't really get static text to display, any ideas?

#

^attempt at "hello"

#

actually, it might just be that I have kinda crappy connections, nevermind.

#

though the stretched text might still be something worth asking about I dunno.

manic glacierBOT
#

On the older version docs pages such as this one: https://circuitpython.readthedocs.io/en/4.x/shared-bindings/displayio/Group.html

There is a warning at the top and center but I find it somewhat easy to overlook when I arrive on a docs page from a google search or other link.

The two ideas for improvement I had were to make the warning a bolder color and/or make it scroll with the page so it's always visible.

timber mango
#

I added a variable _address and an address() property function to expose it to the adafruit_ht16k33.segments.Seg14x4 class so I could find out what address is really being stored with each display. Everything is correct, so I do not understand why only the first display is being written to regardless of which one is selected. Something is definitely off, but I have not figured out what that is yet.

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 5\.4\.0\-beta\.1
orchid basinBOT
manic glacierBOT
manic glacierBOT
#

With tv_usec having a value between 1 and 1 million, multiplying it by 2 and dividing by 71 give us values from 1 to 28168. Since a tick is 1/1024th of a second, that could add to the return value by up to 27 seconds. It seems correct to me to multiply seconds by 1024, and add subticks of 1000000 divided by 1024, which is what the original fix did. That would give us subticks of 1 to 1000, which when added to seconds*1024 would be the right number of ticks.
Testing of the proposed fix show...

manic glacierBOT
orchid basinBOT
lapis hemlock
#

@lapis hemlock That is tight pitch! I would need a long carrier board with 0.1" spaced holes in order to use that so I could use it on a breadboard. I will just stick to the Feathers then.
@midnight wedge Actually, if you need all pins with a 0.1" pitch, you should take a look at the BLYST840 breakout board: https://www.crowdsupply.com/i-syst/blyst840/updates/launch-announcement That has exactly that, for the extra space.

Crowd Supply

Dear backers, I am pleased to announce the launch of this new finger tip size Bluetooth 5.2 module and its development boards! Visit the campaign page to get yours now. Also, a photo of the USB-A dongle was released during pre-launch and we have received a lot of demand for a ...

gentle bronze
#

@indigo wedge I made uf2-esp32s a seperated repo since it is kind of difference, it is actually an application serves as 3rd stage bootloader. It is still in the making, and I don't want to deal with idf build system. The project also includes a modified 2nd bootloader along with parition table for esp32s2 as well. It is kind of complicated https://github.com/hathach/uf2-esp32s I have just finish the readme for sum up there.

#

Once I figured out and put everything together, we will see if we could integrate it into tinyuf2. Though I am not sure if that could work that way.

thorny jay
#

@idle owl About the LED Animation, I tested a few days ago with a ring of 24 APA (now you added even more stuff). And I noticed that some animation could look better if the library knew it is circular. In particular, Meteor did seems odd (I had disabled the bouncing mode). One meteor start, goes to the end (that is next to the begining) and then disapear, then another one start. Do you think it does make sense to wish for the meteor to do a continuous loop? I don't know if that is difficult or only apply to Meteor. Just it did seems odd at the time I tested.

onyx hinge
#

@ionic elk just saw your notes & video from yesterday. I can't tell from what I can see for sure, so just want to make sure you have a good power supply. Don't try to run the panels just from USB. I use a 5V 2A power supply on my 64x32 panel and that seems to be marginal.

ionic elk
#

@onyx hinge I've got what I think is a decent 5V 4A power supply but my connections are not the most amazing, so I asked for one of the Featherwings. That said I don't think the stretched font issue is related to the connections, because Conways game of Life seems to work just fine without any "stretching"

onyx hinge
#

That's odd

ionic elk
#

I could be wrong though, it isn't super easy to tell.

manic glacierBOT
#

I used the script above to measure sleep time, running 10 sleep()s in a loop and displaying the times before and after. I realized that when I tested the suggested correction I did not restore the division by 32 in the return statement. Doing that now yields correct results, and I have updated the pull request accordingly.

teal bear
#

maybe a year ago I got a python command to rebuild the fs on the cpx - what is it?

#

I updated from 3.x to 5.x and now dmesg: FAT-fs (sdc1): error, fat_get_cluster: invalid cluster chain (i_pos 1606)

solar whale
#

@teal bear to erase the file system import storage storage.erase_filesystem() MAKE SURE YOU HAVE BACKUPS

#

it will erase everything

teal bear
#

yeah, thats it. thanks.

#

but... I can't get a prompt. tio /dev/ttyACM0 - says "connected" but no >>> and typing doesn't echo

solar whale
#

not familiar with tio -- try screen /dev/ttyACM0

#

does the CIRCUITPY Drive mount?

teal bear
#

doh. I think I needed to hit ^c to get out of the running code.py

solar whale
#

that was my next question ๐Ÿ˜‰

teal bear
#

yay, cpx rebuilt setup everything with 5.x - thanks for the helps

gusty topaz
#

Dear all, are there any news regarding the support for the SD Card on the STM32F405 feather with CP?

manic glacierBOT
solar whale
idle owl
#

@thorny jay I don't think it would be hard to implement, if I understand what you're suggesting anyway. Please consider filing an issue on the GitHub repo for the library if you'd like a new feature or concept to be added.

prime flower
#

@slender iron responding..

slender iron
#

thanks!

manic glacierBOT
#
[adafruit/circuitpython] New branch created: main
ionic elk
#

@slender iron how did you figure out the endianness of the ARM_MPU_RASR MPU functions? They don't seem to have usable documentation anywhere

idle owl
slender iron
#

@idle owl yup! "cal as in calendar"

#

@ionic elk no idea

#

I don't know why you think I figured it out

idle owl
#

Right. Wanted to mention it in the newsletter, but wanted to make sure I remembered it right.

slender iron
#

thanks!

ionic elk
#

@slender iron didn't you write the whole MPU section for the i.MX?

idle owl
#

@slender iron What's a good once sentence description of it.... a website to provide election dates and information to folks around the US?