#circuitpython-dev
1 messages ยท Page 292 of 1
@fallen anvil it's ok, don't worry about it. Those exact ones are based on mine design and will most likely become a Adafruit product. I also have 2 more Feathers that I'm planning to produce and sell on Tindie. You can see them here https://circuitpython.org/downloads?q=Feather+MIMX
is when it was changed, in December. What I would say is that there are often PR's that go across the whole codebase, and you just have to read them to be aware. The ports are not isolated, but are embedded in a changing world
Yeah it's especially tricky in cases like that because that's not even an STM32 issue - if I were skimming it, I'd look like a core issue to me.
Totally get you on the not isolated front, which is why I'm just wondering if there's some kind of tool I can dig up to help me out. Something that spots commits within a directory range that aren't mine... if it isn't there, maybe I'll make one.
in this case, there was a change in the STM32 tick.c, so you want to look in your tree of interest
Right, exactly
What I need to find/make is a tool that highlights commits that change any file in my tree of interest that aren't submitted by me
So I can be sure to check them out. ๐ค
i would google for some tool for that kind of thing, I'm sure you're not the first person with this issue
Just a wrapper around git status -s might be sufficient
@indigo wedge then when you get to it would be appreciated. Ive just bodged a esp32 board onto mine but it would be much nicer to have something that will be reliable without all the Dupont flywires.
yes i'm gonna try to run the esp32spi code on mine for the first time now
had some problems with the uart couldn't flash the esp
so bypassed the imx for now and flashed with external uart, will fix it later, want to verify that the spi works ๐
Seems like this is related but hecka old: https://stackoverflow.com/questions/9732779/how-to-watch-only-a-directory-in-a-github-repository
Stack Overflow
For example, https://github.com/vanillaforums/Garden is the GitHub repository. But I only want to 'watch' this directory https://github.com/vanillaforums/Garden/tree/master/plugins in the repositor...
@indigo wedge it does now ๐ tbh I don't think there many changes on 1011, they mostly applied to 1020 (indeed, there are similar i2c ones for 1020 to be submitted shortly). I have the NINA demo running perfectly here.....it's very impressive.
(it all becomes a blur after a while)
You're running on 1021, right?
I want to eventually be helpful and contribute to CircuitPython, but my immediate project will likely drop down to C on SAMD/E. I can use the Microchip tools and libraries, but if something else will make it easier to move into doing CircuitPython things, I want to consider that. Advice on C tools for SAMD/E boards?
@bright aspen tinyUSB
oh no ๐ข
Adafruit CircuitPython 5.0.0-rc.0 on 2020-02-26; Feather MIMXRT1011 with IMXRT1011DAE5A
>>> from adafruit_esp32spi import adafruit_esp32spi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
MemoryError: memory allocation failed, allocating 1024 bytes
>>>
Oh dear.
I have pretty much the same setup on 1021 here so if you want any measurements doing let me know...don't know the platform well enough to do them proactively, sorry!
I'm also a bit unfamiliar with the CPY memory management, unsure if this is on the heap or on the stack, ofc it's dynamic allocation so it should be heap unsure ๐
@slender iron with only 128KB ram total on the rt1011 are we sure we want to keep the current memory map? because this way we can only have max 30K of stack and ~50K of heap
@slender iron if we configured the flexram to be one bank of 120KB we would lose the speed improvements but gain more flexibility of dividing the RAM as we wish
I really need to get a BMP280 breakout board. Many of the Adafruit examples use it and I like to use the exact stuff used in tutorials.
@slender iron right now only 7K of ITCM is used so we just have 25K of RAM sitting there unused
I'm not convinced itcm is worth too much given that you've got cache...seems a reasonable compromise to me to lose it.
Give it a whiz...it's only a linker file change.
also flexram register value change and MPU bank change ๐
Didn't realise the mpu was in use....that's good to hear.
@indigo wedge @fallen anvil my goal is to be fast but not necessarily support large programs. the speed is what differentiates the imx chips
large programs will come with the larger chips
but is trying to run the esp32spi considered large?
what good is speed if you can't run a basic script ๐
yes, that's why we only recommend using the m4
it's not basic if it imports huge libraries
I honestly don't think you'll lose much speed without the itcm though....and a negative program size isn't too usefu :-/
or any reasonable display cause not enough ram for the FB
go ahead and do other testing
it's all alpha
remember that the cost to get anything from the spi flash is significant
the cache should only be used to store stuff we don't know up front that we're using
Yes, but once it's cached it's single cycle.
guess this would make my 1011 feather unviable as a product :<
tcm is also single cycle
I don't think that is true
it's about speed, not size
it can never match the 192k of a samd51 anyway
but the main selling point is the esp on my feather, if i have to remove that then it's the same as the Adafruit one
The 1011 has always been about the cheap option. Can you post your map file?
i moved the bss from ocram to dtcm and now i heave more heap but still not enough
esp32spi is large and gets even larger once you make requests
too bad the rt1021 is physically too large to fit on a feather ๐
Could try flattening everything into ocram and see what the use map looks like
There's a 100 pin version....still too big?
yeah 14x14 mm
ocram is 1/4th the speed of TCM but still better than hitting spi flash
Yeah, it was more an investigative step to figure out where everything is being allocated.
ouch 1021 is over 2x the price of 1011 and you gain pretty much just the 2x ram
- 20 pins
@indigo wedge for your board I'd recommend looking into freezing in esp32spi. then you can either rely on the cache or place it in dtcm
worth a try
@slender iron that's a simple solution, thanks! I'll just add that to what I check every morning
what's the memory gain from freezing?
totally ok to do since you assume people will need it for your feather
heh so we gain the mhz but then waste them on this
crazy
ya, that's the challenge
ideally when running a simple python script you don't have to read flash at all
which is why the vm loop is in itcm
They whacked the data cache down to 8K on the 1010 :-( DTCM is definately your friend!
Trying to find the cache access timing information...I used to know this stuff. IIRC its single cycle execution if the instruction/data are in cache, access cycles+1 if not....but I could easily be wrong.
@stuck elbow Thanks for the tip for the tinyUSB device stack. The description mentions its use in CircuitPython. It also mentions GCC and Segger Embedded Studio. Do you recommend those?
we don't use Segger Embedded Studio, just gcc and gdb (on Linux or Mac)
woop, that worked ๐ @slender iron
Hey, congrats!
Can you hook a debugger to that board? Are SWD/SWCLK and, importantly, SWO, available? If so we can look at the performance and see what it's spending its time actually doing...
great @indigo wedge !
Hm..its the SWO we need. Any chance of being able to get to it? Seems to be on GPIO_AD_09 or GPIO_AD_01 on your board...
Releasing now even though a number of the builds are failing randomly. I'm on my third re-run of the release github action. I think most artifacts have been uploaded due to the random distribution of the failures.
@slender iron For the discussion about running a simple python script and not reading flash, wouldn't things like strings be stored in flash and therefore read from there?
strings in code? or where?
wouldn't print('hello') caused a read of hello from flash?
no because string 'hello' is loaded into the heap when the code is parsed
So there's no PROGMEM type ability for constants/immutables to be left in flash to reduce memory usage?
nope
Did that ever get discussed for micropython?
not that I know of
you can always put a separate file on the disk and load it from circuitpython
Is it trickier to implement leaving variables in flash in CircuitPython because a user can delete the code.py/etc ?
Just to give you some idea, here's where the code is spending it's time right now, while idle;
68.88% 57222 tud_ready
15.03% 12487 run_code_py
3.73% 3105 tud_cdc_n_connected
2.43% 2020 tud_suspended
2.42% 2012 tud_mounted
1.27% 1056 dcd_isr
1.04% 871 dcd_event_handler
0.97% 809 Unknown
0.75% 626 USB_OTG1_IRQHandler
0.47% 391 SCB_CleanInvalidateDCache_by_Addr
0.37% 315 tu_bit_test
0.23% 198 $t
0.21% 182 serial_connected
0.18% 152 supervisor_tick
0.16% 135 tud_cdc_n_write_flush
0.15% 127 common_hal_mcu_enable_interrupts
0.14% 118 __DMB
0.13% 115 assert_heap_ok
0.11% 96 common_hal_mcu_disable_interrupts
0.11% 93 tud_cdc_connected
0.10% 87 displayio_background
-----------------
98.88% 82217 of 83067 Samples
Ex | Count | MaxD | TotalTicks | AveTicks | minTicks | maxTicks
----+----------+-------+-------------+------------+------------+------------
15 | 1021 | 1 | 2288874 | 2241 | 1990 | 3462
129 | 8166 | 1 | 13268867 | 1624 | 1090 | 2177
More on this tomorrow, I'm off to bed.
@joeycastillo Ah ha! Thanks for trying that!
@mesa177 I think it is fine to just tell folks to use Terminal instead of iTerm2. The CircuitPython serial looks correct in Terminal too.

Would you like me to get an empty .po going and put all of the translations here into it?
I missed most of Ask an Engineer because my Raspberry Pi 4 rebooted itself four times. ๐ฆ
Will Adafruit ever make an audio/voice input/recognition Featherwing? It could use I2S for better sound input quality. ๐ ๐
It could do high quality audio output also. ๐
Maybe not yet but somebody could create it. ๐
Edge Badge has a microphone on board and can work with tensorflow lite to do some voice recognition.
and it has feather headers on the back, but I dont think it's a featherwing
You could use a Mikrobus adapter and an EasyVR board
the edge badge's mic doesn't currently work in circuitpython, also needs core driver code added.
@tannewt sure ok! Mind you, it looks like some of the translated sentences with English and Arabic content written together don't retain the right order of wording for some reaon. I think I will need to figure out a solution for that as well. I am stocked that we took a nice big leap in the right direction though, so yay!!
Big thanks to @joeycastillo for helping us figure this out.
ALL: CircuitPython 5.0.0-rc.0 is available at https://circuitpython.org/downloads. But if you see some missing downloads, let us know; the build process on github had a number of random failures. I believe all the downloads are there now, but there could be a few missing.
@tannewt One note - I won't be able to do any hardware testing as I don't have the boards. Maybe I'll say UNTESTED on the website?
Hrmmm. I am communicating with my Bluefruit LE SPI Friend, but am not getting any of the responses the tutorial shows that I should get.
I have to be sure my module is working right before I jump into trying to use it with Circuitpython.
@aidancuckoo Would you like to add a PR to CircuitPython for it? There is a guide on how to do it here: https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython
@tannewt Unfortunately I will only be able to put it on the website as I don't have the boards. Maybe I'll put "Untested" on the page?
Do I have to cross MISO and MOSI?
I know it is for UART, but thought SPI might work the same way. This is the first time I have connected an SPI device.
The Adafruit Connect App can not do an update to my module.
Quick question - I have a Particle Argon in stock - and I have an NRF52840 Express and an AirLift Wing... I have a one-off project that needs bluetooth and wifi. Is the Argon build stable? Is it easy to access the WiFi? Or should I give up the space and just use the two-board solution?
Thanks
@meager fog "arturo168"? ๐
@tough flax I'd recommend a "two board" solution. The Argon build is fine for the nrf52840 support, but the WiFi is an different issue. The ESP32 can only be accessed via UART, not SPI so the ESP32SPI support is not available. There is an "AT command set" WiFi image that can be loaded into he ESP32 for some limited WiFI functionality but it won't be as functional as the "Airlifts". This guide explains how to do it -- see the Argon specific sections https://learn.adafruit.com/adding-a-wifi-co-processor-to-circuitpython-esp8266-esp32/overview Note: you also have to reprogram the Argon bootloader for Circuitpython -- J-Link required. ... using the AT Command module on the Argon will require code changes from your feather_nrf52840+airlift system and it will not work as reliably.
If you want to use the Argon, you might want to consider adding an "Airlift Featherwing" or breakout to the Argon and ignoring its on-board ESP32 (use it like a Xenon) In that way it should be much like the nrf52840 Feather express plus airlift. Kind of a waste of the on-board ESP32, but it will work much better.
@tough flax FYI - I have verified that you can use an "Air;ift Featherwing" with an Argon with the following pin settings ```esp32_cs = DigitalInOut(board.D8)
esp32_ready = DigitalInOut(board.D6)
esp32_reset = DigitalInOut(board.D7)
@timber mango That's why they have those names: in an attempt to avoid confusing whose point of view a signal name refers to. MISO is "master in, slave out", from both the master's point of view, and the slave's. MOSI similarly is "master out, slave in". The idea is you can just connect MOSI signals together, MISO signals together, and SCLK (clock) signals (which are also master out) together. The SS ("slave select") leads go from I/O pins on the master, one to each slave.
@timber mango what have you tried so far for the BLE SPI Friend? What part of the tutorial is not working? I have one of those here and can try to reproduce it. What happened when you tried to update the Firmware using the Adafruit Bluefruit Connect app?
@solar whale So far, I have only been trying it out with Arduino stuff. I could not get any response with "ATI." In fact, the only response I could get from any command I tried is "AT >>," or something similar. It sure was not what the tutorial said I should be getting. When trying to update the firmware all I got was a loop of it trying to start the bootloader, connect, starting the update (and failing back to starting the bootloader). I do not even know if my Bluefruit LE SPI Friend is good. It sure is not acting right according to the tutorial. This (https://learn.adafruit.com/introducing-the-adafruit-bluefruit-spi-breakout/introduction) is the tutorial I was working with. I would like to know if you can get through that tutorial with your module. I have mine connected to a Feather M4 Express now. My phone could pair with my module, but the app could not connect to the sketch.
ok - first -- to update the firmware all it has to do is be powered on, open the App and connect to it. It should then tell you there is an update to 0.8.1 -- I just did mine. Has nothing to do with bootloader
with no software running on the feather_m4, you should still be able to connect the App the SPI Friend and use the UART Mode to send and echo characters.
What pins are you using to connect the SPI Friend to the M4?
Are you using the IOS or Android App?
I have to go AFK for about 30 min -- be back later.
After working a bit with Arduino, I am finding I do not really enjoy tinkering with it now. I have a lot of FUN working with Circuitpython and the whole "Adafruit Gang." ๐ ๐ I would love to get deeper into testing Circuitpython stuff, although I am very hesitant to poke at the actual source code.
back -- I'm setting up an M4_express with SPI Friend....
@solar whale I realize the module only has to be connected to the app via Bluetooth to update the firmware. Oh, cool. ๐
what pins are you using?
did you get the firmware update to work?
I am using CS - 10, IRQ = 11 ,RST = 12 and the ATCOMMAND sketch is up and running
I had to set the pins in Bluefruitconfig.h - just those 3
responses to ATI, AT+HELP, AT+HWGETDIETEMP
@solar whale thanks for expeditiously testing the eth. alpha yesterday
I'll have a DNS client bundled/released for it by friday ๐
@prime flower glad to help!
@timber mango the feather_m4_express and SPI Friend are working OK for me -- I'm switching mine back to CP but can easily go back to Arduino if you need me to try something.
Take clock divider from the hardware rather than a define at the head of the code. Reduces i2c bitrate for 400kbps from around 2Mbps :-)
@indigo wedge @tulip sleet Any chance of that getting in the RC? I think I2C on mimxrt isn't too usable without it, but OTOH pushing things late into a RC is asking for trouble, so I leave it to you guys to make the call!
...there's still a nasty in there which locks up the I2C, but it's only found under punishing circumstances and if I find it I'll let you know.
I tested i2c with a temp sensor and that worked so if it still works with this fix (and in sure it works better with it) then i think it or make it into the rc
Imx port will be a tech preview in 5 so it's expected to fall apart at any moment ;)
A lot of things would have worked at the old frequency (I2C is pretty forgiving) but not reliably.
With these patches over the past few days I'm comfortable, within limits, with UART, SPI and I2C now.
UART will fall over if RTS/CTS hangs it up for too long, but hopefully no-one will spot that.
Yes it seems to be shaping up well, u still had some issue with uart when trying to flash the esp32 but haven't had time to look into it
(github appears unwell at the moment)
We are investigating reports of increased API errors and webhook latency. https://t.co/Sx47i91D0R
I2C Frequency is corrected in #2659 , given that UART was also fixed recently I think it's worth re-testing this lot to see if the ticket can be closed....note that the requested I2C frequency is 400KHz.
There remains a lockup under punishing conditions, but that's a different issue.
I need more than 24h in a day :D
@timber mango FYI -- I found an issue with the CP BluefruitSPI library under CP 5 --- will be submitting a PR to fix. https://github.com/adafruit/Adafruit_CircuitPython_BluefruitSPI/issues/13
can't do PR until GitHub gets over its issues... if you need the fix before then I can post it.
@lapis hemlock one easy question, one tougher question. Would you like to be added to the circuitpythonistas role? This will allow you to receive notifications about upcoming meetings, etc., because those mention circuitpythonistas.
Tougher question: your module organization puts ones and zeros array constructing functions in linalg, where inv, det, and other matrix-only operations are. But while I think some builds might turn off matrix ops, I can't imagine turning off ones() and zeros(). Can we move them, either just to ulab or to a different module?
Well, for some reason, once in a blue moon, we don't detect a STOP condition on the I2C. I can see it there, plain as day, but it seems the CPU can't. There is a guard against this in the NXP driver (I2C_RETRY_TIMES) but it looks like it's one of those define-before-building things. It should certainly be set (otherwise there's no guard against infinate waiting, in lots of places) but I have no idea what a sensible value to set it to is :-(
@idle owl I tried to do a release for the BluefruitSPI library but it is failing -- can you take a look at it? I'mnot sure what to do about it -- I tried rerunning it but it failed again.
Checking
it appears to be there -- should I ignore the complaints...
Ew. I think we haven't run into this since the initial push to PyPI. You need to delete the release, delete the tag, and then create a new release. Basically I think if it glitches at a certain point, it can't figure itself out after it creates the files.
I'm not sure I want to ignore it. If it's there, I guess we can?
ok -- I'll delete and repeat
If it fails again and it appears successful, ignore it.
GitHub is having issues, I know that much. But that's a PyPI issue.
i forget -- how do I delete a release?
Oh right, it's a bit annoying.
You have to edit the release, delete all the assets, save it, then you can delete it.
Won't delete if it has assets.
I can do it
if you'd like
If you don't mind -- I deleted some assets but it may be better for you to take over
No worries.
I've done it too many times ๐
Alright let's see if that works.
@solar whale It worked.
@idle owl you are a wizard!! Thanks!
It's a really weird glitch. Where it creates the files but doesn't realise it did. So then you rerun it and it says "file already exists" but it doesn't complete the entire process.
kk @makermelissa we have 4 unknown boards (maybe renames, maybe new?) wanna try addin' em in or wrangling the designers :D
@solar whale I am using the Andoid app. I am using the hardware SPI pins with CS=5, IRQ=6, and RST=9. I have not gotten the firmware update to work.
ok -- tryin android app now -- downgrade then upgrade
@solar whale If I can get the fix from you, that would be great! Apparently, I can not move forward with my testing without your fix. Good work! ๐ ๐
the fix was just released https://github.com/adafruit/Adafruit_CircuitPython_BluefruitSPI/releases
android app is working ok for me ....
so nice to finally sit down and work on ulab for a chunk of time! good progress too, I think
Ok, 4 unknowns are:
arduino_nano_33_iot
pycubed
stm32f4_discovery (I'm guessing this is stm32f407vg_discovery since we have like 4 different stm32f4_discovery boards)
feather_m7_1011
@hierophect what is 'stm32f4_discovery' and can we rename it to be more descriptive :)
@timber mango ok -- this time the android app worked (it is much slower than the IOS app!) I was able to downgrade/upgrade and run the bluefruitspi_simpletest vi CP
The CLUE boot drive is currently FTHR840BOOT. Will that be changed to CLUEBOOT?
@umbral dagger I suspect it will only affect early boards but I haven't heard official word
@umbral dagger Yes.
@ladyada the STM32F4_discovery's annoying name strikes again! Yes, the STM32F4 Discovery is the STM32F407VG board, I think it was the first one they made, so it doesn't actually describe what chip it has on it even in on the ST page, you have to look at the specs. Opinion is divided on whether it should be renamed the F407 Discovery - TinyUSB calls it the stm32f407disco, Zephyr and Micropython call it just the stm32f4_disco and STM32F4DISCO, respectively.
@tannewt you were leaning toward ...
@gilded cradle If you have a moment, I have a simple PR that needs a pair of eyes. It's a rename of a function used only in the two existing examples. https://github.com/adafruit/Adafruit_CircuitPython_PyBadger/pull/25
I imagine as soon as I ask you, Limor will sneak in on it. ๐
lol, sure. I'll take a look.
Thanks
Thank you @gilded cradle. The previous PR includes the refactor you suggested, by the way. Code is a lot more compact. And the usage bugs were fixed.
Excellent
@gilded cradle Thank you again. JP caught that one yesterday and I fixed it and then clobbered it when testing/updating things. It defaults to circuitpython.org but anyone using this example is going to want to know how to change it to something else.
Yeah
wahoo thanks for merging my PR @gilded cradle
You're welcome. Thanks for making the changes.
of course.
@jepler Does this need #2657 first or later?
@lapis hemlock one easy question, one tougher question. Would you like to be added to the circuitpythonistas role? This will allow you to receive notifications about upcoming meetings, etc., because those mention circuitpythonistas.
@onyx hinge I wouldn't mind, but I must point out that I don't see myself as a possible future contributor to circuitpython per se. The statement is not about circuitpython as such, because I have absolutely nothing against the community, and the whole concept is extremely cool, but I don't think I would have the time to meaningfully contribute to anything. But I would definitely like to regularly take part in the weekly meetings and such, if that is an option.
but if the fixes affect only the imx port then i think it should be fine?
@lapis hemlock absolutely! You can come when you have something to talk about, whether it's "in the weeds", status updates or hug reports. If not, there's no obligation to attend.
@dhalbert It works with or without #2657 , but we can't use the preferred style of importing import ulab.fft as fft until #2657 has gone in. I don't mind if @tannewt prefers to hold this PR until that one is merged, though.
Tougher question: your module organization puts ones and zeros array constructing functions in linalg, where inv, det, and other matrix-only operations are. But while I think some builds might turn off matrix ops, I can't imagine turning off ones() and zeros(). Can we move them, either just to ulab or to a different module?
@onyx hinge I think you are right. The question is, whether you would wantzerosetc. to be always available. I was thinking thatndarray.cshould only contain the implementation ofndarray, and the methods thereof, nothing more, because it would then be relatively easy to extendulab, basically, by sub-classingndarray. I believe, this is howscipy, e.g., works.
btw something strange happened with tests on the imx i2c fix
i stopped and restarted them now
they got stuck
@indigo wedge but I have to delay the rc another day or two. It would be nice to have 5.0.0 as a stable release sooner rather than later. I wouldn't go from rc to GA with a fix, we need another RC in between.
So, zeros etc. should be a new module, I guess.
@lapis hemlock I did the move the cowardly way, by just changing the bindings and not moving them from one file to another...
I consulted with limor re this too, and we'll go for GA sooner
Sure, if it causes that much trouble then let's merge these after release ๐
@lapis hemlock I did the move the cowardly way, by just changing the bindings and not moving them from one file to another...
@onyx hinge You could have. I absolutely see your point,zeroshas no place inlinalg. To be honest, I have no idea, why I put them there...
I think this is a good idea too! We could share a lot of development work between a WebUSB webpage and a standalone, cross-platform Electron app (which is chromium under the hood).
I know this is a very old comment, but just in case this information is useful, the device chooser for electron has not been implemented yet, and I assume this would also apply for WebSerial: https://github.com/electron/electron/issues/14545
But, I think this node implementation could be used as a WebUSB polyf...
@indigo wedge it's not the fixes...they're just showing up the underlying problem so far as I can tell. I'm on its tail.
@mubes Did you check the frequencies with a Saleae or similar?
yes i wouldn't expect a 1 line change in imx to break half the boards ๐
@tulip sleet @indigo wedge we definitely shouldn't put any fixes in if they impact timescale.....I wasn't completely comfortable anyway.
@onyx hinge @slender iron "basically, by sub-classing ndarray. I believe, this is how scipy, e.g., works." Actually, is there a meaningful way of sub-classing at the C level? The only example I found is the ordereddict https://github.com/micropython/micropython/blob/ad7213d3c31bccb26a3f54f7492ccf4b0cc920f3/py/objnamedtuple.c
So far as I can see it's a problem in the OEM driver, and it'll need us to patch their code, but I've walked away from it for dinner to make sure I've got a clear head.
micropython doesn't really support subclassing C types from C. I forget where I ran into this, maybe related to namedtuples?
@onyx hinge What about circuitpyhon?
@lapis hemlock @slender iron is afk for a few days. We do native subclassing in, for example, displayio. We added some stuff that MicroPython currently doesn't do to make it work better.
Tougher question: your module organization puts ones and zeros array constructing functions in linalg, where inv, det, and other matrix-only operations are. But while I think some builds might turn off matrix ops, I can't imagine turning off ones() and zeros(). Can we move them, either just to ulab or to a different module?
@onyx hinge Are there other initialisation functions beyondzerosandonesthat would warrant a new module?
Well, with a scope, but yes, it's been checked. I haven't tried varying the
bus speed, but will do that with the next patch.
Given that this won't make 5.0 please leave the pr open for now while I
hunt down this bug.
On Thu, 27 Feb 2020, 18:29 Dan Halbert, notifications@github.com wrote:
@mubes https://github.com/mubes Did you check the frequencies with a
Saleae or similar?โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
...
it still requires some explicit checking for subclasses, but it's been made easier, and we fixed some things that just plain didn't work
@lapis hemlock @slender iron is afk for a few days. We do native subclassing in, for example, displayio. We added some stuff that MicroPython currently doesn't do to make it work better.
@tulip sleet Dan, can you point me to the implementation? Do you think that one could make an attempt at trying to convince micropython upstream?
however tannewt is much more familiar with the details
i'm looking for the pr's, etc. dpgeorge also commented on this, but I wasn't sure whether it was over video or in writing
I have read somewhere that in CPython, there are a couple of things that were implemented because numpy required tools. I don't remember the specific example, though. While I don't want to draw a complete parallel here, I still believe that there might be pressing reasons for extending micropython's toolset.
@lapis hemlock absolutely! You can come when you have something to talk about, whether it's "in the weeds", status updates or hug reports. If not, there's no obligation to attend.
@onyx hinge Thanks, it's very kind.
@onyx hinge Do you think that linspace could also go with ones and zeros. For three functions could make a module. We have to come up with a name, though. Any suggestions?
@lapis hemlock I moved only ones and zeros (to the ulab module itself), considered eye and linspace but left them where you put them.
Right, eye, too. Let's make a new module.
I don't have a good name, I hope you do.
ulab.construct? .make? .generate?
I also wondered whether eye was more connected to linalg and sould remain there
construct sounds good, I am cool with that.
eye is also an initialisation function.
@lapis hemlock I failed to find a clear PR for the native subclassing stuff; let's defer until @slender iron can explain.
@onyx hinge I am working on a facelift for the zeros etc. I should be done soon, but I wanted to notify you, so that we don't work in parallel.
@lapis hemlock I failed to find a clear PR for the native subclassing stuff; let's defer until @slender iron can explain.
@tulip sleet Thanks for your efforts! It's not urgent, we can definitely wait till Monday. This was more like a, as you call it, strategic question for the longer-term vision.
I'm fine with either really, but I just need to know which direction to go on the STM32 board. @ladyada, do you have any pics/info on the feather_m7_1011? I found stuff for pycubed and the arduino already.
The M7 1011 Feather arrived at Adafruit office today so I'd expect official photos to appear soon. If you want something even sooner, you can use this: https://pbs.twimg.com/media/ERAQFsPW4AgvItW?format=jpg&name=large
@onyx hinge Jeff, I have just checked in my changes: https://github.com/v923z/micropython-ulab/tree/create . I have no emotional attachment to the module name, we can definitely change it, if you want to.
@lapis hemlock maybe you forgot to commit the new source file?
Yes, I did. ๐
It fails with the tests now, 00smoke constructors. It's weird, because I haven't actually modified the functions.
>>> ulab.create
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'create'
``` is something still missing?
It is not a module, I bound everythin at the top level. ulab.linspace(...)
okay!
And that is why the test fails.
then now just the tests need to be revised, I can do it..
print(linalg.eye(3)) is no longer valid.
did you spot the "./build.sh" script? If you're on linux, anyway, it will roughly do the same thing as the github actions..
I have seen it, but didn't look closely. I see that you fixed the tests. If you are satisfied, you can merge it. If not, you can change whatever you would like.
Thanks for the reminder, I'll grab the diagonal one from https://twitter.com/arturo182/status/1229500410664280064
did you spot the "./build.sh" script? If you're on linux, anyway, it will roughly do the same thing as the github actions..
@onyx hinge Cool, many thanks!
I like automating things. I need to do something to help with generating .exp files.
@onyx hinge On the conceptual level, there should be no dangling (i.e., those that are not parts of a module) functions that can be switched off with a pre-processor flag, right? Because if we do that, then we can't check that linspace is compiled into the firmware. So, if you think that these initialisation functions should always be there, then we have to remove the #if ULAB_CREATE_MODULE directive. Otherwise, these have to be in a proper module.
@lapis hemlock I think it's very unlikely we'll want to disable linspace or eye; and almost impossible that we'll ever want to disable zeros or ones.
Ok, unless I hear differently, I'm just going to rename the stm32f407vg_discovery board on here to stm32f4_discovery since it's easier than renaming in CP.
@onyx hinge Will you remove ULAB_CREATE_MODULE from ulab.h, and ulab.c, then, or shall I?
I can
Thanks!
oops! I made a mistake with git and pushed directly to the master branch ๐
Should be OK, don't worry!
you're easy to work with, thanks!
You are not difficult, either.
To work with, I mean.
We no longer need the 2dim and create branches, is that correct?
I think so, branches can always be removed after they are merged
I will delete them, then.
@idle owl are the download stats for circuitpython itself (as opposed to the libraries) currently broken?
@tulip sleet I think they have been missing for a few meetings in a row
i was just going to check on rc.0 downloads, thinking about when to do GA
I was able to set the title to STM32F407 Discovery kit, so I guess it doesn't need to be a 1:1 match.
๐ I'm surprised 5.0.0 stable release appears might not include new _pixelbuf driven NeoPixel?! Expected that would be one of its main features.
For those who want to try out _pixelbuf accelerated neopixels with 5.0.0 without building / compiling CircuitPython...
You can easily:
- Download neopixel.py from the pixelbuf branch.
- Rename
neopixel.pytopixelbuf_neopixel.py(_or anythi...
@tulip sleet Yeah they're broken.
ok, thanks!
@idle owl @slender iron @onyx hinge given that there's been no blowup re rc.0, I'm thinking of doing 5.0.0 GA now. The main issue is not the release, it's the download links, because of random github asset upload failures. I could submit a PR to circuitpython.org to change its download links, but then we'd definitely lose download counts. It looks like we can turn on logging on AWS S3 and process the logs later. There's also something called CloudWatch which costs money. Or we can not delay to collect counts.
Or I can release 5.0.0 and hobble along with the current asset problems. I fixed the missing assets last night by hand (about 50 of them), and I can do that again.
i think it would be very good to get 5.0.0 out soon.
I don't like the idea of you manually doing all of that again, or hobbling along with any asset problems. We don't currently have download stats anyway, so I think changing the links to S3 as long as it doesn't change the user experience is fine, and we can deal with getting the stats later.
It seems like counts on the adoption of 5.0.0 would be very nice to have, but I don't know how to compare that to the value of not potentially putting it off by an appreciable length of time
I do want to see 5.0.0 released.
I mean, feels like the problems on github's end are not magically fixing themselves so doing SOMETHING with log processing on S3 may be in the cards no matter what
@onyx hinge we had an internal mtg yesterday where we pretty much decided to move the assets downloading to S3, because GitHub is not really set up for massive asset lists, so it will happen one way or the other
I see.
so that matches what you're saying; i'll check on the log stuff to see if it makes sense just to turn that on now
anything I can do to help, let me know
@indigo wedge So, here's as far as I've got with the I2C issue...writing it down as much to clear my thoughts as anything else. I tickling the issue with a scan, but I'm 100% certain there are plenty of other ways to make it happen.
@tulip sleet how long has rc.0 been out? Could we give it a weekend of testing? Any urgent reason to do 5.0.0 stable?
A scan causes busio_i2c_scan to be called, which in turn calls common_hal_busio_i2c_probe. The goes down to the SDK call LPI2C_MasterTransferBlocking. The problem is that when I look on the scope that is not releasing the bus at the end of the transaction....as far as I can see, ever. Certainly, if I run i2cscan at 1s intervals, I see SCL low between scans, which is not what I expect at all, like this;
@slender iron we could wait, i was interested in the download stats, but if they're broken, that's not much help
i would like to do stable early next week if nothing arises
do you know if they're permanently broken?
Next week works for me. We can get download stats on a per tag basis still.
The current adabot script just tries to load all releases
Sometimes SDA is low in the intervening period, sometimes SCL high....whatever, they're not stable. When the thing fails, SCL is always low and SDA high;
@slender iron i see the API calls to get stats per release. do I need an api key to call the API? I was looking for an easy CLI tool, though I could always just use curl or something
No api key needed. The rate limit will just be lower iirc
If I interrupt the app, then I get the correct STOP signal, and things carry on again for a while. And that's where I've got to. Basically, your chip is waiting for a STOP condition that doesn't arrive. I'm pretty sure the STOP after program interruption is the auto-STOP you get when there's an error. Suggestions welcome.
(I'll shut up for a while now)
Hi, I have an "electrical" question about the CLUE. My Bit:2:Pi arrived and I have some success with NeoPixel board: https://twitter.com/DavidGlaude/status/1233140189243092998?s=20
A CLUE (from @adafruit)ย driveย a Unicorn pHAT (from @pimoroni) thanks toย a BIT:2:PIย (from @4tronix).
@CircuitPython source code provided, but it is just #NeoPixel
pixels = neopixel.NeoPixel(board.P2, num_pixels, brightness=0.1, auto_write=False)
https://t.co/DGKvZyhac3 http...
But to have the NeoPixel light up, I need to power the Bit:2:Pi from it's USB. As a consequence, I don't see the CLUE as a drive, and I don't have the serial REPL.
I am affraid to connect my PC twice to this (once on the CLUE and once on the BIT:2:Pi as this could blow it up and produce smoke.
Would there be a safe way to distribute 5V to this, while having USB to work too? I believe the BIT:2:Pi take the 5V, give it to the Pi connector, transform it into 3V and give it to Pi and Microbit.
@fallen anvil no need to shut up, I'm reading and if it helps you to rubberduck then go ahead ๐
I'd probably plug the other one into a USB powerbank, but there may be a better way.
@main meteor Would that make two source of 3V for the CLUE? Is that "safe"?
I don't have a Clue... ๐คช
I have a CLUE, but I am about to remove the magic smoke out of it...
Hopefully not.
I believe the question can be summarized in: Can we plug something in the USB while the CLUE is powered in 3V from the "micro:bit" connector?
I kind of always wory about having two power sources simultaneoulsy connected.
@half sedge there should be some diodes to allow you to do that. I'll check the schematic.
@tulip sleet Thanks.
we have https://www.adafruit.com/product/4516 in stock for those who want to pick one up ๐
@tidal kiln
Hi @meager fog , if you ever do a new revision of the CLUE, would you consider the alternate powering option: https://tech.microbit.org/accessories/making-accessories/#battery-pads
@slender iron @tulip sleet i proved with some high satisfaction last night that the asset count is what kills the release API request. verified using the v4 (GraphQL) API, which lets you specify the number of assets to list. choked on 100 (max); no problems with 10.
also, with moving downloads to S3...it looks like download stats will be painful. nothing jumps out in the API docs, and google is turning up massive-effort-log-reading or 3rd party services.
@raven canopy The adafruit web people are enabling some metrics on S3 that should give us counts.
@indigo wedge Yeah, its normally the cat, but shes off in the other room somewhere :-/ TBH I'm s little bit stumped, I can see what it should do, I can see it doing everthing properly when there's a message following, but not when there's nothing following... I've missed something here but, whatever it is, I'm pretty sure its in NXP-driverland.
@half sedge @tulip sleet seems it's the so called battery connector that has the auto switching diodes (and no charging circuit, I guess?)
i'm a bit iffy on the inner workings of I2C so not sure I can help much
right
It should only fail to send a stop when there's an error and, by definition, an error should send a stop.
@half sedge hi, what would that be good for?
@meager fog I tried the following case for micro:bit but it does not fit, and the powering is from two AAA to those pad on the micro:bit https://shop.pimoroni.com/products/hard-case-for-micro-bithttps://tech.microbit.org/accessories/making-accessories/#battery-pads
@fallen anvil do you have some other boards you can try the same CircuitPtyhon code on and spy on the I2C to see what's different?
Apparently it's one way to power a micro:bit and some case use that.
why does that case not fit
we have https://www.adafruit.com/product/4516 in stock for those who want to pick one up ๐
@meager fog Ordered! haha
Yeah, I can probably dig up some sort of ST board or something. Good idea....I'll try that in the morning if I don't crack this this evening when my head is fresh.
Well, it is a bit "tight", but nothing I cannot dremel I guess. But the battery connector goes on the CLUE where there are surface mounted component...
yeah we use that spot for the speaker and parts
there's no plan to add those pads at this time. if we do a hardware revision and it does not affect manufacturability we will look to add those pads
@tulip sleet via CloudWatch, per chance?
i have not seen that case lately - i dont know if its still made or who makes
Would you know if it is safe to power the CLUE both from USB and from the micro:bit connector?
pimoroni does not make it
you can but its not a good idea
same as microbit
power from the USB or battery connector only. they are protected and regulated
@raven canopy CloudWatch is one way to do it but I think this is some kind of lifecycle rule. I don't have access yet, will tell you when I know more.
So these press into those pads? I see
Yes.
I might have ordered the last one from Pimoroni.
Now I need to find a micro:bit or a kid with a micro:bit and donate.
Yes = "I guess" because I don't have a micro:bit. ๐
I believe the BIT:2:Pi board is protecting the micro:bit as the documentation say: "Any or all power sources can be connected safely at the same time". I tested @main meteor suggestion and it works without magic smoke. I can now access the REPL / Storage and check the result of my code immediatly. Thank you all.
should black be skipping these in its check?
@main meteor I wondered when somebody was going to pull that one off! ๐
@tidal kiln looks like jreese edited docs/conf.py to get it to pass (or let black edit it before the PR): https://github.com/adafruit/Adafruit_CircuitPython_TestRepo/pull/25/files
i'm not sure of any conversations on where to draw the black-line. ๐
i guess we may as well use black on all our python code, even the ancillary code.
i gather that was the intent. but, its an assumption.
huh. that would be good to fix....
@raven canopy thanks. opened an issue fwiw.
@timber mango Pull which one off?
They needs to be released as BIN
Shouldn't apply to Circuit Playground Express and Trinket M0 (and all M0 board) too as I don't understand how 488 KB and 359 KB UF2 can be flashed on 256 KB MCU ?
@indigo wedge ...and now we can be happy;
The change is in the sdk, and I have no idea how to submit a patch for a subproject at the moment, so here's the diff you can apply and give it a try;
diff --git a/devices/MIMXRT1021/drivers/fsl_lpi2c.c b/devices/MIMXRT1021/drivers/fsl_lpi2c.c
index 1ff3078..1267fff 100644
--- a/devices/MIMXRT1021/drivers/fsl_lpi2c.c
+++ b/devices/MIMXRT1021/drivers/fsl_lpi2c.c
@@ -248,8 +248,12 @@ status_t LPI2C_MasterCheckAndClearError(LPI2C_Type *base, uint32_t status)
/* Clear the flags. */
LPI2C_MasterClearStatusFlags(base, status);
- /* Reset fifos. These flags clear automatically. */
- base->MCR |= LPI2C_MCR_RRF_MASK | LPI2C_MCR_RTF_MASK;
+ /* Reset fifos (Except for NAK, which doesn't generate a STOP automatically). */
+ /* These flags clear automatically. */
+ if (kStatus_LPI2C_Nak != result)
+ {
+ base->MCR |= LPI2C_MCR_RRF_MASK | LPI2C_MCR_RTF_MASK;
+ }
}
else
{
I would expect so, these sdk libraries are generally pretty uniform. I'll check
Try this on your problem child first before we do anything more. Certainly I'm happier with the behaviour now.
...did I ever mention that I hate i2c?
CPY is gonna follow the master branch of the SDK repo so if we merge it here https://github.com/adafruit/MIMXRT10xx_SDK it will just get updated
OK, I'm poking NXP direct too at the moment :-)
nice ๐
It was Limor who mentioned
i2c scanning does not seem to find write-only/read-only devices (?):
SSD1306 OLED, and GTOP I2C GPS are not found on bus
when i tried it with a temp sensor it worked
I should have a OLED using that IC somewhere so can test
Well...it was misbehaving with the protocol so anything could have happened.
It was a race, so on some occasions it would work. I haven't tried my punishing tests yet, but certainly this is an improvement.
Oh, actually, my punishment test has started automatically....123K iterations without fail. I'll let it go to 1M before claiming it as a fix.
@indigo wedge Right, bored now, thats 250K without any hiccups. It's done. More testing by other people is needed but the issues I observed are gone. Same code exists for 1011 and 1060. Heres a diff that fixes it across all 3...would you mind doing the honours and merge it with either your or CPs repository? Does that need @slender iron ? I'm trying to avoid having lots of (sub-)projects open.
THanks, I don't have write rights on that one, @slender iron can take care of that https://github.com/adafruit/MIMXRT10xx_SDK/pull/1
bril, ta....makes my life easier not having to deal with all this new fangled CI stuff
One more patch by @mubes here https://github.com/adafruit/MIMXRT10xx_SDK/pull/1
Should fix the scan issues.
Different subject, but at some point it would be interesting to look at removing some of the busy loops....we spend a lot of time, with a very fast CPU,, not doing anything useful;
23.86% 20768 mp_hal_delay_ms
21.93% 19090 LPI2C_MasterStop
14.03% 12212 common_hal_mcu_disable_interrupts
13.03% 11347 supervisor_ticks_ms64
9.64% 8394 common_hal_mcu_enable_interrupts
7.94% 6919 __DMB
1.62% 1411 dcd_isr
0.62% 543 USB_OTG1_IRQHandler
0.61% 538 dcd_event_handler
0.60% 529 LPI2C_MasterTransferBlocking
0.51% 446 Unknown
0.43% 379 SCB_CleanInvalidateDCache_by_Addr
0.28% 252 busio_i2c_scan
0.27% 238 common_hal_busio_i2c_probe
0.26% 233 LPI2C_MasterWaitForTxReady
0.25% 220 __enable_irq
0.24% 210 mp_obj_get_type
0.21% 184 memset
0.20% 176 common_hal_terminalio_terminal_write
0.17% 155 $t
-----------------
96.70% 84244 of 87034 Samples
Ex | Count | MaxD | TotalTicks | AveTicks | minTicks | maxTicks
----+----------+-------+-------------+------------+------------+------------
15 | 1070 | 1 | 2682917 | 2507 | 1739 | 5038
129 | 8555 | 1 | 15914622 | 1860 | 1035 | 4867
[--TH] Interval = 1061mS / 534620993 (~503884 Ticks/mS)
That's a lotta waiting
Yup. You only realise how much you're wasting when you see it like this. The transfer is 0.60% of the CPU!
...well, 0.88% if you include the i2c_probe at the top level too.
(We should at least figure out how to WFI in mp_hal_delay_ms...that's a real power saving right there). When we're in the REPL we spend a lot of time furiously waiting for a character to arrive;
44.09% 37569 mp_hal_stdin_rx_chr
42.84% 36506 tud_cdc_available
4.24% 3613 tu_fifo_count
2.44% 2079 Unknown
1.21% 1032 serial_bytes_available
1.18% 1008 $t
0.72% 618 dcd_isr
0.62% 534 USB_OTG1_IRQHandler
0.46% 399 SCB_CleanInvalidateDCache_by_Addr
0.46% 395 dcd_event_handler
0.23% 203 supervisor_tick
0.15% 132 displayio_background
0.15% 130 common_hal_mcu_enable_interrupts
0.13% 113 __DMB
0.12% 104 assert_heap_ok
0.12% 103 tud_cdc_n_write_flush
0.11% 101 common_hal_mcu_disable_interrupts
0.10% 89 _osal_q_unlock
-----------------
99.37% 84728 of 85204 Samples
Ex | Count | MaxD | TotalTicks | AveTicks | minTicks | maxTicks
----+----------+-------+-------------+------------+------------+------------
15 | 1047 | 1 | 2213120 | 2113 | 1985 | 3026
129 | 8377 | 1 | 9957813 | 1188 | 1070 | 2133
[--TH] Interval = 1042mS / 523379914 (~502283 Ticks/mS)
I'm making a new circuitpython board (nrf52840) and just started getting only False from trying to lock an I2C object. what are possible reasons for I2C failures of locking, the docs just regurgitate the name.
The UF2 files are not densely packed. Each 512-byte block consists of at most 476 bytes of data, and possibly less: https://github.com/microsoft/uf2.
There are UF2 bootloaders available for mkrzero and nano33iot in https://github.com/adafruit/uf2-samdx1/tree/master/boards, but you are right, we should publish .bin as well.
the underlying bug has now been found in the SDK and patches submitted. This one is now OK to merge. The checks failed when Github was unwell yesterday but I have no idea how to resubmit a checkjob.
I restarted the jobs. I am not sure if you have access to the "Re-run jobs" button, but here's where it is:

Yeah, didn't see that button, AKA the 'create more load' button...I can understand why they don't give access to it to mere mortals.
Not looking good...a one line change and the world of circuitpython comes crashing down. Not even my code is that bad!
OK thanks @dhalbert for the explanation
While I didn't end up prototyping it, I suspect that my idea of blocking the audio background task when an sd card I/O is going on will lead to audio stutters, as it's very easy to cause single I/Os that take >>20ms. Since we can't tell whether the background task is also going to need the same SPI bus (this is what causes the deadlock), we'll be making all audio background suffer for a tiny sliver of all cases, and with no way to make it better. Thus, I think leaving up the "here be drago...
Merging anyway, since some i.MX builds succeeded. Attempts to restart the actions failed.
hum, I thought this was supposed to work even if USB is active: ```>>> storage.remount('/', False, disable_concurrent_write_protection=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: Cannot remount '/' when USB is active.
This patchset improves spi_flash_read_data so that it handles unaligned (and non-multiple-of-4) disk reads. It also adds a note that writes MAY need this handling too; however, I think without checking that oofatfs will never actually generate such writes. It also removes the workaround that was the initial band-aid fox for #2332.
Alternately, I could do this in the nrfx submodule, which would also benefit arduino. Let me know, while I'm fresh from implementing this would be a good time to take it upstream instead.
Hello
I'd like to request USB PID for one board under development. This Vita board uses nRF52840 and it will run CircuitPython for both boot-loader and application.
Thank you,
-Tim
@indigo wedge for the '1011 - how is the RAM split up
is it like 64K for instruction cache, 64K for use?
Best to ask @slender iron since he implemented that part but I believe it's 32k instruction cache 32k data cache and 64k generic ram
I don't have a Clue... ๐คช
@main meteor This one. ๐
@meager fog all ok with the Feathers?
yah tryin' it out
ok yah
so far so good!
wifi...is going to be tough
it kinda fits?
I had to freeze the esp32spi library to get it to work on my Feather
yeah
Otherwise memoryerror
i can connect and get data - but thats literally the limit ๐
like cant display on anything
Good thing we have lots of flash ;)
ok you wanna freeze ESP32spi then?
i think thats not a bad idea if you have 1MB flash
Yeah I will in mine for sure
Sorry I won't be home for quite some hours
indices or individual stocks or any ticker symbol?
There are UF2 bootloaders available for
mkrzeroandnano33iotin https://github.com/adafruit/uf2-samdx1/tree/master/boards, but you are right, we should publish.binas well.
Yes, but I see no Arduino boards in the releases
The UF2 files are not densely packed. Each 512-byte block consists of at most 476 bytes of data, and possibly less: https://github.com/microsoft/uf2.
So, if the .bin file used to generate the UF2 file is under 256 KB, the UF2 file is always goof to be fl...
@simple pulsar either
@indigo wedge ok ill put this aside and try out your frozen firmware when you can toss it over ๐
Will poke you when I have it :)
FYI, Reuters and the like put a note/warning on pages if the data is from an intentionally delayed source, e.g. All quotes delayed a minimum of 15 minutes. on https://uk.reuters.com/quote/.SPX - Google stick a more complex description under Disclaimer link
Reuters.com for the latest indices and markets news on .SPX
kk i am using alphavantage api, seems good enough
How do I logout from the discord Android app????
How do I logout from the discord Android app????
@red tinsel Tap on the menu in the upper left hand corner of your screen.
at the bottom next to your account info, click on the Gear icon.
then in the upper right hand corner click the square with the arrow, or the logout icon.
Thank you, Andrew.
I am all out of AA batteries for my keyboard, so I can not use my computer now. I will not be able to get more batteries until next month. ๐ฃ๐
I didn't see anything in open issues or the support matrix. Is there support (or a plan for support) for displayio on MIMXRT10xx/Teensy?
@crimson ferry theres displayio for RT1011, at least the one arturo sent me ๐
[this is a draft PR for now]
We now have over 1700 release assets. GitHub releases don't handle this many assets well:
- The release pages are huge and take a long time to load.
- Uploading assets can fail sporadically or hit GitHub rate limits.
- It's difficult to correct the problems above: the release action must be re-run several times and may still continue failing. Uploading the missing assets is tedious.
We already upload the release assets to S3. This PR changes the download ...
Folks, perhaps (probably) being dumb here, but can anyone help with what in this code is causing my board to go into a reboot loop;
import busio
import board
import digitalio
import displayio
import adafruit_ili9341
displayio.release_displays()
# Setup SPI bus using hardware SPI:
spi = busio.SPI(clock=board.EXP_SPI0_CLK, MOSI=board.EXP_SPI0_MOSI, MISO=board.EXP_SPI0_MISO)
print("Starting")
cs_pin=digitalio.DigitalInOut(board.EXP_SPI0_SEL0)
cs_pin.switch_to_output()
dc_pin=digitalio.DigitalInOut(board.EXP_P22)
dc_pin.switch_to_output()
display_bus = displayio.FourWire(spi, command=dc_pin, chip_select=cs_pin)
Its the FourWire instantiation at the end that actually causes the problem. I now appear to have corrupted my on chip drive as a result of it....but I don't know why.
(Using todays libraries)
@fallen anvil I don't see anything immediately wrong with the above. Can you get into safe mode?
Now when I try to boot I end up in wait_for_safe_mode_reset with a 4-flash LED
to erase and reformat the filesystem, do you know to do: import storage; storage.erase_filesystem(). Also I can suggest a simple patch to do the equivalent.
is there a usable backtrace from wait_for_safe_mode_reset()
Not too much....
(gdb) bt
#0 0x60023964 in wait_for_safe_mode_reset () at ../../supervisor/shared/safe_mode.c:68
#1 0x60022d54 in main () at ../../main.c:420
to force a reformat of the filesystem, temporarily change false to true in main.c:
// Create a new filesystem only if we're not in a safe mode.
// A power brownout here could make it appear as if there's
// no SPI flash filesystem, and we might erase the existing one.
filesystem_init(safe_mode == NO_SAFE_MODE, false);
I guess I can do that from the debugger, one sec;
are you hanging in wait_for_safe_mode_reset()? that should wait for only 700 msecs. If there's another reset click during that period, then the next restart will go into safe mode and not run code.py.
In general when debugging this kind of thing, I don't use code.py and instead import the test program from the REPL manually, so that I don't get into loops.
yeah, I found my way through there....just at stack_init
trying to find out where it's getting thrown into the safe mode handler...bear with me. The filesystem seems to be coming up ok
best places to set breakpoints to catch faults are HardFault_Handler and reset_into_safe_mode()
that will catch things before it restsarts
yeah, was hoping this one was just sticky fingers rather than a bug :-)
OK, I'll get it to reformat the fs then go again. Didn't even think about the avoiding code.py....thats a really useful tip!
Right, got a clean fs and up and running...so it was a corrupt fs that was causing the safe mode, but still doesn't explain why my code doesn't fly :-(
Now we might be getting somewhere;
Breakpoint 3, reset_into_safe_mode (reason=reason@entry=MEM_MANAGE) at ../../supervisor/shared/safe_mode.c:86
(gdb) bt
#0 reset_into_safe_mode (reason=reason@entry=MEM_MANAGE) at ../../supervisor/shared/safe_mode.c:86
#1 0x600231dc in MemManage_Handler () at supervisor/port.c:349
#2 <signal handler called>
#3 0x60031ff6 in IOMUXC_SetPinMux (configRegister=0, inputOnfield=0, inputDaisy=0, inputRegister=0, muxMode=5, muxRegister=0)
at sdk/devices/MIMXRT1021/drivers/fsl_iomuxc.h:864
#4 common_hal_digitalio_digitalinout_construct (self=0x2020383c <displays+36>, pin=0x20204aa0) at common-hal/digitalio/DigitalInOut.c:65
#5 0x6002c174 in dcd_isr (rhport=<optimized out>) at ../../lib/tinyusb/src/portable/nxp/transdimension/dcd_transdimension.c:554
#6 0x20203818 in ?? () at ../../supervisor/shared/tick.c:90
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
Any clues from that @tulip sleet ? That IOMUXC definition looks dodgy for one thing... I think I have things to investigate and, as a silver lining, this looks pretty definately like a port issue so nothing for anyone else to stress on.
looking...
are the arguments to IOMUXC_SetPinMux() sensible (e.g., the ...Register values being zero?
65 IOMUXC_SetPinMux(pin->mux_reg, IOMUXC_SW_MUX_CTL_PAD_MUX_MODE_ALT5, 0, 0, 0, 0);
I'm suspecting that pin is not properly initialized?
865 IOMUXC_SW_MUX_CTL_PAD_MUX_MODE(muxMode) | IOMUXC_SW_MUX_CTL_PAD_SION(inputOnfield);
Yeah, that's what I'm suspecting. Sorry, had to step away for a few mins. Back now
since it just treats it like a pointer, 0 is going to not be a valid value. ummm .. what would cause dcd_isr to be constructing a pin object anyway?
554 dcd_event_bus_signal(rhport, DCD_EVENT_SOF, true);
Well, it'll be writing on random bits of memory by this point so all bets are off with respect to the stack frame....however, the rest of the values are valid, originating in a common_hal_digitalio_digitalinout_construct call as IOMUXC_SetPinMux(pin->mux_reg, IOMUXC_SW_MUX_CTL_PAD_MUX_MODE_ALT5, 0, 0, 0, 0); ....question is why configRegister is 0
Leave it with me for a while....
yeah maybe dcd_isr is a red herring due to stack corruption. You can try breaking at common_hal_displayio_fourwire_construct and step through it, since in all reasonableness this is where you should have called from
you could also see if you can directly create DigitallInOut objects from dc_pin and cs_pin. hey, wait, are you supposed to pass the pin (board.EXP_SPI0_SEL0 e.g.,) rather than a DigitalInOut object? and it's a case of missing type checking?
Now thats certainly possible
command=board.D10,
chip_select=board.D9)``` @fallen anvil
OK...one sec, caught by a phone call, back in a few
hehe no worries
@onyx hinge I was thinking of that, but it didn't rise above the subconscious enough ๐
The numbering vs object was indeed an issue, but it would appear that there's no muxReg set for command, so it's writing to *0, which never ends well. Just digging on that.
So, in displayio_fourwire_make_new we parse out command, chip_select and reset into objects which, based on my limited knowledge, are just generic MP/CP objects, aren't they? They are then passed to common_hal_displayio_fourwire_construct that casts them as mcu_pin_obj_t * ...but they only contain part of the information, and they're certainly not pin_XXX const definitions. It seems to me that the second element of what is passed is actually the pin_XXX definition? Sorry, way out my depth here.
oooh....hang on, this might be something silly I've done.
No, false alarm, still digging.
Just a couple fixes/things I can spot. Thanks @dhalbert.
We will need to figure out how to get download counts and other statistics, but AWS CloudWatch log files can do that (@jwcooper turned them on), which can then be processed by us with https://s3stat.com, https://qloudstat.com, or us directly parsing the log files.
After some further investigation/reading, it looks like AWS's Python SDK boto3 should make this a little easier with CloudWatch. I'll keep reading, and see if I can ...
Should these actually be BIN_UF2, since a UF2 bootloader exists for the boards?
This step can also be removed. uritemplate was used by tools/upload_release_files.py.
The logs will get sent to the new adafruit-circuit-python-logs bucket.
Thanks for reviewing! Iโm out but will add changes later.
@meager fog here's a build with adafruit_esp32spi and adafruit_requests
Note, this is only for my 1011 Feather, not the M7 1011, should I freeze these into that one too?
So, @tulip sleet and @onyx hinge ...I can see how it's going wrong, but not why. Indeed it's the case that the command and chip_select objects that are parsed out in displayio_fourwire_make_new are variable objects passed on the stack, but they are passed to common_hal_displayio_fourwire_construct as if they were const mcu_pin_obj_t *'s. The second 32-bit word of whats passed is indeed the correct pin_... construct. What I don't understand is how this works for everyone else, and there obviously aren't problems elsewhere so I've done something silly in the setup, but I don't see what.
ok by the time i get home this should be ready to merge :)
@dhalbert was a bit reluctant about merging stuff just before the 5.0.0 release, but up to you :)
If the SPI fixes aren't in then I don't think the esp32spi ones will be too useful (although you can cheat and use half baudrates)
@idle owl @tidal kiln There's a difference between README.rst and the method name in https://github.com/adafruit/Adafruit_CircuitPython_CLUE - one is display_clue_data and other is simple_text_display - one of those needs correcting, I think?
My IP address is 192.168.1.108
IP lookup adafruit.com: 104.20.39.240
Ping google.com: 30 ms
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
----------------------------------------
This is a test of Adafruit WiFi!
If you can read this, its working :)
yes, but those are the ones that I thought we wren't going to commit?
yeah i dunno, dan merged this and the i2c fix
@simple pulsar looks like the function name was changed here:
https://github.com/adafruit/Adafruit_CircuitPython_CLUE/commit/6bbc40ac5eee08b93dd41226fec48beb6de234ec
but the docs weren't. want to open an issue for that?
or even better, PR updates ๐
common_hal_digitalio_digitalinout_construct is definately receiving a duff pin from displayio, but I don't know why yet....but its not a fault in that routine. I'm printing the pin and pin->mux_reg, first two are fine (setup of the SPI), third one it falls over;
>>> import test.py
Starting
(6004a410) Init 401f804c
(6004a330) Init 401f802c
(20204a70) Init 0
cu: Got hangup signal
Tomorrow I'll compare the spi init and parameter collection with the displayio one, that should lead me to the issue. Time to knock off for tonight now.
Bought a CLUE, woot woot
ill let @dhalbert decide as this is not code related and imx is super alpha ๐
@indigo wedge ok home!
IkigaiSense Vita VID 0x239A PID 0x0093 # bootloader
PID 0x8093 # arduino
PID 0x8094 # circuitpython
@fallen anvil what I'm saying is, it's a mistake to pass a DigitalInOut to that function, it should be a microcontroller.Pin. however, that said, there might be examples showing the other, and they might work by coincidence on other platforms, for all I know.
I have already made a 5.0.x branch, so we are free to merge new stuff into master, and I'll go ahead. We can choose to merge these and further changes into 5.0.x for 5.0.0 now or later. I'm thinking about maybe making an rc.1 soon just to test the new download links, so I might merge this in to help test that.
I was going by arduino_zero, but we have a UF2 bootloader for that too, so I could make all three be BIN_UF2.
Thanks, I didn't realize that, and maybe I should delete tools/upload_release_files.py too. It does make me think about the mpy-cross actions; they don't get uploaded anywhere, is that right?
@onyx hinge @fallen anvil It is definitely a problem that some displayio constructors are not validating their args. I'm working on a PR. You do need to pass pins and not DigitalInOut's. If you saw some code that is passing DigitalInOut's, could you point to that so we can fix the example? Thanks.
@tulip sleet I didn't, except for what mubes posted. but I didn't do a deep dive; maybe they can say if they were following an existing example.
i looked at the ILI9341 library and didn't see that, but it certainly could be somewhere else.
It does make me think about the mpy-cross actions; they don't get uploaded anywhere, is that right?
Correct. Jeff proofed them out build-wise, but there hasn't been anything done with them since. My thoughts are here: https://github.com/adafruit/circuitpython/pull/2551#issuecomment-578452197
There was some missing pin argument validation in displayio, and when starting to fix that, I decided to simply how pin argument validation and free pin checking was done.
- Replace
assert_pincompletely, and subsume most uses ofassert_free_pin()by adding the new routinesvalidate_is_free_pin()andvalidate_is_free_pin_or_none(), which check whether anmp_obj_tis a pin and return anmcu_pin_obj_t *if it is. This reduces several lines of code to one, improving readabilit...
@onyx hinge @tulip sleet I don't honestly remember where the starting point for that code was, but I fixed that specific issue early on in the test routine so it's not my underlying issue. I'm pretty sure I can find it from this point by comparing and contrasting the spi initialisation and the displayio stuff...spi works for me! Just got to find the time. You can be 90% certain that this is self inflicted rather than something in the platform. I'll post when I've got updates. Hopefully during today but can't be certain.
@onyx hinge @tulip sleet Found it. Yup, self inflicted, as expected. At some point late yesterday evening it seems that I managed to revert the test code to start using the DigitalInOut pin again...so it was indeed using an inappropriate object to construct the FourWire. I suppose, in mitigation, I found a missing parameter validation, but wasted an entire evening in doing so. Sorry for troubling y'all.
@fallen anvil that is frustrating, but take heart that the rest of us didn't spot it immediately either, and thanks to this discussion @tulip sleet will make it better for everyone
@lone axle Returning to old conversation, it turns out that Label has an undocumented scale named argument inherited from the (strange?) parent class of displayio.Group - so text_area2 = label.Label(terminalio.FONT, text="Something", color=0xFF0000, scale=3) works
I suppose the followup to that is if it's undocumented should I be using it?
Ah, good catch! I don't know for sure but I think it might be subclass of Group because each letter is it's own sub object
which is also why it has a maximum number of characters, because the group has to be initialized with a certain number of children, and I think it might not be able to grow.
scale() is documented on the Group docs but looks like it's getting left out of the label one since it's part of the parent class.
I would lean toward it being okay to use, I think it's just a quirk of how the docs page is getting displayed. But I don't actually know for sure. If it's removed or changes significantly in Group it is going to affect Label also, but I think it's probably unlikely that scale() would get removed or drastically changed.
@slender iron Back on storing strings/constants/immutables in flash and not bringing them into RAM, there is mention of this in micropython world if I'm understanding the notes in http://docs.micropython.org/en/latest/reference/constrained.html#execution-phase - it talks about using micropython.qstr_info(1) to allow the programmer to do an "aided PROGMEM" style setting of strings. Doesn't look like great approach for novice programmers.
@onyx hinge yeah, I don't stress on it too much, but when you've only got a limited amount of available time to do things in it's frustrating when you waste it by not being methodical. Oh well, I'd like to say I'll learn from it, but it's doubtful ๐ฌ
Has anyone seen the colour sensing values freeze from CP 5.0.0.beta5 on CircuitPython? I just saw it on REPL but no clear cause ```>>> clue.color
(811, 500, 481, 1857)
clue.color
(806, 497, 478, 1847)
clue.color
(653, 394, 365, 1064)
clue.color
(653, 394, 365, 1064)
clue.color
(653, 394, 365, 1064)
clue.color
(653, 394, 365, 1064)
clue.color
(653, 394, 365, 1064)
I have seen that happen once as well.
I never did figure out a cause or reliable way to reproduce, and it hasn't happen within the larger project that I used the color readings in.
Another peculiarity on the CLUE: clue.white_leds = True ; clue.white_leds = False most of the time will blip the two white LEDs on very briefly in a non-blinding manner. About 1 in 15 it'll leave them on for maybe (guessing) 200ms which is really obvious visually because of the bright burst of light
383ms to be more precise ```>>> t1=time.monotonic() ; clue.white_leds = True ; clue.white_leds = False ; t2=time.monotonic() ; print(t2-t1)
0.382813
t1=time.monotonic() ; clue.white_leds = True ; clue.white_leds = False ; t2=time.monotonic() ; print(t2-t1)
0.0
t1=time.monotonic() ; clue.white_leds = True ; clue.white_leds = False ; t2=time.monotonic() ; print(t2-t1)
0.0
t1=time.monotonic() ; clue.white_leds = True ; clue.white_leds = False ; t2=time.monotonic() ; print(t2-t1)
0.0
You might try 5.0.0-rc.0. Not sure if anything clue releated changed from beta5 but worth a try.
0.0
>>> t1=time.monotonic() ; clue.white_leds = True ; clue.white_leds = False ; t2=time.monotonic() ; print(t2-t1)
0.0
>>> t1=time.monotonic() ; clue.white_leds = True ; clue.white_leds = False ; t2=time.monotonic() ; print(t2-t1)
0.382813
Thanks, will load it up later
Interesting. I wasn't brave enough to play with them at full brightness too much, but I did use them via PWM for this project: https://github.com/FoamyGuy/CircuitPython_CLUE_Deluminator and I don't believe I ever saw anything weird like that using them that way.
If you try the same test with the regular on-board LED I wonder if you get similar weird delays occasionally
0.0
>>> t1=time.monotonic() ; clue.red_led = True ; clue.red_led = False ; t2=time.monotonic() ; print(t2-t1)
0.390625
>>> t1=time.monotonic() ; clue.red_led = True ; clue.red_led = False ; t2=time.monotonic() ; print(t2-t1)
0.0
``` ๐ฑ
weird
I just power cycled to get the resolution of time.monotonic() up and it only did it once on the first run.
maybe try directly with pin instead of the library if you have a moment.
387ms looks like the magic number here. That's a fraction over 3/8 of a second.
5.0.0-rc.0 does it too but the magic delay is ~ 275 ms
Trouble at mill:
Adafruit CircuitPython 5.0.0-beta.5 on 2020-02-05; Adafruit CLUE nRF52840 Express with nRF52840
>>> from adafruit_clue import clue
>>> import time
>>> print(time.monotonic())
38.242
>>> t1=time.monotonic() ; clue.white_leds = True ; clue.white_leds = False ; print(time.monotonic()-t1)
0.386993
>>> t1=time.monotonic() ; clue.white_leds = True ; clue.white_leds = False ; print(time.monotonic()-t1)
0.0
>>> t1=time.monotonic() ; clue.white_leds = True ; clue.whit...
5.0.0-rc.0 is different because of https://github.com/adafruit/circuitpython/pull/2601. Since you're running on the CLUE, this may be due to displayio and display refresh. Try the same thing on a board without a display.
@meager fog has anyone made a video game on the CLUE yet?
I had a quick play with board.DISPLAY.auto_refresh=False and I've not managed to get it to go slow with refresh off...
Is this just because of the very slow scroll of the screen and that those screen updates can happen in between any python instruction even ones that aren't outputting to the screen?
you could try releaseing the display
The manually initiated refresh does measure at the same value.
>>> board.DISPLAY.auto_refresh=False
>>> t1=time.monotonic() ; clue.red_led = True ; clue.red_led = False ; print(time.monotonic()-t1)
0.0
>>> t1=time.monotonic() ; clue.red_led = True ; clue.red_led = False ; print(time.monotonic()-t1)
0.0
>>> t1=time.monotonic() ; clue.red_led = True ; clue.red_led = False ; print(time.monotonic()-t1)
0.0
>>> t1=time.monotonic() ; clue.red_led = True ; clue.red_led = False ; print...
@arctic violet not yet ๐
@indigo wedge silly Q - whats the diff between the RT1011 and RT1010? i can only find them selling 1011 but datasheet for 1010
Ok, I ordered one to take a swing
1010 seems to be the name of the sub-family and 1011 is the actual chip
There's no 1010 chip
Bumps rake from 12.3.2 to 12.3.3.
Changelog
Sourced from rake's changelog.
=== 12.3.3
==== Bug fixes
- Use the application's name in error message if a task is not found.
Pull Request #303 by tmatilai==== Enhancements:
- Use File.open explicitly.
Commits
- [
5c87c46](https://github.com/ruby/rake/commit/5c87c...
Images automagically compressed by Calibre's image-actions โจ
Compression reduced images by 42%, saving 8.37 MB
| Filename | Before | After | Improvement |
|---|---|---|---|
assets/images/boards/large/arduino_nano_33_iot.jpg |
209.25 KB | 62.03 KB | -70.4% |
assets/images/boards/large/clue_nrf52840_express.jpg |
323.71 KB | 96.22 KB | -70.3% |
assets/images/boards/large/espruino_pico.jpg |
... |
@indigo wedge ok cool ! im going to make a 'arduino uno' shaped board to start - large but easier to prototype/debug/fit things
like boot switches ๐
i had it mostly done but now i can check against working schems instead of guessin' ๐
That's always good :D
I'm waiting for rev 2 boards of my Feathers to arrive :)
@indigo wedge the evk has an auto-reset chip (UM803) ... did ya never see a reset/boot failure?
also, ya have SD_13 is grounded but can't figure out what for - just a routing thing?
Yes it has a reset delay chip but I never had problems without it
kk i might toss one on and DNP
ive seen the feather m7 'not boot' on power up a few times
could be unrelated
Watch out for the power sequencing errata. Don't know if it applies to the 1010s but on the 1020s you have to bring up the battery supply a couple of mS after the main supply...it's in the errata.
The not boot is probably down to that.
SD_13 is low because it's BT_CFG3 and it needs to be low for reasons that escape me now
@indigo wedge do you use the boot fuses or have the full set of pins pulled?
i use pins cause i couldn't figure out how to burn fuses until recently
mubes yeah i believe its the same on the 1010 and that's why the delay chip is there but i've never seen that problem
I have :-(
@indigo wedge one thing, no biggie but noticing as i compare EVK and yr schem - there's a lot of DNP caps you place
The delay chip pulls it out of reset after the supplies are stable but doesn't affect the relative timing of the two supplies.
@meager fog have you looked at the hardware design guidance document?
I followed the hardware design document for those
im using the EVK for now
im placin' all the DNP - wonder why they dropped them on the evk
It lists at least one 0.1 and 4.7 on that and more nets
npnp
ill also get the hardware doc
i like those cause you can tell it was written by frustrated apps engineers
It's actually a pretty good doc...nice and clear.
My Feather has even more caps, I had to remove like 3 or 4 on this one cause of space
But each net has at least one of the recommended ones
~the most caps~
It was the first one I designed so didn't want to undercap it :D
1010/1020 are a bit over the top because they assume two layer.
im gonna try to 2 layer this metro
I can probably remove some one mine too
Good luck. I did first rev 2 layer and immediately went to 4...signal integrity wasn't good.
My grounds were shoddy though.
Yeah I attempted 2 layer on yours first but the was no way to route power and have good ground
But on a arduino sized board it might be possible
Way larger
I'm impressed I managed to get 4 layer for the 1062 even :D
Versiboard2...a 1020 with can,rs485, ethernet, WiFi, by and a pi header....pretty much a kitchen sink board.
Already runs CP :-) that's what I'm working with. It's open source but I'm not intending making any commercially...if anyone else wants to they're welcome.
wow thats a pretty big hobby project ๐
1062 has some awesome peripherals and would make a nice board but it would require way too much SW dev for my liking :D
here's the DRAFT of the upcoming โPython for microcontrollersโ newsletter that ships out tuesday at 11am ET via adafruitdaily.com - please send any links, news, events and more via an issue/PR, or @ us or really any thing ๐ we'll get it added! https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2020-03-03-draft.md
For circuitpython library, is it intentional that the apds9960 RGB sensor is initialised to run at about 1.4Hz?
Could this also be a possible explanation for clue.color() data freezing when using it in REPL mode? In the unlucky case the long pause for a display refresh might occur during some i2c operations in python code. I'm wondering if 200-400ms could be long enough to break stuff there?
@meager fog sorry, was diverted running an ice hockey match. Yes, it was a bigger job than I expected to be fair, especially since I wanted to do the EMC/ESD properly. It actually ends up a really useful board cos I can plug most pi hats straight onto it. Trouble is the pins on the pi header are the boot selection pins so you generally have to burn the boot fuses if you want to use that (mostly cos I wanted to experiment with the boot from sd functions)
huh
@indigo wedge obviously gone into stealth mode, but not intentionally :-/ not sure what happened there. Could do with producing a new rev that tidies up a few flappy edges (move from bcm to esp32 for WiFi, change a bit of pinning) anyway.
Using the 100 pin? Would be really handy if you made sure Swo is available on the debug header....
oh yeah i gotta find SWO
Nice, is that first adafruit arduino form factor with type c?
P1_14/GPIO1[7]/U1_RXD/EMC_D7/T0_MAT2/SGPIO10
yeah
its actually a ripped up metro airlift
@fallen anvil 1011 only comes in 80 pins
P1_14/GPIO1[7]/U1_RXD/EMC_D7/T0_MAT2/SGPIO10P1_14/GPIO1[7]/U1_RXD/EMC_D7/T0_MAT2/SGPIO10
is swo
Ah, didn't know that....
We'll, acrually, I think I did somewhere in the back of my head, but I didn't pull it out.
My 1062 Feather LCD header breakout pcb is delayed, really want to try to get that working with displayio
wait no thats wrong part of schem
Well, displayio deffo works on imxrt ๐
@mrubes do you remember whats the hardware app note?
I'm not home at the moment, I'll dig it out in a few hours. It's not actually an ap note, I think it's called something like the hardware design manual. I've only dealt with the 1020 version though.
Yeah, and it's pretty low profile...you can easily miss such a useful doc.
Ping if you find it, otherwise I'll dig it out later.
I never did get to the bottom of using a rechargable battery (Panasonic ml10 or similar) properly on these boards, but it would be really handy to have cos it enables rtc and non volatile storage.
swo is the thing that lets you do debug prints that show up via j-link, not over the repl?
Hi, I read in some old blog posts going back to 2017 that the Feather M0 Wifi cannot run with wifi with Circuitpython? Is that still the case? (bought my 1st one this week - I hope it does !)
@hybrid flume Unfortunately, I think that is still the case. There's just not enough resources (not sure if RAM or ROM/flash is the limiting factor) to include the required functionality for wifi and circuitpython at the same time. You can use it with the Arduino environment, and there may be a way to use it with circuitpython but without the wifi functionality.
Broadly matches the implementations of the NRF and Atmel ports. Uses the STM32 TIM7 peripheral, a basic timer that is not tied to any pins - since the HAL support for the basic timers is limited, contains a little more register micromanagement than usual. Tested on STM32F405 Feather.
seems pyocd just got rt1010 support https://github.com/mbedmicro/pyOCD/pull/803
GitHub
Add board support for following boards:
mimxrt1010-evk
mimxrt1015-evk
Add device support for MIMXRT1010 and MIMXRT1015
Signed-off-by: Ryan QIAN jianghao.qian@nxp.com
@indigo wedge ๐ฎ'd and ready to route the gpio
Two layers? An ESP32, a USB-C, and that other high pin count chip? I don't know what you're building, but colour me impressed.
@fallen anvil do i implement i2c/spi/uart with flexio or use the lp peripherals
lp peripherals, no flexio support in code yet
ahh ok ill look at the mux options
@fallen anvil the SDK fix is merged now https://github.com/adafruit/MIMXRT10xx_SDK/pull/1
The 5.0.0 is gonna be a good one ๐
Muxing is a pain on the 144 so lord knows what it must be like on the 80!
its eaier..no options
like there's no way to have SPI2 ๐ฆ
cause SCK is either on the QSPI flash or on the SWDCLK pin
<voiceofexperience>make sure you optimise the ground returns on the qspi</voiceofexperience>
I'm home now...did you find Swo?
Great, means we can use Orbuculum to do performance monitoring and optimisation.
https://github.com/orbcode/orbuculum (i had to search)
That's how I produce the 'top' style outputs.
so this is substitute for the expensive J-Trace?
Which debugging probe do you use?
(I am thinking of chips other than i.MX at the moment. SAMD51 is not supported by the BlackMagic.)
Sort of...it only does sampling rather than exhaustive trace (there's some experimental FPGA trace in there but it's not cooked yet) but it's good enough for a lot of applications
ok lookin for i2s pins next
could I use an ordinary J-Link Basic? Do you know?
Works for a lot of probes. When I'm feeling lazy I use jlink...can get 50mhz out of that
Yes
ah, great, this is great new info
I guess I am 'orbcode', so I know a bit about it :-)
Goto www.shadetail.com and read forward from the first article (but skip the ones on visual studio code)
You need samd51 in bmp?
you are orbcode, is that what you're saying ?!
Yup
@indigo wedge haha what is this MQS thing? its an internal I2S->HFPWM??
Run away!
you have multiple identities ๐
Afaik it's intended for things like ringtone generators
haven't really looked into the Medium Quality Sound thing
Fraid so, you have no idea : ๐
i don't personally need samd51 in bmp, because i have a jlink, but it was disappointing that samd51 wasn't added to it (at least the last time I looked)
I guess we can add it...just never been a fan of the sam51 stuff. What reference board?
our metro m4, feather m4, etc. we use it for many boards
The big issue in bmp at the moment is keeping the probing sane...the idea of bmp is that it just works, but that needs probe support, which gets painful when the probe for one thing Bork's another.
it says nRF52 is supported, but does that include nRF52480?
Tbh i was thinking about putting the 'guts' of bmp as c under cp...then we could run scripts on the target interface
we sell the BMP, and I have one, but I have a jlink too, so i didn't have a strong reason to switch
Yes...there's one report of a problem but I can't create any issues.
Actually, I think the ball is in my court to do more testing.
@indigo wedge any interest in i2s? i didnt see any notes in your schem
Uwe is the main coder on it nowadays....I sort of kick around on the edges and shake out specific issues.
nope, totally skipped that one
Actually, I think imxrt support is the one thing I want to get into bmp.....jlink always feels a bit fragile on it.
@indigo wedge k ya exposed it on D9-D13 - lucky you ๐
@tulip sleet it's worth noting that Swo will interface even with a simple uart interface as long as you keep the baudrate low enough.
so it's sampling, like you said, I thought it was only for high-speed tracing, that's good to know. I'll take a look at all this. The orboculum stuff will be very useful for profiling, which we have not done a lot of. tnx for all this info!!
yeah we use almost all pins on the 1011 anyway so chances are we expose almost everything
Orb needs more users to start kicking it around and shaking through any bugs. It will do sampling, 32 separate channels of software debug (ASCII or ints or whatever) and 'exceptions' (interrupts) counts and timing. There's also some basic support for profiling using the GNU tools and code performance investigation using kcachegrind....but that definitely needs some love.
Swo is desperately underloved :-/
i will read about it, definitely
@indigo wedge yeah just noticed im short a few pins. i wonder if i can reuse the BOOT pins as outputs :/
this is where i'm a bit unsure, because you can disable the boot pins via a fuse
but you also need them to get into rom bootloader mode
yeah i just need one pin ๐
no.. 2
one for esp cs
and one for esp gpio0
i guess no separarte UART 4 u esp
...but their drivers are MIT iirc? Takes a long while to change the direction of an oil tanker I guess....
Ah, BSD. Same difference, different coast :-)
I know you've not got the earth planes in yet, but pin4 of the QSPI needs to come directly back to the CPU ... pin 63 & 71 at least if you can (assuming I've counted right)
..or am I reading it upside down?
I am, sorry, gnd isn't in yet :-/
gnd isnt visible
ya i hide em ๐
and we'll see where we are
if i need, can always ez make gnd layer in a 4 layer pcb
and signals are outer
You've potentially got 133MHz going through there....it's pretty much the only bit of tracking I'd stress on (besides trying to get the USB something like)
yeah i wish i didnt have to use vias
but like for some reason they didnt align the gpio pins in order!?
i see this on the samd51 too
whyyy
I know that works :-)
...but I do have the luxury of 4 layer
Slightly outdated, but that's pretty much the current layout.
hmm do i have the chip flipped
sweet board mubes
opposite to mine, but IDK if thats how your pinout is arranged on the 80 pin
passives on the back...means jlcpcb can do that stuff and just leave me with some soldering practice :-)
yeah, very. Can you snapshot that part of your CD?
the layout?
the QSPI part of your circuit diagram
this might make a nice CPY candidate cause built-in wifi and usb
i have the beta dev kit but on that one the usb doesnt work
yayy
maybe ๐
maybe clue would be nice with wifi too
maybemaybemaybe
@fallen anvil i think so
gRoUnDpLaNe TiMe
Right, really should get onto what I came in here to do :-)
like why go with an 80 TQFP $1.50 thing
and then go with uson flash??
hah ok sorry for distracting u!
no, someone elses' problems are always more interesting, 'cos you can walk away from them
Yay SOIC
@fallen anvil there should be a discord for routing boards ๐
and we all just route each others'
i think im in good shape
like #help-with-hw-design ? ๐
I like that plan :-) @faint galleon has a 'manufacturing' one which is quite handy
really? I thought you were... @faint galleon is here and green, so I guess he can pick this up and send you an invite
I'll see if I can figure out how to shoot you one. I'm not good with technology.
thanx
yay, squashed a ulab bug with unusual slicing and added more tests
I know of some other hardfaults, will work on some of the next session
This makes me very happy. Only about 30 hours since I started actually working with the python and I've got a network synchronised clock with sht21 temperature and humidity. Impressive platform, kudos to everyone involved!
@fallen anvil ๐ what are you using for network, an esp breakout?
The first time we did this it took a one year project, but that was 20 years ago; https://www.researchgate.net/profile/Dave_Marples/publication/228885910_The_Internet_Alarm_Clock-A_Networked_Appliance_Case_Study/links/5405c76c0cf2bba34c1d9553/The-Internet-Alarm-Clock-A-Networked-Appliance-Case-Study.pdf
Yes, just an ESP32 running the NINA firmware. These boards support MURATA 1DX modules but frankly the ESP32/NINA is less painful and cheaper.
yeah agreed- i did the math and given that the esp32 does tls and certificate storage for you...
its not worth working with a raw wifi chip - unless you need really fast speeds the esp32 maxes out at 8mhz
Yep, there's a lot of stuff ends up on your own firmware if you don't use those...which means a whole new set of bugs.
iwrote a tcp stack once and im not doing that again
Well, I was looking at that, there's a QSPI interface available...
woohoo
i tried rerouting the qspi pins so they go around
but i didnt like it so much
i feel this is better :/ will see
2 layer still
Will be interesting to see what the signal integrity is like. The board is quite small so perhaps you'll get away with it.
the issues you had were with qspi skew?
i prioritized the qspi and usb traces since the app note seemed to be very specifica bout em
Metro M7. it sounds soo good! ๐
Just corruption above about 80MHz... Yes, they're important, and the gnd return paths are just as important - those loops are antennas
No, in the flash config. The first chunk of the SPI is read out that contains the boot configuration for the pins. That's done SPI at 30MHz....then it's up to you how fast you go.
oh thats the little structure you put in the beginning?
...of course, you go too fast, you have a problem.
Yes, there are a few of them; the SPI config, an initial vector table for the runtime and 'dcd_data' which can be used to configure pins on the chip without user code. It gets aweful complex aweful fast. tinyuf2 is a much easier and less painful approach cos it does all that stuff for you.
๐ฅฑ ok i have to take a break, been routing for a few hours and my eyes ache
yeah, I'm off to bed. Night.
ill order these PCBs and see how they go ๐
[adafruit/circuitpython-org] Pull request review submitted: #416 Bump rake from 12\.3\.2 to 12\.3\.3
This includes a bunch of compressed images, but I think this is fine. These don't run on forked PR's, so they finally get a chance to run on this one.
time to dust off the xtensa port I guess... any place to buy an evaluation board yet? (re: ESP32-S2)
this looks like a fun chip that could use a circuitpython driver! https://www.sparkfun.com/products/15734 -- not exactly sure how it compares to https://www.adafruit.com/product/2045 except I see the VersaClock (sparkfun) part's datasheet has a low end of 1MHz out while the Si part goes down to 8kHz
The SparkFun Clock Generator 5P49V60 breakout board offers a wide range of custom frequencies and signal types using a single reference clock!
I think the granularity of the SP49V may be much finer, based on some cursory time with a datasheet
To retain correct order of writing in Arabic, this file has been created to test an alternate means of displaying messages
@tannewt I opened a new file for the Arabic translation for us to test an alternate way of displaying messages so that the Arabic writing of words retains proper order in a sentence with English words. Whenever you can, please test it out and screenshot the result. I also added commented lines of the displayed message strings within the code so you can see how it's supposed to be displayed.
Hope this resolves things!
Some time back, I fuzz-tested mpy-cross, and found two classes of crash due assertion failures. These changes turn those failures into SyntaxErrors instead. They may also fix an assertion failure crash on real devices.
@slender iron I'm thinking I'll make an rc.1 today that incorporates the "download from s3" fixes and the minor i.mx fixes. No other code changes. That will vet the s3 downloads links, avoid the release assets problem, so that rc.1 -> GA will be painless.
and make the i.mx release work at bit better
This is in prep for 5.0.0-rc.1.
- Merge in a small number of i.MX-related changes to improve 5.0.0 usability for i.MX.
- Already merged to 5.0.x from previous PR are the changes to not upload assets to github releases, but instead rely on S3 downloads. https://circuitpython.org/downloads is already changed over. This will avoid the need for any manual fixups for the 5.0.0 GA release.
There are no code changes to CircuitPython itself except for the i.MX builds.
Is this a bug? I'm trying to update text on a Label: ```Adafruit CircuitPython 5.0.0-rc.0 on 2020-02-26; Adafruit CLUE nRF52840 Express with nRF52840
import board, terminalio
from adafruit_clue import clue
from adafruit_display_text import label
d_text = label.Label(terminio.FONT, text="One", color=0xff0000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'terminio' is not defined
d_text = label.Label(terminalio.FONT, text="One", color=0xff0000)
d_text.x=100
d_text.y=100
board.DISPLAY.show(d_text)
d_text.text="Two"
d_text.text="Three"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_display_text/label.py", line 203, in text
File "adafruit_display_text/label.py", line 130, in _update_text
RuntimeError: Group full
@simple pulsar the max number of characters in a Label is set at its creation time, because the number of items in a groups is set at group creation type. If the argument is not specified, it is the length of the initial text.
@onyx hinge I would like to pop a couple of questions in the weeds tomorrow. Do I write it up now, or does that happen during the meeting?
@lapis hemlock it's best if you add at least a small text to the "in the weeds" section, so we don't end the meeting prematurely. Write up as much or as little as you want.
OK, thanks!
talk to you tomorrow!
@onyx hinge I'm looking forward to it. Do you want to merge your changes? Thanks, by the way! In the past week, you have been quite busy with ulab. I really appreciate it.
@lapis hemlock thanks! I think the slicing PR is ready for merge, so feel free.
@onyx hinge Thanks, I hadn't realised it was related to the length of the initial string. Someone before had mentioned that each character was treated as a "thing" - i forget the term.
@simple pulsar yes each character is a TileGrid within a Group. (this means they also use a surprisingly large amount of memory!)
This assumes you have properly install afl-fuzz with afl-clang-fast.
Tested with AFLplusplus 2.60c-75-g2c6847b.
@onyx hinge Do you think there's an argument for making the exception more informative/specific to the issue?
@simple pulsar If so that would be an issue/PR against https://github.com/adafruit/Adafruit_CircuitPython_Display_Text I suppose. I don't have a strong feeling about the matter.
the library could catch the exception and re-throw it with a better message. I agree it's confusing
yes basically what dan said
it's already there https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/issues/11 ๐
I retitled the issue
(making groups resizable in the core could also solve the problem and get rid of max_glyphs..)
I wrote draft release notes for rc.1, for those of you who can see the drafts.
Group full messages can be confusing. Could we make Group not need a size limit? It could be like a list, or it could resize itself as necessary.
See for example https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/issues/11
- Add S3 download button for Past Releases, since future releases will only have assets on S3.
- Update download blurbs.
@slender iron + anyone else interested: I've got a basic version of the BLE patchwork demo for CLUE working and put it here for now: https://github.com/FoamyGuy/Adafruit_CircuitPython_CLUE/tree/master/examples/clue_ble_color_patchwork
Right now scanning is mostly manually triggered with a button press, should it happen automatically on some schedule? It's also hardcoded to 8x8 grid size, but I've tested 15x15 as well. I'm not sure how big of a scan results list will be expected in an environment like pycon, I had planned on adding some logic to choose the best size from a few as the list grows.
Would this lead to accidentally adding groups (which is what the limit guards against) and getting an even more confusing out of memory error?
make group.size a settable property, possibly increase-only? that would prevent "accidental" addition of groups, since you have to explicitly ask for the increase. it would address the label use-case for not requiring the size to be specified upfront.
Automated website update for release 5.0.0-rc.1 by Blinka.
@ladyada I built Linux from scratch successfully twice but never again. ๐๐
s/ada/ada
Dagnambit.
I almost have the hardware build of my Little Red Rover complete! After that is done I can continue working on the really fun part - the software.This is an all Adafruit build. I just have to make one cable to complete the hardware and do a little cable management. It will use a VL53L0X for distance checking.
I have already written and tested a lot of code for it.
s/for it./for it. ๐๐
I do not like the Android Discord app! ๐๐ฃ
@indigo wedge will fix, and you're welcome!
[adafruit/circuitpython] Issue opened: #2674 Publishing a release runs the same set of actions twice
When I publish a release, I see two GitHub Actions jobs starting. Both build everything and upload to S3. Is this some side effect of a release publish, or could we get rid of one of these?
