#avr Logs

Apr 25 2018

#avr Calendar

12:07 AM kini: Apparrently the avr-gcc toolchain supports something that would allow me to do what I want: https://sourceware.org/binutils/docs/as/AVR_002dModifiers.html
12:10 AM kini: great!
01:04 AM rue_mohr: hi
01:04 AM rue_mohr: kini,
01:05 AM kini: hello
01:08 AM rue_mohr: hi, did you find your answer?
01:08 AM kini: yup, thanks! (see the GNU assembler manual page I linked)
01:09 AM rue_mohr: ok
01:09 AM rue_mohr: yer doin assembler stuff eh?
01:10 AM polprog: iirc IJMP jumps to *Z
01:10 AM kini: yeah, trying to optimize some code someone gave me
01:10 AM rue_mohr: k
01:10 AM polprog: so you just load r30:r31, call IJMP and it jumps to where you need it
01:11 AM kini: I'm not trying to jump - I just have a bunch of data sitting in flash, which is allocated in C code so I don't know exactly where in flash it is
01:11 AM kini: and I wanted my assembler code to be able to load that data into registers
01:12 AM polprog: ah
01:12 AM kini: so now I have something like "ldi ZL, pm_lo8(data_array)" "ldi ZH, pm_hi8(data_array)" "lpm r18, Z+" "lpm r19, Z+" "lpm r20, Z+" "lpm r21, Z+"
01:12 AM polprog: looks good
01:15 AM Haohmaru: looks like asm black magic x_x
01:21 AM Haohmaru: enabling XOSCPWR seems to improve things a bit, i can probe the crystal with 1X scope and it doesn't f*ck up
01:21 AM rue_mohr: wow
01:21 AM rue_mohr: you should need 10x
01:30 AM maciejjo_ is now known as maciejjo
02:15 AM nuxil: Haohmaru, youre not probing xtal1 right?
02:15 AM Haohmaru: both ;P~
02:15 AM nuxil: no. only probe xtal2
02:17 AM nuxil: xtal1 is input. and you basically putting a load on it when you hook the probe on. xtal2 is output and can is better suted for probing.
02:20 AM Haohmaru: yeah, but they both couldn't handle a 1X probe
02:21 AM Haohmaru: now they can
02:21 AM Haohmaru: to be honest, i also have PLL enabled now
02:22 AM nuxil: if you look at pierce_oscillator. consider U1 and R1 to be internal in the IC. https://en.wikipedia.org/wiki/Pierce_oscillator#/media/File:Pierce_oscillator.svg
02:23 AM Haohmaru: i also tried using internal clock source, but the very first few times, i saw it had quite some jitter, then later it got stable..
02:23 AM Haohmaru: and the frequency was a little off
02:24 AM Haohmaru: i think i'll use internal clock source for the bootloader
02:26 AM nuxil: frequency is always a bit off with the internal osc. unless you calibrate is using osccal. but dont know if you can do that on a xmega
02:27 AM Haohmaru: the 2MHz and 32MHz internal sources are "factory callibrated"
02:27 AM Haohmaru: fancy schmancy
02:28 AM nuxil: yea but that factory calibration has a +-10% if im not mistaken
02:28 AM Haohmaru: but they suggest enabling DFLL (or whatever) to make them more accurate
02:28 AM nuxil: you can improve it down to 2% with user calibreation. atleast on atinys/atmegas
02:37 AM nuxil: Haohmaru, have you considered that it could be a dip in the voltage (caused by relays or whatever) on your device thats causes the random freezing? Have you tried setting up BOD ? https://www.youtube.com/watch?v=G90Xd2ssxog
02:39 AM Haohmaru: yes, of course, that's what i suspect, but i cannot reproduce it here, i set a timer to abuse the relays and left it for a whole night, it hadn't glitched
02:39 AM Haohmaru: but i don't have anything connected (load) on the relays
02:44 AM nuxil: hehe. ok. so you left the relays clicking all night. :)
02:44 AM nuxil: the load you connect onto the relays. are they on the same psu as the chip ?
02:44 AM Haohmaru: no idea
02:48 AM nuxil: ok. what load is connected to the relays ?
02:48 AM Haohmaru: i think another set of relays
02:50 AM nuxil: i would check and see if its the psu. and since you are using relays i guess its some sort of load that draws some current. if your psu is too little, the voltage will drop a bit when the "load" gets enabled, which affects the rest of the circuit and can cause unstability.
02:57 AM Haohmaru: the relays are driven directly with 12V, the xmega gets 3.3V from a switching regulator, which sucks 12V too
03:00 AM nuxil: ok. so on same psu.
03:05 AM nuxil: do you have several caps after the requlator? im just thinking. not knowing what your load is or how much current it draws or what your psu is rated for. but if its a weak psu and you get a drop in voltage to lets say 7/8 volts when the "load" gets enabled. how will this affect your regulator. what is it operation range.
03:07 AM Haohmaru: there are pretty much no caps
03:07 AM nuxil: o.0
03:07 AM Haohmaru: just like 3 electrolytics, 1000uF
03:07 AM Haohmaru: no 100nF on the xmega at all
03:08 AM nuxil: not even a filter cap for the chip
03:08 AM nuxil: wft dude :p
03:08 AM Haohmaru: just 22nF on the crystal
03:08 AM nuxil: gosh
03:08 AM Haohmaru: and they are not routed decently
03:08 AM nuxil: youre asking for trouble. and you got it :D
03:08 AM Haohmaru: not me, i didn't make this PCB
03:09 AM Haohmaru: but now i have to deal with the consequences
03:09 AM nuxil: can you hack in a filter cap for the mcu atleast?
03:11 AM Haohmaru: that's not an option really, we got like 30-ish of these "in the field" at a few different clients, including outside the city
03:14 AM nuxil: this i would not waste time on. no matter how much software update you make. it cant fix flaws in hw design. like simply having a filter cap(s) for mcu 's is kind of a basic thing to have.
03:14 AM nuxil: better off spending the time redoing the pcb instead of trying to do sw updates.
03:16 AM nuxil: and a lesson learnt for the company. do better QC for HW before shipping it out to clients.
03:17 AM Haohmaru: i've done the PCB from scratch in kicad like two or three times
03:18 AM nuxil: youre basically saying youre powering your mcu diretly from a 3.3v switching regulator without no filtering. thats like crazy shit :D
03:18 AM nuxil: if it was a linear regular it would still be crazy. but no so :p
03:20 AM polprog: holy crap
03:20 AM polprog: 30 odd boards..
03:21 AM polprog: just mod on a capacitor, less hassle
03:21 AM polprog: i dont think you can fix shitty power rails in C
03:23 AM Haohmaru: many of these boards are not installed to *owr* clients but via a third party, so it gets very complicated
03:23 AM Haohmaru: * our
03:27 AM polprog: :(
03:30 AM nuxil: https://www.youtube.com/watch?v=J66_8P043ko
03:33 AM Haohmaru: and yeah, i've enabled BOD before
03:34 AM Haohmaru: at 2.0V iirc
03:34 AM nuxil: BOD will not help you against all the switching noise from the requlator.
03:34 AM Haohmaru: i know
03:35 AM Haohmaru: the guy who made the PCB was forced to do it in a very short time, and he was being distracted every 5 minutes with all kinds of things
03:35 AM Haohmaru: and he uses an obscure program where he draws a pcb directly (no schematic, no nothing)
03:35 AM Haohmaru: the first variant had a bunch of ground points unconnected
03:37 AM Haohmaru: there are also no ground fills (nor any fills)
03:37 AM Haohmaru: oh wellz
03:38 AM Haohmaru: ah, and the ethernet module was made "mirrored" by mistake, so we have to mount it on the bottom side of the board (naaaasty) for the pinout to match
03:39 AM nuxil: lol
03:40 AM Haohmaru: the silkscreen markings of some polarized components (LEDs) are inconsistent and wrong
03:41 AM Haohmaru: it's just terrible on so many levels
03:41 AM Haohmaru: the worst part for me is that there's no schematic at all
03:56 AM nohitzwork: so youre just gonna leave the faulty boards to the clients?
03:57 AM nohitzwork: you should replace them free of charge
03:58 AM Haohmaru: i'm not the boss
03:59 AM Haohmaru: also, we kinda sold those devices with the opposite of "profit"
03:59 AM Haohmaru: ;P~
04:58 AM MrFahrenheit: my printer is in the country
04:58 AM MrFahrenheit: nuxil
05:02 AM Haohmaru: is he on a vacation?
05:02 AM Haohmaru: (your printer)
05:11 AM nuxil: MrFahrenheit, so youre getting it in a few days?
05:16 AM MrFahrenheit: nuxil, I reckon a week, the customs office here seems to only do 1 thing per day
09:12 AM polprog: https://puu.sh/Aa8IB/b8184629b2.png
09:13 AM polprog: whole day, 240 bps on average
09:13 AM polprog: IRC is such a great thing
09:13 AM polprog: we could chat over a 9600 bps modem and still have plenty of bandwidth left
09:13 AM polprog: heh.
09:20 AM rue_mohr: and no ads!
09:20 AM rue_mohr: less the yearly collection drive
09:20 AM rue_mohr: and the spam from Rucas
09:22 AM polprog: this message was brought to you by polprog.net
09:22 AM polprog: :P
09:24 AM rue_mohr: how do I drive off an engine thats got a shaft not meant for sideload?
09:24 AM MrFahrenheit: nah, irc is too old, it has to be replaced with something hip and new™
09:24 AM rue_mohr: like google chat
09:25 AM rue_mohr: I'm sure there are only ads every 4 or 5 seconds
09:25 AM rue_mohr: "YOU MENTIONED AVR! BUY XMEGA32 FROM DIGIKEY TODAY!"
09:25 AM Thrashbarg: or any number of other platforms based on incompatible standards and written with incompatible software platforms, of which there are plenty too
09:26 AM rue_mohr: we seem to be into mashing things up these days
09:26 AM rue_mohr: lets take a java program and stuff in this python stuff
09:26 AM Haohmaru: buy xmega from ANYWHERE
09:26 AM Haohmaru: coz i said so
09:26 AM rue_mohr: srry, I'm going stm32
09:26 AM rue_mohr: cause its 'standard' arm
09:27 AM rue_mohr: and its not microchip
09:27 AM Thrashbarg: https://www.youtube.com/watch?v=Wm2h0cbvsw8 <-- here we go
09:28 AM polprog: inb4 discord
09:28 AM polprog: Thrashbarg: :p
09:30 AM MrFahrenheit: https://paste.debian.net/hidden/6ece2322/
09:30 AM MrFahrenheit: it's from a song
10:49 AM polprog: nice, got M$ sql server running
10:51 AM Emil: abort
10:51 AM Emil: :D
10:52 AM polprog: id love to but there are many people running that atrocity
10:52 AM polprog: know thy enemy
10:52 AM polprog: https://www.youtube.com/watch?v=BU_A5p04VXc
11:11 AM pwillard_ is now known as pwillard
01:51 PM polprog: https://youtu.be/WvIRsDHFiis
02:09 PM MrFahrenheit: polprog, that reminds me of this https://www.youtube.com/watch?v=bKwQ_zeRwEs
02:10 PM polprog: lol
02:33 PM Rez_ is now known as Rez
02:39 PM nuxil: https://www.youtube.com/watch?v=y3niFzo5VLI
02:40 PM nuxil: lol.
02:40 PM nuxil: live
02:41 PM nuxil: a live replay :p
02:44 PM MrFahrenheit: "Started streaming on Feb 7, 2018"
02:45 PM nuxil: yea. and it showed as still live on youtube.
02:46 PM MrFahrenheit: well it's still streaming
02:46 PM MrFahrenheit: just a really long repeat loop
02:48 PM nuxil: found some other dude to watch on youtube and waste some time while i sip my coffee.
02:48 PM nuxil: https://www.youtube.com/watch?v=NHcl6cyoU44 not bad considering its only 1 string :)
02:48 PM MrFahrenheit: watch this instead https://www.youtube.com/watch?v=DydIK14AvXI
02:50 PM polprog: but is it null terminated
02:51 PM nuxil: i have enterprise, the next generation and voyager, missing some stuff like deep space 9. but meh i didnt like it
02:51 PM polprog: lol MrFahrenheit
02:51 PM MrFahrenheit: ds9 was good, enterprise was meh to me
02:52 PM nuxil: last season of enterprise was a bit meh.
02:52 PM nuxil: but hey its all good compared to adrommeda :p
02:53 PM nuxil: that series just gets worse and worse as the season progress
02:54 PM nuxil: *andromeda
02:55 PM nuxil: must be one of the worst work by gene roddenberry
02:55 PM MrFahrenheit: andromeda was kind of interesting, I think it became worse and worse as kevin sorbo pushed out all the writers
02:57 PM nuxil: never found him to be a good actor. seems like hes worse at writing :p
02:58 PM nuxil: it started out good. but in the end turned out craå
02:58 PM nuxil: *crap
02:59 PM nuxil: if you want some uper weird 90's scifi take a look at Lexx :D
03:15 PM polprog: there is Falling Down on TV with Michael Douglas
05:14 PM h4x0riz3d is now known as antto
05:36 PM Emil: mfw I go on a nostalgia trip on Halo 3 montages
05:36 PM Emil: barely managed to avoid the machinimas
05:36 PM Emil: I really did have one of the best childhoods :D
09:14 PM ruel is now known as lvlinux
11:19 PM day__ is now known as day