#qi-hardware IRC log for Sunday, 2013-10-06

larscjust a long roundtrip time, server is up again15:31
wpwrakwhee, the ghost did read it ! :) thanks, ghost of wolfspraul !16:00
wpwrakDocScrutinizer05: now you can see all the goodies of anelok16:01
wpwrakschematics: http://downloads.qi-hardware.com/people/werner/anelok/tmp/anelok-20131005.pdf16:01
wpwraklayout: http://downloads.qi-hardware.com/people/werner/anelok/tmp/anelok-20131005.png16:02
wpwraka display and wheel prototype (slightly smaller than the latest design): http://downloads.qi-hardware.com/people/werner/anelok/tmp/anelok-dui.ogv16:02
wpwrakstill image of it: http://downloads.qi-hardware.com/people/werner/anelok/tmp/dui-arrow.jpg16:03
wpwraka draft of the overall stacking: http://downloads.qi-hardware.com/people/werner/pwsafe/shape.pdf16:04
wpwrak(that one has the wheel very close to the display. i've now increased that space by a few mm)16:04
wpwrakdrawing of current top view: http://downloads.qi-hardware.com/people/werner/anelok/tmp/top-xy.pdf16:05
wpwrakrough block diagram: http://downloads.qi-hardware.com/people/werner/pwsafe/block.pdf16:06
wpwrakand you'll like this: a little box that implements a USB y-cable: http://downloads.qi-hardware.com/people/werner/pwsafe/ybox.pdf16:07
wpwrakand the whole discussion starts here: http://lists.en.qi-hardware.com/pipermail/discussion/2013-September/010184.html16:08
wpwrakbut most of september was really about anelok: http://lists.en.qi-hardware.com/pipermail/discussion/2013-September/thread.html16:08
larscwpwrak: my psychic skills needs some work, it took some time to wake to spirit ;)16:09
wpwraklarsc: it still worked impressively quickly :)16:11
garlpHi. My codepage is right?16:12
garlphalloooo16:13
wpwrakhmm, where's a klingon example in proper unicode when you need one to copy & paste ?16:22
wpwrak(anelok) meanwhile, the key components (transceiver, MCU, memcard, usb, a few caps) are soldered. should be able to try SWD soon.16:23
wpwrakkinda curious whether the mcu will be willing to talk ...16:23
wpwrakmcu was relatively easy to solder. positioning is hard, as usual with QFN in a DIY process. transceicer had a mystery short between ground and clock out. memcard may have some footprint issues - the contacts don't seem to be quite where they should be. needs checking.16:25
wpwrakusb looks intimidating (the shell covers the signals almost completely) but was surprisingly easy to solder.16:25
larscthe size is that of a usb mem stick?16:27
garlphi. My codepage is right?16:28
wpwrakthere are probably some very large ones with roughly that size :)16:29
larscwpwrak: yea, I was thinking about those back from a few years ago16:29
larscI find it amazing how fast you were able to put this together16:30
garlphi from Russia16:30
larschello16:31
garlplarsc: my codepage is right? ok16:32
larscat least the ascii part of it16:35
wpwrakit's about half the size of a PCMCIA card16:36
wpwrakcouldn't find any of my ancient (and huge) usb memory sticks. i remember one from sony that was particularly oversized.16:37
wpwraklarsc: it's till too early to know whether i actually got it right ;)16:37
larsceven for an almost working prototype it was still pretty fast16:40
DocScrutinizer05wpwrak: C20 and C22 look *very* strange17:30
DocScrutinizer05if those are correct, I'd not really know why POWERED at B1:2 and why C23. I'd rempve POWERED then and make C23 0R17:32
DocScrutinizer05or that at86rf232 is a really strange chip when it needs that circuit17:33
wpwrakwell, they say it needs those DC blockers17:37
wpwrak"POWERED" just tells kicad that this is a power input. otherwise, i'll get an ERC warning17:38
wpwrak(power input for declaring the middle tap as GND)17:38
wpwrakmaybe i should make it passive. it looks inded a bit odd the way it is now.17:39
wpwrakthe baluns have rather conflicting descriptions of what should go there. some say "just ground it". that's where the "power in" comes from17:40
DocScrutinizer05R9 what the heck?17:41
wpwrakeverybody loves R9 ;-)17:47
wpwrakit's to supply the RTC. the basic ideas is to limit battery current such that the device can be in deep sleep (with RTC running) but can't do anything else17:48
wpwrakespecially that it can't turn on RF17:49
wpwrakwell, it could try to. but then the power supply would collapse.17:49
wpwrakhmm, the bad think about these tiny components is that, when you divert your attention for a second, you have a hard time finding them again ...17:50
DocScrutinizer05when you want to disable RF, switch off AT86Rf23217:52
DocScrutinizer05R9 makes the whole circuit behave undefined17:53
wpwrakthe MCU is supposed to catch power dropping and shut things down17:55
DocScrutinizer05that's not a stable design17:56
wpwrakand the purpose of this is to protect against a rogue MCU17:56
wpwrakyeah, i guess it may bounce around in power-on-reset17:57
DocScrutinizer05there's no way for the circuit to detect state of the switch, except try to draw huge amount of current, in which case VDD drops and probably RTC doesn't work either. While it does NOT reliably stop RF since you got buffer Cs17:57
wpwrakmy idea is to set a high brown-out level and trigger on that. this code would shut down things very quickly, before reaching the low brown-out level17:59
wpwrakthe caps are way too small to feed RF for anything. so they actually help, buying us a little more time for the cleanup.17:59
wpwrakthe main cap there is C15 anyway17:59
larsccan't you connect that switch to reset, for both the mcu and rf?18:02
DocScrutinizer05yeah18:02
DocScrutinizer05this is insane design18:02
DocScrutinizer05why would the CPU work with "brownout" when it gone rogue regarding any more sane design?18:03
DocScrutinizer05and duh, this MCU doesn't need a xtal for rtc??18:03
DocScrutinizer05and no separate power VDD pin for rtc?18:04
wpwrakit has no separate power pin for RTC18:04
wpwrak(unfortunately)18:04
wpwrakhence that hack18:04
DocScrutinizer05then see what larsc said18:05
wpwrak(rogue) i don't expect it to work with brownout if it goes mad. all bets are off then. but i want to be sure that the system can't do anything "interesting" when the switch is in the off position18:06
wpwrakholding everything in reset may be an option. need to see about that.18:06
DocScrutinizer05then switch off the RF chip18:06
wpwrakalas, the MCU does not define a reset state for the GPIOs. so they can be anything. i'm sure it makes perfect sense in some parallel universe ...18:07
wpwrakproperly switching off the RF chip would still require the MCU to cooperate18:08
wpwrakbut holding it in reset may be an option. need to check the current.18:08
DocScrutinizer05kill the clock -> no more RF18:11
DocScrutinizer05just a brainstorming idea, when reset doesn't work18:11
wpwrakkilling the clock means messing with the crystal18:11
DocScrutinizer05yeah, sth like that18:12
wpwrakwell, i guess one could forcible ground it but ...18:12
wpwrakbut it does sound a bit like asking for trouble18:12
DocScrutinizer05probbaly18:12
DocScrutinizer05switching off VSYS not feasible?18:13
DocScrutinizer05maybe only for one of EVDD DEVDD18:14
wpwrakagain, power through GPIOs18:15
DocScrutinizer05I guess one is logic, the other analog?18:15
wpwrakyes18:15
DocScrutinizer05doesn't it define what happens when analog is unpowered?18:15
wpwrakof course not :)18:15
DocScrutinizer05:-S18:16
DocScrutinizer05I'd go for pulling RF_nRST to GND. Can get detected by MCU by using PTC2 as input18:18
DocScrutinizer05If you want or need that, you also can connect PTC2 to MCU nRESET via a R-C to give a pulse to nRESET when the switch gets closed18:19
DocScrutinizer05ooops, no :-P18:19
wpwrakhmm yes, that could be a possibility (forced reset)18:19
DocScrutinizer05otherwise MCU resets itself18:19
wpwrakheh :)18:19
DocScrutinizer05needs a tiny bit more birdseed18:19
DocScrutinizer052 diodes or sth18:20
DocScrutinizer05maybe only one18:21
Action: DocScrutinizer05 heads out, getting "breakfast" coffee18:21
wpwraki think the PTC bank is interrupt-capable, so detection shouldn't be a big deal18:22
DocScrutinizer05I anyway *strongly* recommend _not_ to use that R9 "solution". Might work, when you're extremely lucky, but yuo never can completely evaluate and verify the circuit behaviour18:22
DocScrutinizer05s/yuo/you/18:23
wpwrakand it would be for "cleanup" anyway (set GPIOs, stop expecting RF to work, etc.)18:23
wpwrakyeah, it's a bit chancy18:23
wpwrakneed to see how much RF draws in reset. that's of course undocumented.18:24
wpwrakSLP_TR (sleep mode) may or may not have an effect there, too18:25
wpwrakin-circuit programmer is unhappy with what i've done :-( let's find out why ...18:29
wpwrakbtw, there's another "chancy" mode: when removing the battery, the MCU needs to catch the imminent complete loss of power and bring down things, so that C15 can keep the RTC alive during the battery change18:32
wpwrakwill be fun to make this work :)18:32
DocScrutinizer05forget it18:36
DocScrutinizer05lock the battery lid with the slide switch SW218:36
wpwraknaw, switches are too much of a pain18:37
wpwrakthey're huge, expensive, and never quite fit18:37
DocScrutinizer05if you can't do that, then get two Vbat+ contacts on the PCB, the detector one opening earlier than the main one18:38
wpwrakinteresting idea18:38
DocScrutinizer05or a Reed or Hall or IR-proxy switch on your case, "intrusion detector"18:38
wpwraksatellite surveillance ;-)18:39
DocScrutinizer05for that your refusal to make battery slot-in actually is beneficial18:39
Action: wpwrak feels victorious :)18:40
DocScrutinizer05adding a tiny magnet to the removable "lid" and a Reed switch on PCB next to it is dead simple18:41
DocScrutinizer05you still didn't explain how that magic MCU keeps realtime without an XTAL18:41
cde`d18:42
wpwrakit has a reasonably accurate RC18:43
larscDocScrutinizer05: built-in xtal18:43
DocScrutinizer05nifty18:43
wpwrakand we can calibrate it against the very precise xtal18:43
DocScrutinizer05`d ?18:44
wpwrakthe rtc is for things like security tokens. so it doesn't have to be extremely accurate.18:44
DocScrutinizer05errr18:44
DocScrutinizer05sorry, you lost me18:44
wpwrakthe little critters that generate a code when you turn them on. then you type it into some authentication system. for two-factor authentication.18:46
wpwrakthe code they generate normally depends on time (and usually on the number of activations)18:46
cdeDocScrutinizer05: sorry, typing mistake18:58
wpwrakweird. if i connect the board to the programmer, the programmer doesn't even enumerate on usb18:59
wpwrakall the signals look correct, though18:59
larscdoes the programmer power the device?19:00
DocScrutinizer05VBUS19:01
wpwrakyes, power looks normal19:01
DocScrutinizer05err wait, what exactly are you saying?19:01
DocScrutinizer05is the programmer connected to anelok via USB?19:02
wpwrakno, via GND, VDD, and SWD19:02
DocScrutinizer05aah, and what does it do? is it a own system or just some sort of level shifter to USB?19:03
DocScrutinizer05ftdi?19:04
wpwrakit's this critter: http://cache.freescale.com/files/soft_dev_tools/hardware_tools/schematics/FRDM-KL25Z_SCH_REV_E.pdf19:04
wpwrakan evaluation board with built-in (fancy) usb to swd gateway19:05
wpwraktried different firmware. same problem. let's recheck power ...19:05
apeleteHi19:05
DocScrutinizer05errr19:06
DocScrutinizer05you call that a programmer?19:06
wpwrak(firmware) programmer firmware i mean. not target :)19:06
wpwrakwell, it contains one :)19:06
apeletelarsc mth: I added platform data for the musb glue layer -> http://seketeli.fr/git/~apelete/qi-kernel.git/commit/?h=jz4740-udc&id=2d9a7aaee50db5a75add1a6e867060d8e211f53419:06
wpwrakthe opensda critter19:06
apeletelarsc mth: but something is still going wrong -> http://paste.debian.net/51955/19:07
DocScrutinizer05hmm, no idea19:07
larscapelete: lots of a's19:07
cdeit's the aaaaapocalypse19:07
apeletelarsc: seems like the driver is not being loaded, and I don't know why it's printing "musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)"19:08
apeletein platform data I set it to peripheral only....19:08
apeletecde: not funny :D19:08
wpwrakin the movies, when someone falls to their death, they usually shout "aaaaa...". maybe that kernel found the choice of last words of these people inspiring.19:09
cdein kernel land, no one will hear your scream19:10
rohhrhrhr19:10
larscapelete: hm, i can't even find the code that prints that message19:12
larscah, it was removed19:13
larscit prints that message when the module is loaded19:14
wpwraksomeone's been hiding evidence19:14
apeletelarsc: so the module is being loaded ? it doesn't pring any of the printk I left in the glue layer... 19:15
larscthose will probably run only when the device is created19:16
larscor maybe the glue code is build as a module19:16
larscbut the core code is built-in19:16
DocScrutinizer050xaa is a very common pattern for unititialized RAM19:17
apeletelarsc: hmmm, I thought there was something amiss with my kernel config file, I checked it but didn't find anything unusual -> http://seketeli.fr/git/~apelete/qi-kernel.git/commit/?h=jz4740-udc19:17
DocScrutinizer050x55 the other one, besides of course 0xff and 0x0019:18
larscboth seems to be built-in19:18
DocScrutinizer05basically all memtesters use 0xaa and 0x55 for test patterns19:19
larscI think the kernel also uses it to poison memory19:19
wpwrakhmm. disconnecting RESET makes the programmer enumerate. SWD still fails later on, though.19:20
wpwrak.. because there is no reset. yes, that makes sense :)19:24
wpwrakvery strange19:25
wpwrakresistance of RESET is normal, too. some 13 MOhm to GND (if driven high), about 50 kOhm to VDD (if driven low)19:27
apeletemth larsc: any idea on how I should proceed to solve this ?19:32
apeleteI tried to step into the musb glue layer code with gdb but it didn't break19:33
apeletedon't know why19:33
apeleteI mean, I can see the kernel booting inside gdb, but putting a breakpoint in the probe() function does not break the kernel19:34
larsccomment out parts until it is working again19:34
larscthis looks like a real bad memory corruption19:34
wpwrak*hmm* could it be ... freescale being assholes ? there's a thread suggesting that the "open"sda subsystem simply doesn't enumerate if the chip isn't the one on the board. https://community.freescale.com/thread/30303119:36
apeletelarsc: ok thanks, will try that19:37
wpwrakwhat's odd with this: 1) if i break reset such that it can't even talk to any chip, it does enumerate. 2) the chip is not identical but quite similar. (same core, same memory, different package)19:37
wpwrakIDCODE should be the same for all M0+. hmm.19:48
larscso you think the firmware finds the chip and then shuts itself down?19:51
wpwraki think i found it :) there are two slightly different debug connectors on the board, J6 and J8. i attached to the wrong one. let's try the other one.19:54
wpwrakyeah ! talks :)20:06
larscnow it just need to walk20:07
wpwraklet's try something innovative and completely unexpected ... blink a led :)20:11
wpwrakkewl. the led blinks on the first try. that was too easy :)20:54
eintopf:D21:01
DocScrutinizer05lol21:22
DocScrutinizer05on a sidenote, I felt a little puzzled about the LED's series R21:23
DocScrutinizer05a tad low for a lowpower device21:23
DocScrutinizer05you usually use high-efficiency LEDs in this case, which don't need >1mA to properly shine21:24
DocScrutinizer05I didn't check the math, but 120R sounds a tad low, thus current probably higher than I'd consider OK21:24
DocScrutinizer05sounds more like 10..20mA than 1..2mA21:25
wpwraknice. MCU comes up, SWD works, LED works. also tested that the transceiver has a clock. good enough for today. there's still a lot more to test. the boost converter may still cause a few surprises. that's the last completely new subsystem remaining. well, and USB will be its usual messy self.21:28
DocScrutinizer05I still wonder how exactly this thing is menat to get used21:31
DocScrutinizer05the description on git doesn't sell it to me21:32
DocScrutinizer05do you plug this in to PC USB and it emulates a (2nd) kbd?21:33
DocScrutinizer05and what for is the RF?21:33
DocScrutinizer05btw wtf SWD?21:35
wpwrakyou don't like SWD ?21:36
wpwrakthe basic usage concept is that it stores PWs. then you have a number of ways to use them: 1) display and let the user do something with them. 2) send over USB (as HID). 3) send over RF (as HID). 4) use for challenge-response (with USB/RF). etc.21:37
wpwrakRF is just to avoid the cable.21:37
whitequarkusing RF for a password safe... huh21:37
wpwrakwhitequark: well, encrypted of course21:38
whitequarkfor a typical user would make no difference, I guess21:38
whitequarkwpwrak: still much more attack surface21:38
wpwraktrue. you can choose to not use RF :)21:39
whitequarkbut, if someone wants your credentials that much, I guess there are worse problems21:39
whitequarkso it's probably OK actually21:39
wpwrakthere's always rubberhose cryptography ...21:40
whitequarkI was thinking more along of "looking across the shoulder"21:40
whitequarksince that's likely much easier to pull than RF snooping21:41
whitequark(isn't it rubberhose cryptoanalysis? :)21:41
whitequarkDocScrutinizer05: wait wait, there actually are LEDs which need <1mA to shine?21:41
wpwrakRF or USB prevent this, though. well, unless your login form echoes things back 21:41
wpwrak(cryptoanalysis) yeah, that's better :)21:42
DocScrutinizer05~wtf swd21:43
DocScrutinizer05ooh21:43
whitequarkDocScrutinizer05: swd is jtag's little two-wire brother21:43
DocScrutinizer05whitequark: sure21:43
DocScrutinizer05and what the TLA?21:43
whitequarksame idea, slightly different on the protocol level, works only for arm cores21:43
whitequarkserial wire debug21:44
DocScrutinizer05whitequark: a whole class of LEDs is specified at Ifwd=2mA instead of the usual 20mA21:45
whitequarkby "slightly" I of course mean "bears no resemblance to jtag whatsoever"21:45
DocScrutinizer05serial wire debig \o/   Thanks! 21:45
whitequarkDocScrutinizer05: that's interesting, what's a keyword for them?21:45
DocScrutinizer05errr, high efficiency or whatever21:45
DocScrutinizer05lemme check21:45
whitequarkthat brings up high-power stuff for me21:46
whitequarkfound them, kingbright lc (low current) leds21:46
whitequarkhttp://cpc.farnell.com/1/1/16242-led-5mm-std-yellow-lc-diffuse-l-7113lyd-kingbright.html21:46
whitequarkwonder how they achieved it. some kind of better, more expensive semiconductor?21:47
wpwrakbottom: http://downloads.qi-hardware.com/people/werner/anelok/tmp/brd0-d1-bot.jpg21:48
whitequarkas in, what's the catch21:48
wpwraktop (with eval board): http://downloads.qi-hardware.com/people/werner/anelok/tmp/brd0-d1-top.jpg21:48
whitequarkwpwrak: neat!21:48
DocScrutinizer05low-current actually21:49
DocScrutinizer05http://www.hetronic-webshop.eu/index.php?main_page=product_info&products_id=150421:50
DocScrutinizer05http://cpc.farnell.com/standard-led/forward-current-if/2ma/pg/11009983721:50
DocScrutinizer05ugh, couldn't post THAT URL here, but seems SMD are less common on 2mA, but I found a blue and a white one @ 5mA IF21:55
DocScrutinizer05and now I finally read backscroll ;-P and notice you already found all this as well21:56
DocScrutinizer05(catch) I don't know exactly. something with different dotation(?), transparent chips, reflectors, maybe even different material all together (like GaAsP)21:59
wpwrakwhitequark: thanks :)22:01
whitequarkdo..tation?22:02
whitequarkis that even a word?22:03
DocScrutinizer05http://www.google.de/search?q=led+low+current+smd22:03
DocScrutinizer05no probably not a word22:04
whitequarkoh22:04
DocScrutinizer05in german it's "Dotierung"22:04
whitequarkdifferent dopants?22:04
wpwrakhttp://www.thefreedictionary.com/dotation22:04
DocScrutinizer05my english sucks here22:05
DocScrutinizer05it's the traces of other chemical element in semiconductors making it N or P22:05
DocScrutinizer05N-dotation P-dotation22:05
DocScrutinizer05sorry no idea what's the english term22:06
DocScrutinizer05doping22:07
DocScrutinizer05hehe22:07
DocScrutinizer05so yeah, dopants22:07
wpwraksporty ;-)22:07
--- Mon Oct 7 201300:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!