#avr Logs

Apr 21 2021

#avr Calendar

04:57 AM Sponge5: I have figured my problem from yesterday, apparently DIDR0 is not by default set to zeros, the datasheet's lying
05:04 AM cehteh_: could it be your bootloader or any other initialization code that changed it?
05:05 AM exp: specifically you're looking for high fuse, bit 6
05:06 AM exp: Sponge5: https://www.nongnu.org/avr-libc/user-manual/group__avr__fuse.html here's the fuse documentation for doing it from your code
05:07 AM exp: oh wait that's setting, my mistake
05:07 AM exp: you can also read them ;)
05:07 AM exp: https://www.nongnu.org/avr-libc/user-manual/group__avr__boot.html there we are
05:16 AM Maya-sama is now known as Miyu
05:16 AM Sponge5: the objdump didn't show anything
05:16 AM exp: they're not a part of your code, they're 'physical' fuses inside the chip
05:16 AM Sponge5: makes sense
05:16 AM exp: they control things like clock source, startup time, and crucially, alternate functions for 4 pins of port F
05:16 AM exp: how do you program your chip?
05:18 AM Sponge5: boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS);
05:19 AM Sponge5: 11011000
05:20 AM exp: ooh interesting
05:20 AM exp: which endian order is that?
05:21 AM Sponge5: this is 216 in binary
05:21 AM Sponge5: so little endian
05:21 AM exp: well, in that case I am wrong and JTAG appears to be disabled
05:22 AM exp: in normal operation then you should have no problems in reading the pin status of port F
05:23 AM Sponge5: I didn't have, the ADC worked, just for some reason the digital buffers were disabled for all analog pins
05:23 AM Sponge5: so I couldn't read a value with (PINF & _BV(PF2))
05:23 AM exp: you mentioned yesterday you couldn't read a high value
05:23 AM exp: yeah
05:24 AM exp: I know I've had that issue before and for me it was JTAG beign enabled that prevented it
05:25 AM Sponge5: I don't debug my code so I can't have issues with that haha
05:26 AM exp: lol, these chips are typically shipped with it programmed though
05:26 AM exp: so that's what concerned me, it sounds like your issue is elsewise
07:33 AM JanC is now known as Guest65907
07:33 AM JanC_ is now known as JanC
08:39 AM specing_ is now known as specing
10:43 AM Rab: I had that issue with an ATmega164.
10:47 AM Rab: The ATmega2560 has a JTAG function on PORTF. However, it only seems to involve PF4, PF5, and PF7.
01:14 PM nohit: jaja: are you new to ARMs?
01:14 PM jaja: nohit: new to microcontrollers in general
01:14 PM nohit: okay
01:15 PM nohit: you should skip AVRs and go straight to ARMs
01:15 PM nohit: stm32 is best
01:16 PM jaja: I actually have both an arduino uno and a nucleo board
01:16 PM nohit: nice
01:16 PM jaja: I've decided to just jump right into stm32 because idk what was going on with AVR and Arduino
01:17 PM LeoNerd: AVRs seem to be stable for a while yet; looking at all the new ones Microchip are making (AVR DA and DB series)
01:18 PM jaja: Setting up toolchains is kinda of annoying, does everyone use PlatformIO or is it not mature enough?
01:19 PM LeoNerd: I go apt-get install avr-libc avr-gcc and then it's done
01:22 PM jaja: Ah nevermind not the toolchain. I'm just having issues getting my text editor to have code completion and detect header files
01:22 PM LeoNerd: :set includepath= ...
01:22 PM LeoNerd: is what I'd do in vim :)
01:23 PM twnqx: except fucking stm32s nowadays have factory lead times of 60weeks and more
01:23 PM LeoNerd: 60 weeks? What are they doing - placing all the transistors individually by hand?!
01:24 PM nohit: jaja: check out my guide https://avrs.fi/arm/
01:24 PM twnqx: no idea, but my assembly house has fun with literally crying CEOs that don't know how to sell anything this year
01:24 PM nohit: if you want bare bones setup
01:24 PM nohit: IDE is nice tho
01:24 PM twnqx: cancelled confirmations of delivery, price hikes of 50% and more, ...
01:25 PM nohit: i would use CubeIDE
01:25 PM jaja: nohit: Thanks for writing this, it's the guide I've been following. Ideally i'd like to have a minimal setup but I'll try CubeIDE.
01:26 PM twnqx: it's like microchip switch ICs. next factory delivery march-april 2022
01:26 PM twnqx: want it faster? try chinese grey market, good luck
01:28 PM nohit: glad to hear its useful for someone
01:31 PM vmt: grey market is my favorite color of market
01:32 PM exp: twnqx: at90usbs starting to run dry too
01:32 PM exp: i've got 50-60 in stock at least
01:33 PM exp: had to swap out high side switches to ones without current mirrors, which is annoying, and no 4 channel ones from Ti till 2022
01:33 PM twnqx: i am placing orders at latest next week... for my 2022 deliveries
01:33 PM exp: scary isn't it, I can't really plan that far ahead
01:33 PM twnqx: kinda lucky if my autumn order completes. it was placed last december
01:34 PM twnqx: i have 5k CPUs. and 5k PCBs.
01:34 PM twnqx: my eMMC order for 1k was already once postponed by 6 weeks
01:35 PM twnqx: exp: yeah, what's happening right now is very scary
01:35 PM twnqx: and it happens everywhere
01:35 PM twnqx: a friend's comany has custom-made PCs (applicances) from taiwan
01:36 PM exp: I'm quite low volume compared, but I have at least 30 boards planned
01:36 PM twnqx: they receiver an email from their taiwanese maker of "this voltage regulator from TI is not available, wait 6 months or buy from spot market?"
01:36 PM exp: trying to ensure I have ~150 boards worth, is difficult
01:36 PM twnqx: sport market: 9.8$, regular price: 48 cents...
01:36 PM vmt: twnqx: are those avrs ;-;
01:36 PM exp: yep sounds about right
01:37 PM twnqx: nah regular intel thingies
01:37 PM vmt: 8051 etc?
01:37 PM twnqx: xeon
01:37 PM twnqx: non-phi. really just custom PCs with a lot of network interfaces
01:37 PM vmt: oh. wait, is this the line cam thing?
01:38 PM twnqx: nah, they are in a completely different business
01:38 PM vmt: alright, though yeah you'd just if them with an fpga i figure
01:38 PM vmt: anyway how's that line cam thing coming along
01:38 PM twnqx: i'm currently dealing with linux on arm (microchip(atmel) sama5d27
01:39 PM twnqx: didn't get the order yet
01:39 PM vmt: not sure if it's changed, but atmel arms used to be far more expensive than nxp/stm/whatever
01:40 PM twnqx: when my order of 32GB emmc was postponed it was nearly a back breaker, but suddenly 1200 appeared at mouser... for just 9€ more than we were scheduled for on avnet
01:40 PM twnqx: logically we just grabbed 1k of those >_>
01:40 PM vmt: management creams p-p-p-put a l00n1x on it!11
01:41 PM vmt: is this nda or can you elaborate
01:41 PM twnqx: well, i wouldn't be interested in anything less, given what this thing has to do
01:42 PM twnqx: yeah, it's NDAed, crypto stuff (needs the PCI certification and somewhat higher security)
01:42 PM twnqx: already passed an external pentest
01:42 PM vmt: well for throughput in embedded the kernel should be... extremely different, ideally
01:43 PM twnqx: sure. chip is really horrible
01:43 PM twnqx: we glue on DDR3, and it runs at... 125MHz
01:43 PM twnqx: the rum we put there could do 800
01:43 PM twnqx: ram*
01:43 PM vmt: heh
01:44 PM twnqx: thing would probably be faster with *ddr2*
01:44 PM twnqx: because then the cpu could clock it higher
01:44 PM vmt: ddr3 just because of availability, yea?
01:44 PM twnqx: but... ddr3 availability is somewhat better than 2 or 4
01:44 PM twnqx: yeah
01:44 PM vmt: yea
01:44 PM twnqx: i kinda have a contract of delivering 50k of these over 10 years
01:45 PM vmt: you're solo on this?
01:45 PM twnqx: we're... 4
01:45 PM vmt: alright. well, let's just say i've got my fingers crossed this isn't related to crypto...currencies
01:45 PM twnqx: and an external pcb layouter with highspeed experience, wouldn't want this to be my first
01:45 PM twnqx: no
01:45 PM vmt: a relief
01:46 PM twnqx: just secure communications is required (TLS 1.3, ED25519 only)
01:46 PM vmt: 1.3, keeping up with the times i see
01:46 PM twnqx: it's supposed to last 10 years and we can't touch it after hitting stable so... better start high
01:47 PM vmt: that sounds like trouble
01:47 PM twnqx: of course
01:47 PM twnqx: why would they choose randos that never really did something like this before? because experienced companies were scared :P
01:49 PM twnqx: also, set up a new incorporated, not that much to lose
01:49 PM vmt: ah! yes, limited liability is the best liability
01:51 PM vmt: i wonder, as you said you can't touch them after they're stable, if these things are going to end up airborne perhaps
01:52 PM exp: twnqx: what do you do about EMC at your scale?
01:53 PM twnqx: measure it, show that we don't have issues
01:53 PM twnqx: and yes, it's a few k€
01:53 PM exp: you do that internally rather than contracting out?
01:53 PM twnqx: no, need a lab for that
01:54 PM exp: yes that makes sense, sorry it sounded like you were saying you tested it locally
01:54 PM twnqx: we calculate ~6k for emc, vibration, temperature testing
01:55 PM exp: seems pretty good value
01:55 PM exp: i need to find the same in northern UK if possible
01:55 PM exp: that's going to be fun
01:57 PM vmt: 6k sounds low
01:57 PM nohit: linux on arm is the best
01:57 PM nohit: stm32mp1
01:58 PM twnqx: yeah, our guys are surprisingly cheap, i agree
01:58 PM vmt: are your guys also slant-eyed?
01:59 PM vmt: because some asian sweatshop is just about the only place i can figure you can get testing done for so cheap
01:59 PM vmt: s/figure/imagine/
01:59 PM twnqx: nope, they are actually in the mnufacturing busines and test for themselves, then realized that a bit more utilization could help with ROI
01:59 PM vmt: alright, sweet deal
02:00 PM twnqx: i have heard more fun rumors: FR4 shortage coming up (said our board house) :P
02:00 PM twnqx: and those damn crypto guys are now after storage thanks to the new thingy
02:01 PM twnqx: rumors saying, hdds and ssds might triple in price shortly >_>
02:01 PM twnqx: at least in asia, no idea about europe
02:02 PM twnqx: next few years will badly suck for computers & electronics, i think
02:04 PM vmt: just waiting for the crypto bubble to burst
02:04 PM vmt: when it drowns in its own insanity
02:05 PM vmt: i understand the guys who make money out of it, just because you can. what i don't understand is the people who actually root for the system
02:15 PM exp: there are definitely things i think are better managed by distributed trustless networks
02:15 PM exp: domains and DNS in general for one
02:23 PM vmt: and you believe the solution is blockchain?
02:35 PM exp: vmt: sure, there are many implementation concerns but fundamentally 'namecoin' etc are not terrible ideas i don't think
02:41 PM vmt: i think bytecoin wordcoin dwordcoin and qwordcoin along with pepe and 1337coin are really good options as well
02:41 PM vmt: i too, have wet dreams of crypto algorithms
02:42 PM vmt: the thing is, blockchain doesn't have "implementation concerns", rather they are fundamental concerns
02:51 PM twnqx: exp: i disagree
02:51 PM twnqx: the main reason being that if someone controls like half the calculationpower of the chain, they can overwrite the chain
03:14 PM twnqx: sigh
03:15 PM twnqx: having a serial port console as the only way of transferring files to an arm device is a tad annoying
03:21 PM vgtw_ is now known as vgtw
03:21 PM * twnqx resorts to zmodem for file uploads
03:21 PM twnqx: wonder if i ever used that after the 90s
03:35 PM McDonaldsWiFi is now known as PublicWiFi
08:54 PM jaja: Noob question: why does my Nucleo board only flash when I hold down the reset button? Do I have to do this everytime?