#avr Logs

Jun 23 2021

#avr Calendar

02:51 AM specing_ is now known as specing
04:21 AM twnqx: quick question... how do you even program STM32 that don't have USB? those with USB can be forced into a bootloader, but the others?
04:25 AM nohit: i think all the chips have the built-in bootloader, not just USB ones, if that's what you mean
04:25 AM twnqx: ok, i need to have SWCLK, SWDIO and NRESET routed to a header
04:26 AM twnqx: currently thinking about features/pins - i think i need an I²C, an SPI, and 3 GPIO
04:26 AM nohit: https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf
04:27 AM twnqx: ohhh cool
04:28 AM twnqx: so basically, i could share the I²C
04:28 AM twnqx: thanks for the pointer!
04:29 AM nohit: np
04:32 AM vmt: swd/jtag, you don't necessarily need nrst
04:44 AM vmt: the chip can be reset through swd, so unless you use swdio/clk pins as i/o, you don't need it
04:46 AM twnqx: sure, i just prefer to set up a standard interface
04:47 AM twnqx: e.g. what do i physically need to trigger boot loader on an unprogrammed chip (seems boot0, which conveniently is swdio on this chip, too), what can i run the bootloader on (uart/i²c here), ...
04:48 AM twnqx: might want to break out a header for uart anyway, debugging with text output is always nicer
04:53 AM vmt: well... you can do ocd as well
05:08 AM twnqx: right, i actually found a chip on the market, surprise!
05:09 AM twnqx: and so the hoarding continues.
05:44 AM vmt: stm32?
05:51 AM vmt: most chips seem out of stock, some bgas still left. for the small m0+ chips there seems to be some wlcsps left >:D
05:51 AM vmt: wrt st, that is
06:04 AM twnqx: STM32G031G4U6, yes
06:05 AM twnqx: only need to emulate an I2C eeprom, an SPI EEPROM, and sequence a few resets :P
06:05 AM twnqx: need to deliver 20 boards, assume 3 internal spins on top, so i am hoarding 50 now
08:02 AM vmt: twnqx: mouser? ;D
08:03 AM vmt: they've only got some one hundred, i'll beat you to it
08:04 AM vmt: but yeah, seems like a decent fit. m0+, nice and small and in qfn
08:08 AM twnqx: too late, already placed the order when i told you
08:08 AM twnqx: i don't care what the customer will do afterwards. they claim they'll need 1k next year
08:08 AM twnqx: (i am the reason they only have one hundred, was 150 earlier :P)
08:09 AM twnqx: i don't like fine pitch BGA because it usually ends up with HDI PCBs
08:09 AM twnqx: like those WLCSP chips :/
08:10 AM * twnqx looks at current design of 6 layers in 0.8mm final thickness PCB, with via-in-pad and all the other shit
08:11 AM twnqx: mostly because we couldn't route the DDR3 wihout via in pad, and everything fell from there on
08:47 AM vmt: twnqx: yup
09:01 AM rue_mohr: I have a drawer of stm32, I got them about 2 years ago when I realized technology was ending
09:09 AM qu1j0t3: :)
09:09 AM twnqx: heh
09:10 AM twnqx: i never wanted to do small arm stuff
09:10 AM twnqx: but in the end, they are even cheaper than avrs, so...
09:10 AM twnqx: and i think i finally got my gcc to create stm32 compatible binaries
09:15 AM rue_mohr: me and polprog did a makefile eh?
09:16 AM ME: I did no such thing
09:16 AM rue_mohr: uses openocd for the programming
09:16 AM twnqx: yeah but my gcc build was broken
09:16 AM twnqx: it kept having relocations in it, which don't work so well in ROM
09:17 AM twnqx: will be relevant again in 4 weeks or so
09:17 AM rue_mohr: I use libopencm3 for the headers
09:18 AM rue_mohr: I think all my stuff is on github
09:18 AM nohit: why? ST provides the headers
09:18 AM twnqx: i tried to compile angelfire or so CAN firmware
09:18 AM twnqx: so whatever that used, i use
09:18 AM rue_mohr: cause stm32 examples suck
09:19 AM rue_mohr: its funny cause the stm32 stuff didn't get as advanced as the avr stuff
09:19 AM twnqx: on avr i never saw a library that was unbloated enough yet good enough featurewise for me
09:19 AM rue_mohr: https://github.com/ruenahcmohr/stm32examples
09:20 AM twnqx: it's basically 100% baremetal plus a bit of libc for me
09:20 AM rue_mohr: yes, but you did't have to build the toolchain as manually as you go stm32
09:21 AM nohit: you dont have to build the toolchain
09:21 AM rue_mohr: not talking about compiling it
09:21 AM rue_mohr: I'm talking about chaining the tools to get you what you need to load on the chip
09:22 AM rue_mohr: +- loading it
09:22 AM nohit: the main difference is that with avrs you dont have to worry about crt0
09:22 AM nohit: with arms its an assembly file that you have to include to the build manually
09:22 AM twnqx: dunno, i think i just do crossdev arm-none-eabi or whatever it is
09:22 AM nohit: but the file is provided by ST
09:22 AM rue_mohr: make; make install for me
09:23 AM twnqx: yeah well
09:23 AM twnqx: if it's not in /home it's managed by the distro
09:23 AM twnqx: i don't ever throw random shit in the filesystem
09:24 AM rue_mohr: good habbit, in 10 years when nobody own an actual computer you wont have to make any changes
09:25 AM twnqx: (not quite true, but yocto and android build systems are constrained to their own drives)
09:26 AM rue_mohr: I wonder how far system images will go
09:26 AM rue_mohr: "you cant install the program I wrote, here is a copy of my whole system"
09:26 AM twnqx: heh
09:26 AM rue_mohr: thats just docker tho you see
09:26 AM twnqx: that's usually the point where i say "yeah... no"
09:27 AM twnqx: my docker images drop out of my builder
09:27 AM rue_mohr: it seems everything is going docker
09:27 AM twnqx: which uses gentoo as a base
09:27 AM twnqx: one day i have to figure put flatpack though
09:28 AM rue_mohr: I wanted to play with tensor flow NNs,
09:28 AM rue_mohr: the ONLY way looked like docker images
09:28 AM twnqx: well, "my" docker images. my colleagues who do the services side do docker.
09:29 AM rue_mohr: yea, because nobody can properly isolate what they made
09:29 AM twnqx: oh, i think we can
09:29 AM twnqx: and we don't do it for isolation
09:29 AM rue_mohr: "**** I dont know, here is a docker image"
09:29 AM twnqx: we do it for ease of deployment/rollback
09:30 AM rue_mohr: "it works on my system, here is a copy of my system"
09:31 AM rue_mohr: its funny cause debian went to SO much effort to say that noboby can duplicate code between projects
09:31 AM rue_mohr: and so now we duplicate systems
09:32 AM rue_mohr: ok, well, I managed to write a todo list for when I get home from work
09:35 AM twnqx: except we build the full system ourselves :P
09:36 AM twnqx: becuase i force the guys for security issues. "if you use external docker images, YOU make sure there's no software with security holes in it. and YOU make sure no telemetry exists. and YOU..."
09:37 AM rue_mohr: I just find it funny and wonder where it'll go
09:37 AM twnqx: i have to say i don't care where the world goes... i am using the tools where they are beneficial to me, and that's it
10:15 AM vmt: pretty much this
02:51 PM specing_ is now known as specing
03:39 PM JanC_ is now known as JanC
04:45 PM Emil: Consider joining #avrs
05:03 PM SamantazFox_ is now known as SamantazFox
08:00 PM rue_mohr: hahahaha
08:04 PM vmt: ?
08:04 PM vmt: --
09:18 PM aighearach: rue_mohr: I have a bunch of stm32 too, I buy them thinking, "what if I need something more?" and then I end up using my smallest AVR that with enough pins, "Well, I don't really need more..."
10:20 PM rue_mohr: hah I do that
10:21 PM rue_mohr: tiny13's are working out for a lot of things after ya work out serial with them
10:26 PM Phantom: I need to make a 1-5 secs power-on delay circuit with a maximum of 0.2s reset time when you power it down... a 555 seems a bit overcomplicated, yet probably the easiest... anyone have a better solution?
10:36 PM rue_mohr: heh
10:37 PM rue_mohr: use the 555
10:37 PM rue_mohr: its linear, you dont need a regulator
10:37 PM rue_mohr: and its got an open collector output
10:38 PM Phantom: I do need some sort of regulator, due to how crappy the alternator is...
10:38 PM rue_mohr: 555 is good to 36V
10:38 PM Phantom: DS say 18
10:38 PM rue_mohr: ...
10:38 PM rue_mohr: ok
10:39 PM Phantom: it hit 24 easilly :D
10:39 PM rue_mohr: well, its a car, use a zener shunt
10:45 PM vmt: rue_mohr: you're gonna love this one, i've got the perfect solution for you on that power-on delay circuit
10:45 PM vmt: get this: stm32 arduino
10:46 PM vmt: wait that was phantom
10:47 PM rue_mohr: good luck getting them
10:47 PM rue_mohr: you can take apart programmers
10:49 PM vmt: you can get f7s, works wonders for a delay timer \:D/
11:58 PM aighearach: Phantom: You could use a pair of transistors with a capacitor and resistor, one for delay-on and one for fast reset, but you'd have to fiddle with a lot to get it working well.
11:59 PM aighearach: Not really worth it unless you've got a 555 shortage