#circuitpython-dev
1 messages ยท Page 299 of 1
So I guess my question is, how is Micropython requesting that file be compiled at all?
@tulip sleet it isn't in the source list - you mentioned some kind of default setting?
i'm confused, where do you see SRC_S = supervisor/cpu.s
must have been an old thing I copied
in circuitpython. stack.c calls cpu_get_regs_and_sp
i guess micropython took that out (if it ever had it)
I mean we still have it, I know stack.c is called and somehow it is not failing
Oh I see you just mean micropython. You have cpu.s in the nrf port
Let me back up - because I cannot figure out how Micropython is actually getting the startup_stm32f405xx.s file to produce an object file that it is using, I attempted to add it to Circuitpython's SRC_S, which currently only contains cpu.s in most ports and in mine also contains a local, duplicate copy of startup_stm32f405xx that I'd like to get rid of
As in, I can get boards/startup_stm32f405xx.s to compile and be successfully added to the build via SRC_S, but I cannot replace it with st_driver/CMSIS/Device/ST/STM32$(MCU_SERIES)xx/Source/Templates/gcc/startup_$(MCU_VARIANT).s for some reason
and I cannot figure out how Micropython avoids this issue and somehow just grabs a complete object from thin air
could you push your current repo to your branch so I can take a look?
Sure it's about ready for that anyway.
ok got it
@ionic elk you have MCU_VARIANT instead of MCU_VARIANT_LOWER, did you mean the latter
๐ 's ok ๐
thank you dan
yw! we help each other
ugh now I'm getting the old __libc_init_array issue though
@tulip sleet the default ST files call bl __libc_init_array, which causes this error: in function "__libc_init_array": init.c:(.text.__libc_init_array+0x14): undefined reference to "_init". Clearly Micropython suppresses it somehow. This is C++ junk, right? I removed it in all my custom startup files but if I'm using the supplied ones I don't have that liberty.
I can make it go away by removing -nostdlib, is that ok?
i'm not sure if it's ok, i'd see why the __libc_init_arry is showing up
@tulip sleet how is ble bonding info restored?
@ionic elk you can't remove it because tinyusb has it in there?
Pulls in the following updates to Adabot:
- Auto-addition of missing standard labels on library repos
- Remove dead code related to TravisCI
- Fix the CircuitPython Librarians permission validator
I just had this happen with very low volume printing. I'm starting to wonder if this is related to using displayio ...
@slender iron stored bonding info is retrieved by calls to bonding_load_keys() and bonding_load_cccd_info() in common-hal Connection.c, lines 286 and 310.
kk, I think packetbuffer needs to check to see if the hvx has already been subscribed to
that should happen on BLE_GAP_EVT_CONN_SEC_UPDATE. The cccd settting is stored whenever a cccd is written (after a little delay to consolidate writes), so it should get restored on BLE_GAP_EVT_CONN_SEC_UPDATE. I don't think you should need to handle this specially.
i guess you mean you might not get notified about the change
right
since it's done by sd_ble_sys_attr_set().
maybe CharacteristicBuffer has the same problem
I don't think so because CharacteristicBuffer grabs all reads and writes
PacketBuffer tries to limit it to one connection
ah isee
I added an RSS icon that links to the new feed and updated the top menu spacing so it looked better with the new icon. I also added images to the description of the RSS items so that they should show up in the users' feeds and tested with NetNewsWire. Adding @jwcooper as a reviewer since it affects the styles.
PacketBuffer tries to limit it to one connection
@slender iron That sounds very similar to what we need for the RFM69 radio stuff.
@tulip sleet the system files that are exported/ship with stm32 cube come with the __libc_init_array by default. We could request that tinyUSB get rid of them in the st_drivers repo
Just to keep this issue "in the loop", an issue has been posted to actions/virtual-environments regarding the azure.archive.ubuntu.com repository failures.
Should we further edit this issue title to specify which Actions failure this pertains to? Since we have a few we're working through...
Anybody else on here a language learning nerd? I had an idea today for a language device using circuitpython.
@sommersoft Maybe a few pointers to some failed jobs would be helpful to them?
There are pointers to failed jobs in the GitHub Community forum posts. Is it bad form to keep plastering them in each place? ๐
OK, then probably not necessary; they just need to fix it. :smiley:
I've managed to make it through my first time building a CircuitPython uf2 file!

@lone axle yay!
If I am trying to make a build with a modified library frozen into it. Do I need to do anything besides replacing my modifed version of the library repo inside the frozen directory in place of the original?
since it's an existing build with a frozen library, that should be all that's required.
Where is the behavior that creates boot_out.txt defined? if I wanted to make a build that prints different information on the first line of that file how could I do that?
I would like to know if anyone is still interesed to porting, from Arduino library or maybe make new driver in CircuitPython ( or also for MicroPython ) of Maxim 30101/30102 chip.
@lone axle I think this is it https://github.com/adafruit/circuitpython/blob/master/main.c#L350
Ah. Thank you Jerryn
Has anyone thought of a wrapper for displayio to make it easier to design UI. Something like tkinter or kivy or any modern UI framework. Was thinking users could specify button and pack with grid or absolute spacing. UI should handle the touchscreen setup and create a default button....
I donโt have the skills or the time to implement this just a thought to inspire someone hopefully.
There is a library for pyportal that is a sort of UI framework. It's nothing to the extent of the ones you mention but it's a start for applications with basic flow and buttons.
@vague monolith https://github.com/adafruit/Adafruit_CircuitPython_PYOA here is a learn guide for it as well. https://learn.adafruit.com/circuit-python-your-own-adventure/overview
It is named for "making adventures" but really it is a UI layer like an older "HyperCard" system
Yeah the current state of UI design on pyportal is difficult for newer coffers
Coders
Also temp doesnโt seem to work like other platforms like cpx
Weird things like that Iโm sure come with time and everyoneโs tireless work.
Just providing some insight from trying to learn with my kids
Thank you all for everything you do
Also see this guide: https://learn.adafruit.com/making-a-pyportal-user-interface-displayio
I wish to learn enough to contribute more someday
That one is not really a framework but is a great resource for learning to make pyportal interfaces with the existing displayio tools.
Yeah that guide doesnโt work on titano, Iโm assuming due to some i2c address change on the temperature sensor. Also where this line of thought on a UI wrapper came from 700 lines of code vs something like a button class that already understands ts and just has an event callback. One day Iโll learn enough to help more
I thought I remember the cpx helper library having things like cpx.light cpx.temp etc.. I could be wrong itโs been awhile
@vague monolith I can try to help you get it working on the titano if you want. Lets move over to #help-with-circuitpython
Hi, I've been trying to write a simple driver for an SPI Flash chip (W25Q64FV) so that I can use it as a storage device using the storage.VfsFat module. I have written a very basic SPI flash driver which seems to work ok (SPIFlash) and a block-device wrapper for this (SPIFlashFS) which again seems to work ok. I am able to format the device using storage.VfsFat.mkfs however if I try to create a storage.VfsFat instance all of the methods return OSError: [Errno 19] Unsupported operation . The strange thing is that if I create a simple RAMFS driver (copying the one in ./tests/extmod/vfs_fat_ramdisk.py ) this seems to work fine as a block device and I cant really work out what is different about this and my driver. I couldnt find much documentation on blockdevices so wonder if anyone has any ideas. The code is here (this is very rough at the moment I'm just trying to get things working): https://github.com/paulc/citcuitpython-spiflash
does this circuitpython version https://circuitpython.org/board/feather_m0_rfm69/ work with this device? https://www.adafruit.com/product/3177
This is theย Adafruit Feather M0 RFM69 Packet Radioย (868 or 915 MHz). Also called RadioFruits, Adafruitโs take on an microcontroller with a RFM69HCW packet radio transceiver plus built in USB and battery charging. Its an Adafruit Feather M0 with a 900MHz radio module cooked in!...
Or does it need something different since it has a different frequency?
There's a separate download for the 433MHz
Yes. You just set the frequency when initializing the driver
There is? Where?
The CP build only has the pins defined. It does not know about the radio
Is this not it? https://circuitpython.org/board/feather_m0_rfm9x/
oops, sorry, 96
Incidentally I did manage to flash the bin file from this page (first time using BOSSA
) not sure if the radio is working, but I did get a a CIRCUITPY drive.
I did the same thing mixing them up at one point anecdata.
The library configures the radio.
It will be very tight on memory. Use the . mpy lib and you may have to run any test as code.py to get it to load
Make sure you install an antenna before trying the radio.
Ooh thank you. Probably would have tried it out and been wondering why ๐ฉ
@crimson ferry I wish they were not so similarly named!
Is a length of wire soldered to the pin hole at the back labeled "Ant." sufficient?
Yes. Thatโll be fine. The length is in the guide. Twice as long for 433 MHz as 915
16.5 cm
Thank you
Youโre welcome Good luck with it!
In this section of the BOSSA buide it states about using the offset with versions greather than 1.9. If I accidentally did it without the offset and thus it failed will I have erased something important on the device?
I donโt think so. The critical parts should be protected.
Should be able to just reload
Okay, I seem to have ended up in a weird state. After it failed with the wrong offset I was able to run Write and Verify and both were successful
Same as I did on the first device. But on thise second one I pressed the reset button afterward and now it seems like it's bootlooping
LED 13 is blinking 3 times in a row on, then off a moment, one time on, then off... then repeat
If I double press reset I can see LED 13 start to "pulse" briefly like it's going to bootloader mode but then the blinking loop resumes
Hmm. Not something Iโve seen. You may need to check with @tulip sleet
Do you have a JLink?
Yes - you can reload the bootloader. Even load a uf2 bootloader.
You have to tack wires onto pads on the bottom of the board.
But hopefully there is a simpler way!
uf2 would be nice if it's posslbe.
IIRC it just uses the feather_m0. (Not express) bootloader. Either bossa or UF2.
I'll have to put it down for a bit for now. nothing I can do seems to change it from it's blinking and reconnecting
๐good luck!
yep, thank you
I was trying the same thing with an rfm9x M0 a few weeks ago and now that youโre explaining what you are seeing, I may have done the same thing. I ended up putting the uf2 bootloader in it. I hope you can recover it more simply.
I've looked into getting a jlink before but never had a specific reason for one.
Looks like digikey has got lots in stock if it does come to that.
@tepid cliff I don't know of anyone that uses VFSFat except the SD card code. Maybe look their?
To add to the general discussion around use of ms timing in CircuitPython, I just spotted a few more example of this in a library.
- https://github.com/adafruit/Adafruit_CircuitPython_SHT31D/blob/36379b2574a618814a9ff61297f234189afb6390/adafruit_sht31d.py#L187-L196
- https://github.com/adafruit/Adafruit_CircuitPython_SHT31D/blob/36379b2574a618814a9ff61297f234189afb6390/adafruit_sht31d.py#L207-L229
I'm not saying those will be affected by additional delays as I've not looked at what's g...
BTW, CP is a bit more permissive on use of underscore in literals.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0 on 2020-03-02; Adafruit Gemma M0 with samd21e18
>>>
>>> print(123__456) # 3.6.6 does not like this
123456
>>> print(123_456_) # 3.6.6 does not like this
123456
I don't know how close you want to stay to PEP-0515 but thought I'd mention it.
@vague monolith Using our products and code, and giving us feedback is one of the most important ways to contribute. I understand what you mean though.
@lone axle Congrats on the build! The EDU Mini Jlink is affordable and would do everything you need - if you decide to get one. You may need an adapter cable to go with it - I don't recall if it comes with the cable or not.
Yes. Thatโll be fine. The length is in the guide. Twice as long for 433 MHz as 915
@solar whale @lone axle Not quite, it should a little more than twice because 915/433 > 2. Get the exact length via the wavelength formula: L=c/f where c is the speed of light and f the frequency, then for the antenna length take 1/4th of that = 17.3 cm.
Ah thank you. Yep looks like it is a bit more than double: https://learn.adafruit.com/adafruit-feather-m0-radio-with-rfm69-packet-radio/antenna-options#wire-antenna-4-2 showing 7.8cm on the 915 and 16.5cm on the 433. Interesting to see the direct formula to calculate thank you for sharing that.
@slender iron do you have any suggestions for a reliable 4.2 or larger e-paper screen, after the work you were doing on them? I was thinking I'd just grab one for use with https://www.adafruit.com/product/4224, wanted to see if you had any suggestions first though.
I have two of the Feather M0 RFM69 boards. They are great for Arduino, but they can not do much using CircuitPython. I did manage to get just enough on them for a very small node though. There just is not enough RAM for much else.
I will be LURKING for the meeting because I am in the hospital.
@timber mango I've added you to the notes as lurking. Hope you get well soon.
@lone axle If you forget the offset it loads it at 0x000. This could overwrite the bootloader except that on most boards we have protected the bootloader from overwriting. If you double-click do you get a pulsing red led?
Since rtc_offset is in seconds, this means that time sync with an external source will always have +-.5s error. Perhaps as a future improvement, an additional second offset of 1/1024s could be added.
is integer overflow relevant here?
I did not review stuff in submodules, and only paid "real" attention to the way things were done in samd and nrf ports, not the other ports. I assume all was done according to the same plan.
I have a couple of questions, but on the whole this is pretty clear and some of the questions are just clarification for my own benefit.
Testing done: none
@tulip sleet upon double clicking reset I can see the #13 LED start pulsing for just a second and then it goes back to the blinking pattern without any further input / action on my part.
@lone axle Can you upload Arduino Blink to the board (probaby not)? A J-Link is very useful so if you can get one, great. https://www.digikey.com/product-detail/en/segger-microcontroller-systems/8-08-91-J-LINK-EDU-MINI/899-1061-ND/7387472 is fine
Order today, ships today. 8.08.91 J-LINK EDU MINI โ ARMยฎ Cortexยฎ-M - Debugger, Programmer (In-Circuit/In-System) from Segger Microcontroller Systems. Pricing and Availability on millions of electronic components from Digi-Key Electronics.
CircuitPython Weekly meeting in just over two hours. Everyone is encouraged to attend! Please add your hug reports and status updates to the notes document, even if you'll be attending the meeting - it's super helpful. Looking forward to talking to you soon. Thanks! <@&356864093652516868> https://docs.google.com/document/d/1YZYYrODJwUpKD4PWWzjpPhzBAvf5Mf196r4z7uo6dns/edit
@lone axle also get this: https://www.digikey.com/products/en/development-boards-kits-programmers/accessories/783?k=adafruit 2743 (see https://www.adafruit.com/product/2743), and make sure you have all the appropriate cables (I think the Edu Mini comes with the right ones but double check)
Order today, ships today. 2743 โ - Adapter Board from Adafruit Industries LLC. Pricing and Availability on millions of electronic components from Digi-Key Electronics.
@tulip sleet thank you. I'll try out Arduino blink a bit later, though I think you are right probably won't work because from the PC side it keeps seeing the device reconnect over and over, never staying long enough to get a COM port # any more. Thank you as well for the info on J-Link and accessories!
ah I bet that's because the "fuses" have been overwritten with all one's. If they are set to all 1's then the watchdog timer is enabled with a very short timeout, and the board keeps resetting
@lone axle Cheers. Now I wonder, though, why Adafruit lists 16.5 cm when the optimal length is 17.3 cm. Perhaps 8 mm of internal connection length? Or simply a slight miscalculation.
that is pretty simple to fix with a j-link
Hooray, glad I didn't manage to break it more permanently. I will look into getting a J-Link ordered tonight so I can get it revived.
@timber mango internal connection length seems plausible to me. But I'm still brand new to the radio world I would have to defer to someone with more knowledge of radio generally, and/or the circuit on this device.
@timber mango @lone axle the antenna length is not exactly 1/4 of the wavelength due to the velocity factor of the wire https://en.wikipedia.org/wiki/Electrical_length
physical length != electrical length
but it's also true it may have to do with board trace length too
I've still got at least one memory bug in protomatter, after updating code.py a few times I get a MemoryError.
@lone axle just in case you haven't seen this yet:
https://learn.adafruit.com/how-to-program-samd-bootloaders/feather-m0-m4-wiring
some basic info on connecting jlink
@timber mango there are severl "calculators" out there like this on e http://www.csgnetwork.com/antennagpcalc.html they all give the 16.5cm value in use -- they do assume there are also ground plane radials .... it's not a perfect world ๐
@tidal kiln had not seen this yet thank you! definitely will be coming in handy.
@tulip sleet @solar whale Thanks. So apparently the calculation is made for a velocity factor of 16.5/17.3=0.95, or effective permittivity of 1.1, which according to the page mainly depends on the surrounding dielectric i.e. the insulation around the wire. I guess if one were to use bare wire, it would be 17.3 cm.
this one lets you tweak the velocity factor.. https://m0ukd.com/calculators/quarter-wave-ground-plane-antenna-calculator/
@solar whale Oh! That link from @onyx hinge says the velocity factor of bare copper wire itself is 0.95... Alright. (And insulation is another factor of 0.95, apparently.)
and if you forget it, you accidentally come up with a finding that neutrinos travel slightly faster than light ๐
A link from a GPS receiver to the OPERA master clock was loose, which increased the delay through the fiber. The glitch's effect was to decrease the reported flight time of the neutrinos by 73 ns, making them seem faster than light.[21][22]
OK so I don't have any element of the story I was thinking of correct. https://en.wikipedia.org/wiki/Faster-than-light_neutrino_anomaly#Measurement_errors
Faster than light is possible for charged particles in a medium, which gives Cherenkov radiation ๐ https://en.wikipedia.org/wiki/Cherenkov_radiation
@timber mango velocity factor also depends on wire diameter; I don't know if that's negligible in this case
@tulip sleet Maybe that's the 0.95 for "bare copper wire" as per the link of @onyx hinge because normally it would be 1 for a (near) perfect conductor.
I have a couple of 433 MHz rf modules, i think i must do an antenna length experiment now ๐ will report back, i think in 2 days.
Test
@ionic elk That's the largest Adafruit carries. There is one 7" I have my eye on but I haven't tried it
@slender iron are you referring to the 4.2inch one in the link I posted? That doesn't actually seem to be stocked by adafruit, it's just there for the picture
If adafruit has a 4.2 inch epaper I'll get it but I don't see one
ah, hrm
only has the hats
lol I mean I can always default back to Waveshare
Is that the 7" one you have your eye on ?
I just find their software to be ehh
What's the new one? I could pick it up too and test
if it's waveshare than that's exactly what I'm talking about, they make weird software decisions
I want to make a new device that puts my Anki decks on epaper
Good Display is a professional E-ink Display (E-paper display) and OLED display factory in China, as market leading supplier,we have more than 10 years' products experience for both Standard and Custom Products.
I think that's the new one. triple check the IC to make sure the red bits are a separate array from black and white
Good afternoon all you wonderful folks -- happily lurking today ๐
@timber mango Your mic is on ๐
Yepper!
woof, grabbing a glass of water before the meeting
The CircuitPython Newsletter will be out tomorrow morning, Sign up at https://www.adafruitdaily.com/ - no spam, leave anytime, the list is never sold, all that good Adafruit mojo.
lurking
Just lurking...
Just lurking about today as i work on some work stuff
I'm lurking but available for interaction as needed
Very quiet in the studio today so I'm un-lurking for a change!
lurking
lurking
The time of COVID-19 has been difficult for many people around the world, in many different ways. As an act of community service, a group of computer science instructors is coming together to offer our teaching services free of charge for people who want to learnย introductory ...
Making a Temperature Logger with the Adafruit Feather STM32F405 Express with @ShawnHymel https://t.co/W1jpkxsHJC #circuitpython #project #education
The time of COVID-19 has been difficult for many people around the world, in many different ways. As an act of community service, a group of computer science instructors is coming together to offer our teaching services free of charge for people who want to learnย introductory ...
jeff has been
Thanks Jeff! ๐
swoon
looks like minecraft
Lurking. Sorry late.
๐
Just curious, since I was reviewing in there, is Adafruit_Python_PureIO something that would show up in the stats?
@onyx hinge we should probably include that in the blinka stats
I don't think we're comprehensive with that though
Awww, thanks
That really was a nice Show & Tell from JP
I'm super sad I missed that miniSAT.
yay!
@slender iron if you can dive into the docs and get those names in correctly that'd be excellent. (about the 3H)
yup yup
You have to read
is Adafruit_Python_PureIO something that would show up in the stats
@onyx hinge it is not included, and neither is Adafruit_Python_PlatformDetect. We could include them; just would need a little more flow-control possibly. feel free to put up an issue. ๐
@onyx hinge Thanks!
nice job!
I know I'm quietly lurking, but for what I'm doing outside of Circuit Python -- aside from working, I've just picked up a first-gen Surface Book. Been a mac user for ages, and I needed a bare-metal Windows machine for some accessories I want to use for streaming.
I forgot to mention what I was doing outside of CircuitPython stuff. I finished building a Prusa Bear 3D Printer.
Smarter than the average printer ๐ /yogi
๐
Very Nice @gilded cradle , I watched Chris's Basement build his.
Thanks. Mine's taller than the typical Prusa Bear
my 3d printer is too small to print the face shield headbands, I'm bummed about that.
I ran into this indirectly while trying to use an MCP9600 because the MCP9600 library will fail with a cryptic "Input/Output Error" when you use board.I2C or otherwise use the default frequency.
It would be helpful for the library to be able to read the frequency in __init__ and raise an exception if it isn't within an acceptable range (datasheet says 100K, examples use 200K apparently).
@cogliano your input would be appreciated
I'm having mild symptoms, so I don't want to make the problem worse by printing PPE.
Print something fun instead
๐
Thermal Cameras are fun ๐
I have the stuff to make a thermal camera on hand
Good luck getting out of debt ๐
๐
I've been playing a lot of Minecraft - the pre-1.16 snapshots.
haha, exactly
I did wire wrap too back in college & at JPL
at JPL...instant jealousy-mode invoked. ๐
I'm learning how to make bread this week lol
I made biscuits, sausage & gravy last night, Pillsbury biscuts
Yum!
yeah, Pillsbury is about the closest i get to making bread. ๐
@inland tusk do you have a link to the keybed?
There are some fun dessert breads that aren't anything more than "mix a handful of things together, toss into a pan and into the oven for X minutes". I really don't enjoy the process of kneading and proving bread.
I had a bread machine years ago. It was fun. I baked a few bricks while experimenting with modified recipes.
Blueberry Buckle is classified as a "bread" in my cookbook but it's just a handful of this and mouthful of that...
๐คค
@tulip sleet i've had some linux lock ups also, total system freeze, requires reboot. been happening for a while. maybe related, but can could at least maybe double check what you're seeing.
My browser windows have all crashed, I need to reboot, I plan to be back
DHT. they always bring joy...
@tidal kiln I'm running the Ubuntu 20.04 beta, but I was seeing hangs in 18.04. This manifests as a complete Linux hard crash if I do import storage; storage.erase_filesystem() on a SAMD21 board (might also be SAMD51 or more).
if you could try that it would be great, not on your machine right now ๐
i have a Dell Optiplex 7010 with Intel motherboard USB hubs, I think
@tulip sleet yah. i'll try at some point and report back. i'm 18.04.
I can't reproduce on a 20.04 Dell E5250 laptop
@tulip sleet i've got 18.04 on a Dell Inspiron laptop, and 19.10 on an RPi3B+, if you want more testers.
woooooo
@slender iron I don't have pictures of it yet.
Here is a link to Syntaur. They have keyboard parts. https://syntaur.com/
neat!
That's a nice thing, always good to unplug.
I converted my Chromebook to run GalliumOS, which is based on Xubuntu.
@tidal kiln @raven canopy https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1871143 . The dmesg output (if you have kdump enabled) you can find in /var/crash/<date_stamp>/dmesg.<date_stamp>
@raven canopy I doubt it would crash on the RPi, and the laptop is probably ok too, but you could try. It doesn't always happen, but on the 7010 it happens most of the time.
any syslog hints?
it doesn't show up in syslog because it's crashing immediately, but the dmesg output from the crash is in the bug report in the second comment
"A number has been divided by zero 13 times today."
Umpteen Dozen
You guys know how to make somebody hungry๐
Pynt has its own UF2, but no board in the ports? What triggers the unique UF2 creation?
display size?
Pynt is 320x240, same as Original PyPortal
some boards use the same UF2 as another, it's just a copy with a different name
real question is... is it possible for a Pynt to know it's a Pynt, programmatically in user code?
no
ah, thanks Dan
So maybe we need a .../ports/board/... for Pynt... only difference would be board os.uname().machine
(Titano does have a unique machine name relative to Original)
@crimson ferry could check for existence of ADT7410, maybe?
Sorry if that keyboard clacking was loud =x
Is there a way to "check for" an I2C device other than initializing it and catching the exception? Like just see if an address is connected without initializing it?
Can scan I2C to see if the address exists
but it could be a doppleganger, possibly
probably a way to do register-level checking...?
thanks @turbid radish !
Sorry -- I have to go -- have a great week all ๐
@solar whale have a good week
Great meetup folks. Be safe and well.
Thanks everyone! Have a great week!
Thanks everyone
Thanks!
see you later everyone!
๐
Here is the CircuitPython Newsletter repo, select the latest dated newsletter to put in a PR against https://github.com/adafruit/circuitpython-weekly-newsletter/tree/gh-pages/_drafts
@lone axle fwiw, it may be just a couple of things... Pynt diffs relative to Original/Titano... #define MICROPY_HW_BOARD_NAME "Adafruit PyPortal Titano" in https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.h & USB_PRODUCT = "PyPortal Titano" in https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk looks like USB_PID changes too
there is a matrix keyboard library
I used that for a C64 keyboard that is 8*8
Yes, there is one.
You give the sending lines, and receiving lines.
You cannot avoid the input pin, but there is a way to reduce the output pin number.
Something related to shift register.
See you.
Thank you @crimson ferry
@tulip sleet i got lock up to happen with Trinket M0 and Itsy M4, both running 5.1.0, doing storage.erase_filesystem(). i don't have kdump installed, but could if that would provide useful info.
so just lockup, not crash; you are not running the new bootloader, so it's not the bootloader, so I don't need to hold that up
total freeze. have to hold power button in to recover.
I am going to talk to Thach about doing a cleaner USB shutdown on storage.erase_filesystem()
I have that too
i think i've had this happen with arduino also - when it resets after upload
this actual crash is something new.
Yes, I think see that sometimes too, but rarer
i think it's the MSC drive disappearing abruptly or something
but I thought it had to do with the new drive appearing, so maybe not sure about that
oh - two different things happening? crash and freeze.
possible; what's the model number of the machine this happened on?
i will look up which usb controller it uses
some dumpster dive HP....not really sure...let me look...
Dumpster Dive HP โข๏ธ
going for a (safe) walk with my wife; will be afk for a while, but thanks!
If some crazy code (cough FourWire) decides to reconfigure the bus
before every transfer, it might get a bit slow...
@arturo182 This has been happening a bunch. It isn't your fault. I'll try to rerun it.
@tulip sleet no hang/lock for me on the laptop w/18.04.
Oh, and it isn't crazy. The bus could be shared with another device with different parameters.
Merging. I spot compiled two mimx boards and they compiled just fine.
Ya, I think it makes sense to zero out any pointers you no longer need. They might be GCed. It depends on if anything else refers to the memory.
As far as the backlight, it can delegate to the underlying framebuffer (a protocol function that is permitted to be NULL), or it can use a pin as now as a fallback. protomatter uses 0 to mean pause, nonzero to mean not paused; it doesn't scale RGB values to emulate intermediate brightness levels. I have a feeling that adding a fixed off time might give better results, so if that's important we should talk to @PaintYourDragon about it.
If we thought at least 2 framebuffers would do ...
How about calling this refresh() to match the other display types? I get that this would be needed if using protomatter without displayio.
Is oe_pin we use elsewhere already? Otherwise I'd prefer it written out output_enable_pin. Real words are better for newbies and non-native english speakers because they can google it then.
I know this is short but please common_hal it.
Hmmm... I should have looked more closely at the 3.5" TFT FeatherWing before I started soldering.
I didn't reqlize the connectors were backward so you can stick a feather on the back of it.
I wanted to use the feather quadrupler but the screen will have to go on the back.
I'll figure something out.
Quadrupler might work if you soldered some male pins on the underside of it.
or used these https://www.adafruit.com/product/2830
Yeah, that's what I'm thinking. I had already soldered femail headers to the front. I was going to just use some unsoldered male headers between the two femail headers.
For now I've just got my M4 express stuck to the back of it. I think I'll try the displayIO learn guides before moving on.
I'll probably try learning KiCAD and designing my own board in the end if my concept works out.
I had the idea of using two of the TFT displays, one in lanscape orientation and one in portrait. That would reaquire a custom board anyway.
No, I don't think so. I'd be fine for an actual interrupt handler to run and then set a flag. The important bit is that an interrupt occurs (otherwise it will stay asleep.)
This is a weird git-ism when trying to detect a moved file. It's empty so changing it is fine.
Is it possible to have one Circuit Python device "talk" to another one via SPI?
I did not review stuff in submodules, and only paid "real" attention to the way things were done in samd and nrf ports, not the other ports. I assume all was done according to the same plan.
I have a couple of questions, but on the whole this is pretty clear and some of the questions are just clarification for my own benefit.
Testing done: none
Please take a closer look at STM32 as well. It has a real time clock (not counter) and so it has it's own set of challenges.
@lone axle no because we don't have SPI slave support. UART would work though
and sphinx 3.0.0 is out and broke my build
As long as you are editing this, I'd suggest just deleting this Pinout section, which only includes a few boards and can't easily be kept up to date.
I looked over the STM32 code that uses alarm masks, and it looks ok to me.
All comments are stylistic: nice cleanup in general and simpler than it was before!
I didn't do any board testing yet; you have, so I'm not sure it's necessary. I can do some simple smoke tests if you'd like.
This is very pedantic: "Hz" is capitalized. "mHz" is millhertz (like milliamps), "MHz" is megahertz.
I think this comment is left over from the nrf port??
@tulip sleet I noticed you'd been doing some bluetooth stuff with oximeters. I was curious how they worked (the Sa02 measurement, not the BLE bits) and eventually found https://www.robots.ox.ac.uk/~neil/teaching/lectures/med_elec/notes6.pdf
Any writeups for debugging CP development? I'm happy to debug over JTAG, but don't know how folks are "easily" integrating it into the build process
@lime trellis https://learn.adafruit.com/debugging-the-samd21-with-gdb
https://learn.adafruit.com/circuitpython-samd-debugging-w-atmel-studio-7
Scott and I don't use Atmel Studio at all; we just use gdb via the J-Link.
Good places to set breakpoints are reset_into_safe_mode() and HardFault_Handler()
@tulip sleet thank you ๐ I had read through those but I'm attempting to debug a setup that may not even properly be flashing the firmware onto the external flash.
Is there a way to print out any errors the bootloader encounters when attempting to flash CP?
@lime trellis From another angle, I often end up doing unit tests in "Big" Python, e.g. https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/master/CLUE_Sensor_Plotter and https://github.com/adafruit/Adafruit_CircuitPython_MIDI/tree/master/tests
@lime trellis Oh, from last comment, it seems you are in it a bit deeper, in many ways
@simple pulsar thank you I agree big-boy python can be helpful! But yeah I don't yet have the python interpreter up and going yet haha ๐
so this is for a processor without internal flash? I'd have the bootloader verify each write and complain by blinking if it failed
sorry have to be afk now
I'll dive into the bootloader. Thank you @tulip sleet!
@lime trellis what do you mean flash external flash?
(the same gdb process works with the bootloader source too if you aren't getting out of it)
@slender iron writing the firmware.uf2 to flash
on a samd51 that is still internal flash (imx rt is actually a separate flash chip and is why we're being pedantic)
can you flash CP with a jlink ok?
@slender iron I'm trying to use a very abnormal external flash (devices.h). For example I've modified external_flash.c and spi_flash.c quite heavily during my experiments.
that shouldn't impact the bootloader
How I understand it is the bootloader caches the UF2 on internal, then loads it onto the external device.
I believe it's failing to communicate properly on the "load it onto the external device" step
So I'd try and use the bootloader as my debugging outlet, right?
I'm feeding a Grand Central M4 500 Hz on D6 and it's returning 0 for the value.
Adafruit CircuitPython 5.1.0 on 2020-04-06; Adafruit Grand Central M4 Express with samd51p20
>>>
Test code.py:
import frequencyio
import time
import board
frequency = frequencyio.FrequencyIn(board.D6)
while True:
print(frequency.value)
time.sleep(1)
I have a metro m4 generating the 500Hz signal and verified it is working with a Saleae.
@lime trellis the UF2 bootloader knows nothing about the external flash on SAMD51
as the blocks of a UF2 are written to the bootloader's fake filesystem they are written to internal flash at the location the block has as metadata
@slender iron Ah I see your point! Ok taking a step back, then. Where do these logmsgs print to in the bootloader code? https://github.com/adafruit/uf2-samdx1/blob/b3e13dfbe0f4f1b2a4aa1bfa3ad6d153c507b8d6/src/main.c#L234
I'm trying to use a very abnormal external flash. micro is a SAMD51.
I have the whole setup working with standard NOR flash.
I then take the NOR flash chip off and put a NVRAM chip on. It uses most of the standard flash SPI commands and whatnot. So I then build CP for this new setup (with lots of mods to external_flash and spi_flash).
Putting the board into bootloader mode and dragging the new UF2 = nada after the file transfer.
ok, my next step would be to use a jlink to load CP and break on main
that will rule out the bootloader (which I suspect isn't the problem)
then I'd break on reset_into_safe_mode because you might be crashing
ahhhh ok I see how you're approaching it. ๐ Let me give that a go.
Just to check... is this more or less where CP first tries to access the SPI flash? https://github.com/adafruit/circuitpython/blob/2900d922357e6e239f48e585f09b5a3e4bc2d972/main.c#L428
@slender iron thanks for the in-response-to-review changes! Ping me if I don't report taking another look at stm32.
@lime trellis correct
@onyx hinge np. looking at imx now
this stuff is tough because the registers don't always reset
@slender iron thanks again for the help! I found I'm crashing somewhere in spi_flash_flush_keep_cache. The hunt is still on ๐ but your guidance made all the difference
@slender iron the 500Hz returns 0 isn't surprising. It doesn't handle sub 1KHz, which is documented.
trying to remember precisely why...
I vaguely remember it being related to the timer overflow. it can only rely on catching a single OVF flag...
This question is about a python library for discord bots called discord.py.
I made a wait_for command with this code: https://paste.pythondiscord.com/vizowasami.py
It only works for the 1st and 4th check, when the two checks are complete, it moves on
I want the wait_for to expect to always be triggered besides when the message is deleted
Any clue on how it is done?
Hey @floral nacelle, since that's regular Python and not circuitpython and more focused on a specific library (discord) there might not be anyone here that can help. You might have better luck on the Python discord.
or Discord Testers discord, #bot-help channel nm, that's for something else
@raven canopy ok. I can try faster. would 5k be ok?
should be. my test PWMOut started at 2M and doubled every few seconds.
iirc. looking
yep. started at 2M, doubled every 5 seconds.
kk
@slender iron @idle owl I'm confused; most libraries now install black as a pre-req in build.yml, but I don't see that they use it to re-format or to check.
e.g. https://github.com/adafruit/Adafruit_CircuitPython_HID/blob/master/.github/workflows/build.yml installs black but doesn't use it (unless it's hidden) in a script
Yeah... Sommersoft caught that. We missed adding it.
It's not hidden. It's not there.
We need to patch the libs.
it is in cookiecutter
though it'd be better to do before pylint
@slender iron @idle owl. I'll fix it manually in a PR I'm doing now (scott noticed it initially)
@tulip sleet Ok, we'll be running a patch soon on everything as well.
thanks!
@slender iron Tagged you on a cookiecutter PR to move black before pylint.
@idle owl awesome! looking now
@slender iron Dan approved it, I merged it. ๐
yep
The doc build doesn't complete and is likely broken for the inline
RST. We can move to 3 when we move the inline docs to Python stubs.
@slender iron at some point, on the topic of power, we might want to talk about the ST Hal's GPIO_SPEED_FREQ_ parameter which adjusts pin slew rates. I believe lowering it is a power saving measure, but I'm not sure what kind of interface is appropriate for it. I don't see a direct analog in the other ports.
that's probably pretty far down the list I think because it only applies when the pin is actually in use
there is plenty of room to optimize when things are off
Looks like the other primary use for it is to prevent ringing EMI, but I guess that's not that relevant either, at least not until we have more audio stuff
ah ya
I think there might be some discussion of adding drive strength to DigitalInOut
That would be where this would apply then yeah
Anyone have an answer to how Tkinter is pronounced? I have listened to multiple videos and they all pronounced it differently.
@slender iron other quick style question. For my line differentiation blocks like
#elif (CPY_STM32F4)
#include "stm32f4xx_ll_gpio.h"
#else
#error unsupported processor
#endif
Should I always end with that unsupported processor catch? It'd only come up if we added a new line like the L4 and didn't grep every instance properly.
@ionic elk I don't think it's needed. I presume something further down will fail without the include
@idle owl i've always said tee-kinter internally. ๐คท
@raven canopy I'll take it. Thanks.
The beginnings of CircuitPython talkin' with FONA modules (cellular on
)
Hey everyone, I don't know if this is the place to put it, but here's my code for the handwashing timer on the circuit playground bluefruit. It uses taps instead of motion detection, however, so just wanted to point that out. I'm posting this because the tutorial of the handwash timer left out a circuitpython example on bluefruit. But Here you go:
"""
Start a 20 second hand washing timer via proximity sensor.
Countdown the seconds with text and beeps.
Display a bitmaps for waiting and washing modes.
"""
import time
import board
import pulseio
from adafruit_circuitplayground import cp
cp.pixels.brightness = 0.2
cp.detect_taps = 1
RED = (255, 0, 0)
YELLOW = (255, 150, 0)
GREEN = (0, 255, 0)
CYAN = (0, 255, 255)
BLUE = (0, 0, 255)
PURPLE = (180, 0, 255)
WHITE = (255, 255, 255)
OFF = (0, 0, 0)
def color_chase(color, wait):
for i in range(10):
cp.pixels[i] = color
time.sleep(wait)
cp.pixels.show()
time.sleep(0.5)
while True:
if cp.tapped:
color_chase(RED, 0.5) # Increase the number to slow down the color chase
color_chase(BLUE, 0.5)
color_chase(PURPLE, 0.5)
color_chase(OFF, 0.5)
(Ping me if this isn't the place, and I'll move the message to wherever)
@stuck elbow et al: I'm adding bootloader download info to circuitpython.org. If you haven't done a PR to one of the bootloader repos for your board, but are instead using one of the bootloaders for another existing board, could you let me know which one, and I'll add it to the data file I'm making.
@tulip sleet PewPew M4 is added to the Microsoft's repo, he ยตGame and PewPew Standalone both use the Trinket M0 bootloader
@stuck elbow pewpew10 and pewpew13 are both trinket?
I'll be merging from microsoft repo pretty soon, so I'll pick that up.
tnx
@indigo wedge where is the feather_m7_1011 schematic? I'm trying to test neopixel with my lower power changes and not having any luck
tried it on A5 and D5. the onboard neopixel doesn't light either
it's a private repo that I shared with Limor, I'll add you, not sure if it should be public now or not, we never discussed it ๐
kk
thanks!
got it. gonna test now with master to see if it's related to my changes
the neopixel on my feather works just fine with my latest fix, but I am using the 2020 version, unsure if it matters
I'm trying an external neopixel too and not getting anything
using neopixel_write
maybe I need to set the pin mode
never tried with an external one tbh ๐
it looks like it should work ๐
internal one is just dim green
nope, not working on master for me either
ok, external one works once I switch the digitalinout to out
PSA: adabot patch imminent. apologies for any inadvertent open PR conflicts caused. 
@slender iron will your microtrace buffer help find the location of return statements?
I'm having trouble determining where the heck a HAL_ERROR is coming from in the ST_HAL, since they tend to just return that value on failures without actually saving any information about the error, and I can't break on returns.
I have an especially wacky case right now where a function is returning an error, but assembly breakpoints inserted before every one of it's return statements never trigger?
@ionic elk interesting! can you push the code somewhere?
I'm failing here: https://github.com/hathach/st_driver/blob/3fc2e0f3db155b33177bb0705e0dd65cadb58412/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.c#L1140
but, if I add I2C_WaitOnSTOPFlagUntilTimeout as a breakpoint, it never triggers!
what the hecking heck
Oh I see, it's an optimizer issue ๐ค
I was able to get my crazy contraption to boot! yay! ๐
@slender iron is it feasible (with hacking) to use an SPI flash device on the QSPI interface? I've made serious progress, but I'm not sure if there's a light at the end of the tunnel
Found the datasheet validation I needed to continue my efforts ๐
FULLY FUNCTIONAL! woot woot! ๐๐
I'll tidy the code up and make a PR in case folks want to use standard SPI devices on the QSPI for flash memory.
Now that I think about it... this would allow an SD card attached to the QSPI bus to work as mountable CP storage as well.
@indigo wedge my status neopixel isn't being driven to zero:
nice work @lime trellis ! sorry I was in the imx sleep weeds
no worries. thanks for the support!
i just did a build with latest head for CLUE and displayio seems to not work, can connect to REPL, but nothing on TFT
@tidal kiln does 5.1.0 work ok?
yep
i checked out 5.1.0 and built and pushed that firmware, just to make sure my build setup still works
that worked
is the backlight on?
my brain is mush
Updated repo to latest (78c1448) and did a build for CLUE. Could connect to REPL but nothing on TFT. Went backwards in commits and found:
b043384works54e8c63does not work
So maybe something with #2730 ?
@slender iron ^^ issue filed
I've been using 5.1.0 on a CLUE btw and I've not had any problems.
How can the display refresh be enabled/disabled from within bitmap?
@traversaro (and everyone else affected) - We've engaged the mirror hosts and they have added capacity to improve it's reliability. I'll keep this open until we can confirm the issue is resolved. Please let us know if this continues to occur. Thank you for the reports.
Maybe the Actions / azure / apt install error will be gone.. if not, I guess we can comment on https://github.com/actions/virtual-environments/issues/675 again
Describe the bug On some jobs (apparently in a non-deterministic way) commands such as apt-get install fail with the following error: Get:1 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu b...
I never expected to see "azure" and "Ubuntu" in the same sentence, wow.
It would be to make the circuitpython filesystem recognizable by android systems. By doing so, it becomes possible to easily edit code with editors on mobile devices.
Wouldn't it be nice?
As far I know, the usb filesystem used by circuitpython is fat12. Is it was in fat16, it could be recognized by android devices.
@caternuson Can you elaborate on "from within bitmap" ?
I have been doing board.DISPLAY.auto_refresh = False to turn it off. I hadn't worked out a satisfactory way to do a one-off refresh or to inhibit auto for a specific task but you can see an attempt at a manual refresh in refresh_screen(). Setting target_frames_per_second to a high value would probably make it a touch quicker, it has a complex spec. I put in #2696 to get a cleaner way of doing this.
The doc build doesn't complete and is likely broken for the inline RST. We can move to 3 when we move the inline docs to Python stubs.
In case we want to make a 5.1.1 release, we'll need this.
Whether FAT12, FAT16, or FAT32 is used depends on the size of the filesystem. A FAT12 filesystem is defined to be < 4087 clusters, a FAT16 filesystem is 4087 to 65526 clusters, and FAT32 is a range above that. The typical 2MB filesystem we supply can therefore only be FAT12, by definition.
One issue has been that FAT12 is not well supported, as you see. On Windows, there's a bug (which is supposedly being fixed) that delays writing to a FAT12 filesystem for tens of seconds. See #111.
I'...
Sure. Sorry for being vague. I was thinking from within the C code in the firmware. For this fill feature, I've got a loop in Bitmap.c to do the fill. Now want to do the equivalent of board.DISPLAY.auto_refresh = False before the loop. And then re-enable after. As @tannewt mentioned above:
A C implemented fill will still be faster since it can both prevent the intermediate refresh and quickly fill the underlying buffer.
So - how to do the first part? Not seeing how one can access th...
I never expected to see "azure" and "Ubuntu" in the same sentence, wow.
@main meteor That does look odd...
@tulip sleet do we have strict standards on excluding gotos?
I need to rework the nested loops in Busio because the H7 layers new peripherals like I2C4 on top of the existing low number ones, which would needlessly require a whole new bus if used.
I can do it by stuffing them into a function that returns, or by using a Goto
no, but there should be a good reason, like using it in a structured way to jump to a common error return point or something. are you trying to do a multi-level break or something like that?
Multi level break yeah
I need to force a nested loop to pick the first item that matches, rather than the last
if it's straightforward, do it; if there's a clearer way we can suggest it in the review
so it doesn't use these wasteful high-number peripherals by default (I2C4, SPI6)
I think the only other way to do it is to refactor the whole nested loop into a function and have it return, which is fine structurally but I feel it reduces readability.
the language doesn't provide labeled breaks or similar, so it makes sense
You can also make the goto labels very descriptive to cover why they are being used and what for.
@slender iron Do I remember there being some way to initialise all the repos inside the bundle? As in, a way to make all the folders inside of it actually have all the git repo files for all the libs.
@idle owl should be git submodule update --init .
Ok thanks
@tulip sleet @ionic elk I have a strict no goto policy. just use a boolean in the loop checks to escape
@tulip sleet @ionic elk I have a strict no goto policy. just use a boolean in the loop checks to escape
@slender iron So do I. There are quite a few ways one can avoid using the "goto." I like to use while loops.
yeah but to be fair for UART it's going to be like 20 lines of code vs like, 4.
doesn't matter if the 20 lines are clearer
but is it really so bad for a multi line break? That's the single case where I've seen people say gotos are acceptable, because it's so easy to see what they do compared to the workarounds.
... but I'll pipe down and avoid the holy war ๐
Java has break labels, C does not, so I agree that it's a solution here. But I'm not setting the policy. But it's also worth considering if it's possible to restructure the whole nested thing to be clearer.
I've thought a bit about these loops, but it's pretty straightforward what's happening. This is the part where it iterates through combinations of pins and sees if they're valid - I don't think there's any other decent way to do that then a simple nested loop.
I've seen some pretty bad goto spaghetti in /extmod, I'm not looking to emulate that. I just feel like goto multibreak; //breaks out of nested loop .... multibreak: isn't such horrible syntax compared to packing it in a function or having a bunch of boolean checks.
It is not a bunch of boolean checks though. In a while loop you have one check at the top and possibly one check inside the loop if you want to exit.
goto is an extra control flow concept that is known to be confusing. Yes, we inherited some from MicroPython. No, I don't think we should add more.
@slender iron I agree! ๐
Add a section on each board download page with links and information about updating the bootloader. There is a corresponding new data file, _data/bootloaders.json. Right now it needs to be updated manually, but should eventually be automated.
The section appears only for atmel-samd and nrf boards right now, but not for STM and other famiies for which there's a built-in bootloader or we don't have a good story yet.
Some third-party boards have not PR'd changes to the https://github...
@caternuson The refresh won't happen while your code is running. It happens in run_background_tasks which only runs between Python byte codes. In C, you have to call it explicitly to run it.
This looks great, however I'm concerned with removing the Gemfile.lock is that it may not compile on Github Pages after that.
This looks great, however I'm concerned with removing the Gemfile.lock is that it may not compile on Github Pages after that. I was able to generate the pages, but I believe it locks things to certain versions.
If I delete the Gemfile.lock file, it is re-created each time I ran bundle exec jekyll serve to check the build locally. So I thought this was just a lock file created by the local test webserver to prevent multiple webservers from running simultaneously, or something like tha...
ok, I put Gemfile.lock back, after reading that stackoverflow link.
The only other question I have is what are the adabot changes you included?
Turns out it was something I missed in #2733. It appeared an issue between b043384 and 54e8c63 because b04 was based on the state of master before #2733 was merged. The commit list is deceiving because git history isn't linear. The changes between b04 and master are only in master with the merge commit 54e.
A way to get around this is to only test merge commits when finding the bad commit.
Fix is in PR #2753
Tested locally. Looks great. Thanks!
I was going to say don't merge this yet, I need to test the bootloader some more. I just got a bug report.
I'm going to revert this for now.
Ok, we can do another one and I'll hold off merging.
@makermelissa please approve this right now while I investigate a bootloader bug report which could be a big issue
@slender iron or @idle owl please approve https://github.com/adafruit/circuitpython-org/pull/447 so I can roll back the bootloader: seeing big problems on Windows on M0. thanks
@tulip sleet Melissa got it.
thanks
These additions/changes allow single-SPI (as opposed to dual or quad SPI) storage devices to act as external flash memory on the QSPI bus. Also adds a pycubed_mram board.
- My specific use-case was for NVMRAM (Everspin MR25H40), but this should also enable things like an SD card to serve as external flash storage (and natively mount as a mass storage device).
- These changes preserve original NOR flash functionality, but enable devices that don't have JEDEC responses or specific page/sec...
Hi Guys,
I finally managed to get a 16MB (largest possible for SAMD51) flash device working on a Feather M4 Express-based board. I used this:
`#define GD25Q127C {
.total_size = (1 << 24), /* 16 MiB /
.start_up_time_us = 5000,
.manufacturer_id = 0xc8,
.memory_type = 0x40,
.capacity = 0x18,
.max_clock_speed_mhz = 104, / if we need 120 then we can turn on high performance mode */
.quad_enable_bit_mask = 0x02,
.has_sector_protection = f...
@slender iron I'd say you have to take goto on a case by case basis. Based on practical experience in C, I've noted it creates phenomenal complexity if you jump back up a few hundred lines. The flip side is you can use it to jump to some housekeeping/logging then return in a short function and it's verging on elegant.
Example of latter in https://github.com/krb5/krb5/blob/master/src/kdc/kdc_audit.c#L70-L130
@tannewt this ended up failing every other STM32F411 board with an internal filesystem due to a bad ifdef in internal flash :C let's make sure we let the CI complete next time we add a build flag like this.
Ok, @tannewt @dhalbert @jepler this is ready for another full review. Changes include:
- Addition of the F767 Nucleo and general F7 support
- An overhaul of the linker and startup file system to support TCM and reduce clutter. Optional startup code for TCM is in port.c, like the i.mx, but most boards still use the weakly declared startup versions.
- Busio is now enabled for the F7 and H7, with some edits to support new peripheral scope.
- Various requested style changes implemented...
I started pulling on this thread a little, and came across this commit: https://github.com/sphinx-doc/sphinx/commit/23604730128e9b802b1e7344839d58a30384695d.
Seems like a direct cause of our Sphinx 3 issues. A little heavy-handed imo, and I'm surprised that there isn't a new issue opened up about it blocking other projects. However, I'm not sure if there was a better way for them to avoid this, even when a specific parser is supplied.
I'll spend some time looking through our docs to det...
@hierophect The CI has been passing after this was merged in: https://github.com/adafruit/circuitpython/runs/534277499 for commit 59eb35da30c0141ce0b2eb5b9718d2a655f988ba
I'm not sure why you are saying it's broken.
I did try to drop the .h files from the source suffix. It got past the error but hit other stuff that wasn't obvious how to fix. Specifically some of the code blocks in some markdown files were causing errors.
@tannewt I'm confused, that's for the Commander? This one had an issue where #ifdef CIRCUITPY_NVM in the internal_flash.c file would always trigger because CIRCUITPY_NVM was always set. It caused other boards that didn't have NVM to lack a definition for INTERNAL_FLASH_FILESYSTEM_START_ADDR.
@tannewt ah nevermind my mistake. It was caused by a merge issue since I needed to factor the filesystem start into each chip definition. The merge didn't duplicate the line for the #ifdef. My bad, I assumed that was causing the test failure.
That said, it does say it failed the tests - but I guess that's just a git actions thing?
@sommersoft Is C and C++ a very limited part of sphinx userbase? I've seen people use doxygen before and MSFT world must do something similar.
Ya, GitHub Actions has been really flaky and I don't want to hold people up due to something we can't control.
This is functional at least. I basically just stole from the pixel set code and loopified it.
Test program:
import time
import board
import displayio
WIDTH = board.DISPLAY.width
HEIGHT = board.DISPLAY.height
COLORS = (0xFF0000, 0x00FF00, 0x0000FF)
bitmap = displayio.Bitmap(WIDTH, HEIGHT, len(COLORS))
palette = displayio.Palette(len(COLORS))
for i, color in enumerate(COLORS):
palette[i] = color
tile_grid = displayio.TileGrid(bitmap, pixel_shader=palet...
@tannewt OK thanks, sounds easy then. Nothing really to do at the C level to prevent the refresh.
PR'd a something: #2756
From https://github.com/adafruit/circuitpython/pull/2749#issue-400441027:
We can move to 3 when we move the inline docs to Python stubs.
If you want to move now, this builds the docs for me. I didn't notice any disparity with the results from my local builds.
Looks like uint32_t bytes_per_value = self->bits_per_value / 8; is constant and can be placed outside the for loop to avoid repetition?
@pastel panther It looks like LSM303 is still in the bundle, but the repo was archived in October. Is that intentional or did it slip?
@idle owl probably a slip but I'll double check
Thanks!
yup, it's a mistake. I can put in a PR later today
Thank you.
Are .x2 and .y2 exclusive values for the dirty region? I.e. if a 4x4 bitmap is being cleared should they be set to 3 or 4? The current proposed code sets them to 4.
One request. Thanks for doing this! Happy to upgrade before the inline stubs.
Let's not unpin it completely. Just change it to <4
This isn't a CircuitPython issue. Adafruit_QSPI is deprecated in favor of Adafruit_SPIFlash (https://github.com/adafruit/Adafruit_QSPI). So, please try in the new library and file an issue on Adafruit_SPIFlash if it doesn't work there.
@kevinjwalters Note, we don't actually use Sphinx for C. The .c suffix is there so the inline RST for the python interface can be stripped out.
any objections to me releasing master as 5.1.1? the destabilizing stuff hasn't landed yet
Beta?
For fill, I thought I did move bytes_per_value outside the loop?
Good question about .x2 and .y2. I based these on what is done in the constructor. The low ends are set to 0, so maybe these should be -1ed?
@slender iron nothing from me, everything STM-wise is pretty stable up to the F7 H7 stuff
@idle owl no beta yet
@slender iron Then I'm confused as to what you're asking to release.
master has some fixes in it including one we need for ble midi
So you want to release a new stable?
yes
Fair enough.
ยฏ_(ใ)_/ยฏ
Do it today if you're going to do it.
So we at least have tomorrow to field issues.
ya, will do it later after I solder stuff
Apologies, I didn't check second diff as I thought it was just doc changes.
@tidal kiln Stumbling upon your commit messages always makes my day a little brighter. Thank you.
@tulip sleet anything I need to do on that UF2 issue or is it just a website thing?
@ionic elk which issue?
No worries. First commit was "copy, paste, does it work?". Second commit had some minor refactoring.
i'm only fixing the samd21 and samd51 bootloaders. Is there an STM32 bootloader we're using?
@tulip sleet it's a little old I just noticed it: https://github.com/adafruit/circuitpython/issues/2702 something about the website not having the uf2 output for the Meowbit
STM-based meowbit_v121 has a uf2 bootloader. Build and upload a .uf2 for the board, not a `.bin. Thanks pcoxall aka @Mr-Coxall from https://forums.adafruit.com/viewtopic.php?f=60&t=163432.
Awesome, I added it in there and now it works. I didn't realize I wasn't
using the QSPI library. Somebody might officially add this chip to
circuitpython and SPI_Flash, as the other ones this large in size did
not work for me at all. It's the largest you can use with a SAMD51:
#define GD25Q127C {
.total_size = (1 << 24), /* 16 MiB */
.start_up_time_us = 5000,
.manufacturer_id = 0xc8,
.memory_type = 0x40,
.capacity = 0x18,
.max_clock_speed_mhz = 104...
@Casey10110 I am maintainer of the Arduino SPIFlash lib, if you could submit an PR to add flash device this to the list. I will be happy to merge it there.
Normally in Python lower-bounds are inclusive and upper-bounds are exclusive, so the slice [1:4] is the elements 1, 2, and 3. I hope that the same is chosen for x2/y2 in this PR.
Automated website update for release 5.2.0 by Blinka.
New boards:
- bdmicro_vina_m0
- 8086_commander
- winterbloom_big_honking_button
- thunderpack
- fomu
Here is the notes document for Mondayโs CircuitPython Weekly meeting. 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/1brXruQuOrHT1cdZ6Do-4O9wlcwYZDUV8MIQPYe_1gdo/edit
Hi Circuit Python Team
In Electronic Cats have new product cybersecurity tools
Thanks
@slender iron very minor typo in the release notes: MIDI baudrate is 31250, not 32150.
@tulip sleet fixed
@idle owl Thanks for posting the notes doc, I've been unable to attend due to a lecture at that time. Added to it!
@prime flower Thanks for adding notes!
ok, 5.2.0 is out
yay!
Nice
@slender iron do you have a readme of some sort for nrf low power usage?
or example using pulsein?
the low power stuff doesn't wake on input yet
I had enough trouble just getting sleep going on all the platforms
ya, I had to change how it kept time since the RTC is lower resolution
Theoretical question, do you suppose display initialization will stay intact after recoving from sleep?
Congrats!
the current lower_power code should at least make it possible to add the wake on interrupt and other things
changing the time keeping was the hardest part
though waking up is tricky too
@ladyada any interest in seeing me pursue this in the near term? If not I'll go ahead and close it up without merging. It's not going to be relevant to protomatter or other framebuffer displays.
See my notes about port_interrupt_after_ticks in particular, most of the rest is just me musing to myself. no HW testing performed.
not saying this is bad, but is it in any way needed by this PR otherwise?
frankly this is horrifying. but necessary. This "RTC" will never actually store real time, but will just count from some power-on value up forever, and be corrected to real time in the shared code.
so the idea is, enable SysTick while doing this busy-wait. No need to sleep because microsecond-scale delays are too short to derive benefit(?). Limited to delays which fit in uint32_t counts of SysTick, which is 10s at 400MHz (I don't know actual stm32 clock frequency offhand, trying to overestimate). Should be fine, but maybe for sleeps >1ms it should hand off the "big" portion of the sleep to common_hal_time_delay_ms or something?
i think... its not that necessary since you can make a paletted bitmap and just write to that. can close for now :)
I tried this with a 1 MHz signal and it also returned zero for me.
This approach is fine with me.
Do you want to speed it up further? You could pack the value into one uint32_t at the start and then fill the memory. That would reduce the number of memory operations.
@tannewt That's funny, I was just went for a stroll and thought of the same thing for the special but common easy case of 0.
I've not looked at exactly how the packing works, will 32bit chunks work for all cases? For 8 values represented by 3bits does it spill between two 32bit chunks?
Thanks for adding. Data file looks good, but images are a tad large. For instance, your small image is 3286x3286. You can find more details about the correct sizing here: https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website/preparing-the-images
@tannewt Sure, might as well make it as fast as possible while we're here. Guess I have the same general question as @kevinjwalters.
Is there any work afoot to put CircuitPython on non-Adafruit Arcade devices?
Getting better and better! Linker clean up looks good! Will try this out by the weekend.
Want to delete this instead?
if (self->scl != NULL) {
No need for an extra bool
I'll be sending a PR shortly, waiting on better pictures. :)
On Thu, Apr 9, 2020 at 4:27 PM Melissa LeBlanc-Williams <
notifications@github.com> wrote:
The following boards are showing as unknown. I should be able to find some
info about at least a couple of these. @theacodes
https://github.com/theacodes, do you want to submit a PR for
winterbloom_big_honking_button? We have a guide available at
https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website
...
and i've got about 50 more to do
Bring it on
@idle owl I did all the remaing Black reformatting PR's except for a few where I made some stylistic edits, so someone else should review my edits. Then there is one with a question about removing unnecessary pass statements, which have pylint ignores, but we could also just remove the pass statements, and get rid of the pylint exceptions.
@tannewt yes I need both the Nucleo H743 and the F767
whoops missed during cleanup
copied this line from nrf, figured it was policy. Not sure why it's there, will think about whether I'm missing something.
There are actually two versions of this board with different pinouts, irritatingly enough. The first has an older break-off STLink V2 and the second can't be split and has an Stlink V3. There's a number of differences besides. Micropython kinda-sorta supports the second one? But they've got a lot of mistakes either way in their implementation, it doesn't fully fit either board.
I don't have a V1 on hand, it'd be identical in layout to the F767 though.
does anyone know how to check datetime.datetime.now()'s time zone?
tz_info
but, it's probably None.
your best bet it figure out what timezone datetime.now() is actually based in is to use dateutil.tz.localtz
Cloudflare is your best best here, I'm happy to help set it up if needed!
Just confirmed that all board have working download links, closing this issue.
Note: some boards do link to an empty s3 folder for their "browse s3" button, but these seem to not have been built at all yet and don't have any other download links.
@floral nacelle circuitpython's time implementation isn't sophisticated enough to know about time zones. I suspect that most people set their devices to "local time", if they set them at all.
We've started the process to transfer to cloudflare. Thanks for all the help everyone! We should be able to configure this once the transfer is complete.
@tulip sleet Thanks! I merged all of the ones with minor changes. Looking at the ones involving pass now. I didn't add the disables, all of that was already there.
Wondering if I should ping Bryan to find out why he did it in the first place before removing them to see if the docs build.
yah, what I'm suggesting is to remove the pass and the disables. Bryan would know. I kind of like the pass to make it clear it's an empty class, but I don't like the disables: I'd rather just drop the pass if it's considered passรฉ (oy)
@tulip sleet I understand and agree. I simply wanted to make sure there wasn't another reason he did it.
yeah, that's why I didn't change it right away
@pastel panther For LSM6DS, you have a lot of pass #pylint: disable=unnecessary-pass in empty classes. It this strictly necessary or a stylistic choice?
what?
It says you did the initial commit, I assumed you wrote it. Am I incorrect?
I wrote it, but I still don't understand what the question is.
@tulip sleet Maybe you can explain it better.
Just saw the above context
@pastel panther We want to remove the pass # pylint: disable=unnecessary-pass if possible.
So I wanted to understand the reasoning before simply removing them.
If the pass doesn't need to be there you can remove them
Ok I'll try it and see what happens. Thanks.
I'm not really a fan of that empty class in the first place, so if we can come up with something better I'm all for it
This has been completed.
www.circuitpython.org will now 301 redirect to circuitpython.org.
Sphinx update was released and resolved our doc building issue! ๐
I will be requesting reviews from CPLibians on 8 more PRs.
Looked again: it was released 15 minutes ago. Good timing on my part checking ๐
No more open PRs! Thanks @tulip sleet @slender iron @onyx hinge for the reviews and merges!
phew now I can retire
๐ hold on, let me make 200 more just to keep you around!
I only did about 10, it looked liked danh was really putting 'em away
i was tired last night and reviewing trivial PR's was all I could handle; I have muscle memory now for all the clicks
That's how it was for creating them ๐
my vision was blurry by the end of the day.
Strung my first command line commands together using && though.
I've copied and pasted others' commands before, but never did my own.
watch out, you'll become (viewed as) an expert if you're not careful
ah bugger. I HAVE NO IDEA WHAT I'M DOING.
(Maybe they'll remember me saying that instead)
there was one black reformatting that was something like:
x = foo(abc, def, ghi, jkl, mno, pqr, stu)[
0
]
I thought maybe I should submit it to the black maintainers, but I forgot which one it was
I'll admit to it taking me a minute to figure out that you simply used the alphabet and those letter groupings didn't have some special meaning.
the def threw me off ๐
oh sorry, i meant stv, not stu
ngl, i've written a couple lines like that. its not easy to read...
anybody have an itsy bitsy m4 handy? if so can you run this code and paste me the output? https://gist.github.com/jepler/43acbaf0810e0b2a0464e47c9ec3465b
rummages through the box a third time for one of these boards
i have some
it is right on my desk
Adafruit CircuitPython 5.2.0 on 2020-04-09; Adafruit ItsyBitsy M4 Express with samd51g19
>>> import protomatter_pinout_guesser
Protomatter pinouts for port width 8:
7: MOSI SCK A0 A4 A1 A5 D2
8: D0(RX) D1(TX) D7 D9 D10 D11 D13 D12
Protomatter pinouts for port width 16:
11: MOSI SCK A0 A4 A1 A5 D2 SDA SCL D4 D5
8: D0(RX) D1(TX) D7 D9 D10 D11 D13 D12
Protomatter pinouts for port width 32:
19: MOSI SCK A0 A4 A1 A5 D2 SDA SCL D4 D5 D0(RX) D1(TX) D7 D9 D10 D11 D13 D12
thank you!
The only one I can "find" is the one in my keyboard, makes it hard to run code on it
I need to finish inventory of what's here. and publish the code :-)
in your keyboard ?
@idle owl it looks like you need either pass or a doc string so it is superfluous but probably wasn't before docs were added
Fair enough. Thanks.
What's probably the best channel on this Discord for C questions that aren't Circuitpython related?
@prime flower You have a minute?
@ionic elk I think #help-with-projects or #general-tech are probably the closest fitting channels
Maybe #help-with-arduino too as that's C/C++ but clearly specialised.
@ruby atlas my keyboard runs circuitpython ๐
I gathered that. Did you build a full keyboard, or modify an existing?
Modded ASR-33?
@ruby atlas https://www.thingiverse.com/thing:4129809
@simple pulsar that would be neat
oh ASR-33 is older than I thought. I was thinking of ADM-31.
@onyx hinge that is a really cool keyboard. must have taken a long time to assemble?
Yes, it's quite labor intensive.
I was surprised that there were relatively few wiring faults, because it's quite easy to be inattentive since it's fairly repetitive
I never did connect the neopixels or install all 4 strips it was designed to contain.
That is a thing of beauty! I'm really impressed.
for example https://blog.b-ark.ca/archives/category/keyboards/ https://blog.b-ark.ca/assets/images/Handwired_Alpha_-_Matrix_Complete.jpg
I see.
So should it be kept opened? As a reminder? Or not.
@idle owl I'm around.
bits_per_value is always a power of 2 (so 1, 2 or 4 bits). Inherent in the computation here: https://github.com/adafruit/circuitpython/blob/master/shared-bindings/displayio/Bitmap.c#L66
You may accidentally set values past the end of the row but that is fine because the stride (aka how long a row is) is rounded up to the nearest word boundary.
Hello,
This new board embeds a atsamd51 so it could be possible to support it easily.
It also has a realtek 8720dn as a wireless coprocessor (not sure). maybe a library coded in python could enable wireless com.
What do you think about it?
I ordered one and will be happy to act at least as a tester.
@prime flower Hey! So I'm wondering a couple of things. Is there a good true "simpletest" for AdafruitIO that can go in the main examples folder, and can we rename these folders to include adafruitio_ in the name? How badly does that mess up guides? We're going to be updating the check to force inclusion of the libname in folders since the examples bundle has a lot of folders in it that are unclear. https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO/tree/master/examples
@idle owl Addressing each point.. 1) MQTT simpletest (https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO/blob/master/examples/mqtt/adafruit_io_simpletest.py) is a good simpletest which can move into the examples root.
Excellent.
@idle owl 2) the only guide I know of with AIO and CircuitPython is (https://learn.adafruit.com/adafruit-io-basics-airlift/circuitpython). It would need to be updated for this example and the inclusion of MiniMQTT
Right on. I'll take care of it. @prime flower Do you mind if I tag you on the PR for a review?
@idle owl tag away ๐
๐ looking
@prime flower Thanks. Merged and guide updated.
@gilded cradle I have a sort-of-Blinka question. It's more an opinion question.
ok
Does https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation make sense to put on PyPI?
As in does it make sense for use with Blinka on SBCs etc
Does it require PyPixelBuf?
No
Then yeah. It might be kind of cool.
yw
thanks for making the prs @idle owl
anyone have opinions about meson or cmake as alternatives to make? esp-idf 4+ uses cmake and it'd be nice to integrate with it
@slender iron You're welcome
- Update
atmel-samdlatest bootloader to v3.9.0. Bootloader updaters have been tested on Metro M0, Metro M4, and CPX. - Add bootloader info for new boards
8086_commanderanduartlogger2.
@prime flower https://forums.adafruit.com/viewtopic.php?f=60&t=164342
@slender iron thanks for tagging, responding in a few.
Looks good to me! Thanks!
yes! please ask seeed to submit a PR! :)
Something like this? Tested this and seems to work.
// build the packed word
uint32_t word = 0;
for (uint8_t i=0; i<32 / self->bits_per_value; i++) {
word |= (value & self->bitmask) << (32 - ((i+1)*self->bits_per_value));
}
// copy it in
for (uint32_t i=0; i<self->stride * self->height; i++) {
self->data[i] = word;
}
@slender iron the only opinion I have about alternatives to make: whichever you choose, please still have a makefile that calls them, at least with 'all' and 'install' targets.
@stuck elbow ya, I'd like make BOARD=foo to work still
at least until folks learn the new way
Looks good to me! Will let you merge to ensure it's ready.
Would I need to use bootloader-feather_m0-v3.9.0.bin booloader file for the Feather M0 RFM69HCW Packet Radio - 433MHz - RadioFruit ?
or perhaps bootloader-radiofruit_m0-v3.9.0.bin ?
@tannewt
I would love to test your low power version. Is it possible to test it on a Trinket M0 ?
Any precautions?
How to Build, how to deploy?
Cheers,
Volker
STM Nucleo H743ZI2 VID 0x239A PID 0x0097 # bootloader
PID 0x8097 # arduino
PID 0x8098 # circuitpython
STM Nucleo F767ZI VID 0x239A PID 0x0099 # bootloader
PID 0x8099 # arduino
PID 0x809A # circuitpython
@lone axle use feather_m0; radiofruit is something else (SAMR21), a board which we haven't producted
Thank you
@lone axle do you already have a UF2 bootloader on the board? If so and it works there is no strong reason to update that particular board. There are good reasons to update SAMD51 boards
@tulip sleet I think that I killed the bootloader when I was attempting to use BOSSA to flash circuitpython
I failed to set the offset value properly when I did this device so it flashed with the new default (0x000) and now the board seems to just bootloop
I can double press reset and see the red LED start to pulse but just a second later it goes back to the blinky (bootloop?) pattern.
you may have just erased the fuses. it is important to set those too. Did you get a j-link?
I did
or do you have an Atmel ICE?
ok, great, I can walk you through resetting the fuses if you wire up the right jumpers.
Ok, thank you. Do I need the wires soldered to the pads on the bottom?
yes. Or if you have a small piece of header you can tack that on. Let me find a picture.
header tacked to SWD pads
this is slightly tricker, but it's less fragile. You need some female jumper wires to connect to the pins
put solder on one pad, hold in place with pliers, tack, then add solder to the other pins
Neat, okay I've got to get those soldered be back in a moment.
The feather seems to only have 2 pads on the underside
yes, that's just for SWDIO and SWCLK. The other connections you can get off the breadboard (VCC, GND, and sometimes RST)
Need to solder pins on the SWD breakout also one more moment.
Ya! It should work ok on the Trinket M0. Each PR commit has artifacts automatically built. The latest for the lower_power branch are here: https://github.com/adafruit/circuitpython/runs/575104579 Click the artifacts link in the top right and select Trinket_m0. It'll be a zip of all uf2s for the trinket.
@lone axle when you are ready I've found a simple way using just the JLink-supplied software (don't need Atmel Studio, ec.)
@tulip sleet Okay I've got everything soldered. I was just looking at installing Atmel studio and running into an issue with it so that is perfect actually
are you on windows, mac, or linux?
Windows7
did you install the JLink software already?
I did install this: JLink_Windows_V670c
great, I want you to run Jlink.exe, wherever it is, from a CMD window
i know where it is on Linux but not windows
you should see a J-Link> prompt when you run it
ok, so exit, and connect everything up. Connect the J-Link via USB, plug the multiwire cable into the J-Link and the header, and wire SWDIO on the board to SWIO on the header, and SWCLK to CLK, vref to 3.3V pin, GND to a GND pin, and RST to RST
Running same command with everything connected I get this:
say Yes
seemed to complete successfully and I have that prompt in my terminal now:
type connect
device is ATMSAD21G18 ATSAMD21G18
then do S for SWD, and choose default clock rate
do I need to type in the default (it shows 4000) or just press enter with empty prompt?
oops,sorry typo ATSAMD21G18
Alright seems like it worked so far:
excellent, now type:
J-Link>mem32 0x804000,2 to see the fuses
just to confirm J-Link> is the prompt, I start my command at mem32... right?
Could not read memory.
make sure you have the right number of zeros
Cortex-M0 identified.
J-Link>mem32 0x804000,2
00804000 = D8E0C7FA FFFFFC5D
J-Link>
is there a usb cable attached to the feather/
you need to power it
There is. It's connected to wall power adapter. Should that be plugged into the same PC as the JLink?
doesn't need to be, but wouldn't hurt
there'd be a common ground that way
type halt at the prompt and see what you get
Same results with feather plugged into same USB hub as the JLink. I will double check all of my connections
type st
Ah, I missed the RST pin
same results with RST connected from the Feather to breakout.
exit and restart JLink
i'm googling this, another suggestion is to do rx 0 at the prompt
Exited and restarted, made it through the steps back to mem32 0x804000,2 but still same results.
does st still show TRST=?
Got bluescreen'd while I was looking down at the wiring. Not sure if it was related. Getting back into that prompt now.
this is plain windows, right, not a VM?
Correct
I'm researching the "can't halt" problem
i'm not sure exactly what that means but it might mean it's still not connected to the reset pin
I can grab the multimeter and check
great, please follow up with them later :)
I've got continuity on VREF <-> 3V, GND, and RST
checking the bottom ones now, gotta get it up out of the breadboard
if you put those header pins on the bottom pads it might not be making great contact into the breadboard; wires would be ok
I ended up using wires, The feather pins made it seem pretty tight to try to get a female jumper in there onto the pins.
It seems that I do have continuity on CLK and SWDIO as well
i think swclk and swdio are fine because it recognizes all kinds of things about the chip. It just can't reset it for some reason. It MIGHT be because it's in a reset loop, but it should be able to grab the chip forcibly using the reset line.
One of the GND's on the breakout seems labled slightly differently GNDd I'm not using that one, should I be? I'm using the GND pin right next to VREF
after running st the blinking loop on the red LED stopped.
IT did something different for sure:
MUCH better. I wonder what is different now
alright let's go back to mem32 0x804000,2
ok, so the fuses are all smashed, but I just added fuse repair to the 3.9.0 bootloader. Did you download .bin for feather_m0?
i think you just had a bad connection above, or you needed to power cycle the whole mess
I didn't download it yet, let me grab that now
Got it downloaded
then do loadfile bootloader-feather_m0-v3.9.0.bin 0
normally we might have to disable the bootloader protection, but the fuses are already set to do that
obviously you have to give the right path to the file so it can find it
after you do that you can do verifybin bootloader-feather_m0-v3.9.0.bin 0 to check that it got written
Verify Successful !
woot! OK, pull the J-Link cable from the header, and power cycle the board, and double-click and see if you get a bootloader pulsing LED and FEATHERBOOT showing. You can't reset with the cable connected to the board
actually don't do that yet
my fuse fixer won't work because the first fuse word is not all 1's
so we need to fix the fuses by hand
since the fuses aren't fixed you'll still get a reset loop
so put it all back together and get back to J-LInk>
do
w4 0x804000, 0xD8E0C7FA
w4 0x804004, 0xFFFFFC5D
that writes the correct fuse values to the fuse memory locations
Okay I haven't unplugged anything but I did blue screen again ๐ possibly power related still not certain though. Will attempt these now
ohmygoodness,sorry, I don't know why it would have anything to do with this
you can do the mem32 again to verify the fuse values were written
mem32 0x804000,2 should show the rewritten fuse values
It may be unrelated. Does happen from time to time on this laptop. But not typically over and over. I've got way less stuff running this time though ๐ค
i have no idea why it's mem32 but w4. this is not exactly the greatest command interface
Looks like those fuse values are in there now.
so now if you pull the j-link cable and double-click the board you should get a good bootloader
The red LED is no longer blinking at all after unplug and reset.
double clicking reset is blinking the yellow LED left of the USB, but no response from the red LED
Correct, Feather M0 RFM69
ok, I will try to replicate this, back in a bit
Thank you
@lone axle I have the 3.9.0 bootloader running on my Feather M0 RFM, but I put it on with the updater. Now I'll try to replicate what we did.
The fuses seem to have gotten set back somehow:
ok, I think there's a bad user program that's overwriting the flash. so to fix this...
(I plugged everything back in and re-ran the verifybin and checked the fuses again)
connect up the jlink again, and let's write zeros to disable the user program
w4 0x2000,0
w4 0x2004,0
then redo the fuses as before
then disconnect and double-click
doesn't matter
same thing as before. Yellow left LED blinks when I press reset but no response from red LED on double click
Okay, I'm reconnected and back to JLink>
At first I was getting Couldn't read memory again checking the fuses (not sure if it's just a fluke or not). I unplugged everything and went back to feather powered from wall (which is how it was a moment ago when I wrote everything). Now I am back to the prompt again and checking the fuses they are back to FFFFF8FF FFFFFFFF
can you do mem32 0x2000,2
J-Link>mem32 0x2000,2
00002000 = 20007FF8 00024DF5
