#avr Logs

Sep 09 2022

#avr Calendar

03:27 AM LeoNerd: zns: I usually just hook up the serial port to stdout, and then printf()
03:42 AM nohit: https://www.nongnu.org/avr-libc/user-manual/group__stdiodemo.html
03:42 AM nohit: https://www.nongnu.org/avr-libc/examples/stdiodemo/
03:42 AM nohit: avr libc has a tutorial for using stdio
04:01 AM exp: they left btw :)
04:03 AM nohit: ah ok
04:05 AM exp: also i saw a weird behaviour when using stdio printf hookup, failing to terminate a string with an \n lead to a weird code compiling issue
04:05 AM exp: didn't have time to debug it but i'm going to just assume microchip studio is to blame
04:47 AM nohit: i prefer the newlib way of doing things, you just implement syscalls like _write() and bob's your uncle
05:19 AM LeoNerd: newlib?
05:28 AM twnqx: i only know newlib from arm. it's a different, small libc replacement for freestanding applications
07:38 AM skempf: Thanks Thrashbarg and Phantom.
08:16 AM nohit: LeoNerd: newlib is the de facto libc for embedded systems
08:41 AM twnqx: my embedded system runs linux :P
08:41 AM LeoNerd: I think that's quite a different sense of scale in the word "embedded"
08:41 AM exp: i think that word long ago lost any meaning
08:42 AM exp: i struggle to define a clear line between say freertos running on an rp2040, and some 5950x
08:42 AM twnqx: meanwhile, on said embedded system
08:43 AM twnqx: i am poking the QSPI controller from userspace
08:43 AM twnqx: bypassing linux
08:43 AM twnqx: because i accidentally flashed a kernel that is incapable of writing to the QSPI chip that is mounted
08:43 AM twnqx: *sigh*
08:43 AM exp: QSPI in general seems to be a bit of a mess
08:43 AM twnqx: oh it is
08:43 AM exp: the rp2040's code for exiting it doesn't even seem to work reliably on all winbond parts
08:43 AM twnqx: i have 6 different 32MB QSPIs here
08:44 AM twnqx: 4 fail to boot on the cpu
08:44 AM exp: they claim to have picked a common option, but i think they read the first datasheet they could find
08:44 AM twnqx: 2 work :D
08:44 AM exp: that's odd, and concerning as i have an rp2040 board coming out of the oven shortly
08:44 AM exp: that chip?
08:44 AM exp: or different one?
08:44 AM twnqx: different
08:44 AM twnqx: microchip sama5d27
08:44 AM exp: excellent, i'll have only the classic raspberry pi incompetence to worry about then
08:45 AM exp: the concern for me is warm boots
08:45 AM twnqx: also it's only an issue because the chip is also fused down
08:45 AM exp: they have some internal stub code for exiting QPI so that normal boot process can start
08:45 AM exp: but instead i'll have to self manage to use the correct code to exit
08:45 AM twnqx: it boots from ISSI and Elite Semiconductor, but fails with... Gigadevices, Micron, Winbond, Spansion
08:45 AM exp: are they missing 0x3F or whatever?
08:45 AM exp: or is their QPI enter code different?
08:45 AM twnqx: i have absolutely no idea what's the issue
08:46 AM twnqx: it is the bootrom that has issues
08:46 AM exp: fair enough
08:46 AM twnqx: we even logged it with a quad scope, and it looked good, except the data lines after the commands that should work drift to high impedance
08:46 AM exp: i will be in this hell soon twnqx so if i can help in future i'll try :)
08:46 AM exp: you know there are clock phase options?
08:47 AM twnqx: oh, of course
08:47 AM exp: i don't mean to be patronising, just checking
08:47 AM LeoNerd: "A stopped clock may be right twice a day, but a wrong SPI clock is never right at all"
08:48 AM twnqx: but prior to boot, writing works
08:48 AM twnqx: kickstarting the stage 2 loader works
08:48 AM twnqx: kickstarting the bootrom - i seem to remember - works
08:48 AM twnqx: just not automatically
08:48 AM twnqx: which would indicate a strategic delay is missing
09:08 AM exp: funnily enough LeoNerd i have just resolved a problem that has been plagueing me this week
09:08 AM exp: usb clock not running at /quite/ 48mhz
09:08 AM exp: still functions... most of the time
09:47 AM LeoNerd: Mmmmm
09:47 AM LeoNerd: Fun
09:48 AM LeoNerd: 48ishMHz
09:50 AM qu1j0t3: 48.ISH
09:50 AM qu1j0t3: the age of everyone in here
09:50 AM * qu1j0t3 runz
10:02 AM exp: i'd run but my knee aches
10:07 AM qu1j0t3: hahahaha
10:07 AM qu1j0t3: your knee Hertz
10:14 AM exp: it MegaHertz :(