Managed to squeeze DAP42 down to a DIP24 package size. (huge image alert) - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: September 09, 2018, 06:16:42 pm
content: DAP42 is a CMSIS-DAP compatible debug probe built around the 20-pin STM32F042F6. I just managed to squeeze it into a DIP24 physical size for a dev kit I drew for ATSAML11D16A.That chip needed a custom USB to serial solution to invoke bootloader mode anyway, and my go-to is already STM32F042 for this purpose, so might just as well connect the SWD lines too and turn the USB to Serial chip into a full blown DAP42-SWD.I ran a KiCad 5 ray trace on this. The back side of the board is poorly lit though, might need some Photoshop touch-up.Front, with the ATSAML11D16A:Back, the STM32F042F6P6 based DAP42 debug probe:

author: carl0s
author_rank: Unknown
timestamp: September 10, 2018, 08:29:49 pm
content: Speaking of ray-tracing, I think you could do with a faster web serverhttps://youtu.be/edLbjafWvkIalso the second image isn't showing for me at all

author: carl0s
author_rank: Unknown
timestamp: September 10, 2018, 08:34:01 pm
content: Quote from: blueskull on September 10, 2018, 08:31:43 pmBoo. Might just be me thenI'm in the UK on vdsl2 type FTTC.The second one appeared a few minutes later. Well half of it had anyway.I just thought it was funny with the talk of ray tracing. Reminded me of my Amiga from a long long time ago.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: September 10, 2018, 09:29:31 pm
content: Slow here too, but I've got "only" 40Mb fibre... I think something in between is throttling the speed.

author: rstofer
author_rank: Super Contributor
timestamp: September 10, 2018, 09:34:48 pm
content: 350 MHz wire, I didn't notice a thing.

author: carl0s
author_rank: Unknown
timestamp: September 10, 2018, 10:38:03 pm
content: Quote from: donotdespisethesnake on September 10, 2018, 09:29:31 pmSomething UK side by the looks of it huh,Well, I feel a bit bad about the derailed discussion, because another reason why I made me original reply, apart from trying to make a funny comment about ray tracing, was to also say that hopefully somebody will be along soon who understands the significance of the achievement, and that maybe the reason they weren't already was because of the images-taking-about-fifteen-minutes-to-appear situation.

author: technix
author_rank: Super Contributor
timestamp: September 10, 2018, 11:36:07 pm
content: Quote from: carl0s on September 10, 2018, 10:38:03 pmI just can't really afford a faster server at this moment, especially since I just paid its annual fee.

author: technix
author_rank: Super Contributor
timestamp: September 10, 2018, 11:38:05 pm
content: Quote from: blueskull on September 10, 2018, 08:31:43 pmQuote from: carl0s on September 10, 2018, 08:34:01 pmQuote from: donotdespisethesnake on September 10, 2018, 09:29:31 pmQuote from: rstofer on September 10, 2018, 09:34:48 pmI am on 200Mbps FTTH with a custom-built PC-as-a-router.

author: technix
author_rank: Super Contributor
timestamp: September 11, 2018, 05:01:48 am
content: Quote from: blueskull on September 11, 2018, 12:18:06 amI live in Shanghai, so it is fairly close to where the China-US cable lands.

author: xaxaxa
author_rank: Regular Contributor
timestamp: September 12, 2018, 10:31:58 am
content: I have been in china for a while and the internet here is ABSOLUTE TRASH. The last mile is FTTH and it's fine, but the backbone to the rest of the world is always congested and you are lucky to get 1Mb/s. You get random waves of packet loss lasting anywhere between a few minutes to hours during which your packet loss rate averages 40%. This is to both NA and EU. Internet within china is probably fine, but there is nothing useful on it. It's almost as if it's some conspiracy to make foreign websites and web services unusable so that people are forced to use the internal crap.

author: technix
author_rank: Super Contributor
timestamp: September 12, 2018, 11:03:31 am
content: Quote from: xaxaxa on September 12, 2018, 10:31:58 amDepeding on where you live, not all people have equal access to the NA Internet routes. The EU link is indeed much slower due to all Chinese Internet traffic to EU and most of the country's access to NA are shoved down that pipe. I live in Shanghai, which has sort-of fast-lane access to the NA link, so access to MA is much faster.Quote from: xaxaxa on September 12, 2018, 10:31:58 amThis is the point of Great Firewall of China, cutting Chinese citizen off from most foreign news sources. This is considered part of the perpetual political battle of ideology between the Western Democracy and Chinese Authoritarianism.The government expect elites establish local equivalents of those useful things (with an authoritarian twist placed in it) but elites just flee due to other political uncertainties (Google the year 1989 with the country name and you will get a clue why.)

author: carl0s
author_rank: Unknown
timestamp: September 12, 2018, 06:55:26 pm
content: Well interestingly, those images (still) load up at almost exactly 128kbps (16KiB/s). I thought it seemed a bit odd. Bit too exact.I am with Plusnet in the UK.I look after IT for quite a few offices so I have remote access to lots of different computers and ISPs.I tried my office PC which is on a 100/100 BTnet leased line, and the images loaded fast.I tried a customer who is also with Plusnet, and it was super slow just like mine.I also just tried a customer who is with Virgin Media Business (not proper business, but same DOCSIS rubbish as Home), and that is also like watching ray-tracing on an Amiga.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: September 12, 2018, 07:33:02 pm
content: Maybe home internet users are subject to content filtering*, and the proxy has limited bandwidth?You know, to protect us from "bad" pictures.

author: carl0s
author_rank: Unknown
timestamp: September 12, 2018, 08:48:33 pm
content: Quote from: blueskull on September 12, 2018, 07:44:25 pmI'm not sure he was referring to the great firewall.However, although I am on Plusnet Home, at home, the other site I tested from which showed the same 128kbps, was Plusnet Business.Never noticed a problem before though, so it's a bit odd. Might explain why my efforts to buy PCBs from taobao were so fricking nightmarish.Also, I have opted out of the safeguard proxy thing, of course that doesn't mean I'm not still going through other caching transparent proxies.

author: carl0s
author_rank: Unknown
timestamp: September 12, 2018, 08:54:43 pm
content: Oh yeah and I forgot about the Virgin Media one, which was also super slow. That's a 300mbps DOCSIS "fibre", and arch rival to somebody like PlusNet.Weird anyway. So out of 3 ISPs, one has been fast for the above images (BTNet), and the other two totally unrelated ISPs have been unbelievably slow. Plusnet are owned by BT, not sure how much that matters, but it means if anything, the fast and slow ISP are all part of the same company, but the other slow ISP is totally unrelated.

author: carl0s
author_rank: Unknown
timestamp: September 12, 2018, 09:04:03 pm
content: Here the connection that doesn't have a problem with those images:Code:C:\Users\Carl>tracert -d en.maxchan.infoTracing route to vps2.ds.maxchgw.info [69.163.40.80]over a maximum of 30 hops:[skipped first couple of hops for privacy]3 1 ms 4 ms 14 ms 217.32.170.1344 17 ms 18 ms 19 ms 109.159.252.2215 15 ms 15 ms 15 ms 213.121.193.416 20 ms 20 ms 21 ms 213.137.183.1007 21 ms 56 ms 17 ms 195.66.224.218 81 ms 81 ms 81 ms 72.52.92.1669 102 ms 102 ms 102 ms 184.105.223.16110 110 ms 110 ms 110 ms 184.105.223.17811 139 ms 140 ms 141 ms 184.105.223.19312 146 ms 147 ms 148 ms 184.105.64.13813 150 ms 153 ms 151 ms 66.220.22.8614 155 ms 137 ms 135 ms 69.163.40.80Trace complete.here mine at home which has a problem, via Plusnet VDSL2 'fibre' (80/20):Code:3 11 ms 11 ms 11 ms 84.93.253.1274 12 ms 11 ms 11 ms 195.99.125.1425 12 ms 11 ms 11 ms 195.99.127.706 11 ms 14 ms 18 ms 213.137.183.1027 * * * Request timed out.8 79 ms 79 ms 79 ms 72.52.92.1669 96 ms 96 ms 96 ms 184.105.223.16110 104 ms 104 ms 104 ms 184.105.223.17811 136 ms 135 ms 136 ms 184.105.223.19312 139 ms 147 ms 139 ms 184.105.64.13813 139 ms 139 ms 141 ms 66.220.22.8614 141 ms 141 ms 141 ms 69.163.40.80Trace complete.and here the Virgin Media Business ("small business".. uses the same physical shared DOCSIS network as the home users, but different profiles and what not.)Code:Tracing route to vps2.ds.maxchgw.info [69.163.40.80]over a maximum of 30 hops:1 <1 ms <1 ms <1 ms 10.10.1.2542 1 ms 1 ms 1 ms 192.168.0.13 * * * Request timed out.4 12 ms 11 ms 12 ms 62.253.138.2455 * * * Request timed out.6 29 ms 22 ms 22 ms 62.254.85.867 * * * Request timed out.8 30 ms 18 ms 20 ms 84.116.135.429 39 ms 19 ms 74 ms 216.66.80.11710 87 ms 88 ms 87 ms 72.52.92.16611 102 ms 104 ms 103 ms 184.105.223.16112 111 ms 111 ms 110 ms 184.105.223.17813 152 ms 143 ms 143 ms 184.105.223.19314 149 ms 155 ms 148 ms 184.105.64.13815 147 ms 145 ms 146 ms 66.220.22.8616 147 ms 149 ms 147 ms 69.163.40.80Trace complete.anyway I've got to go because something's just broke

author: technix
author_rank: Super Contributor
timestamp: September 13, 2018, 03:40:22 am
content: Here is mine from Shanghai Telecom home FTTH.Code:1 124.78.112.1 7.555 ms 8.064 ms 8.458 ms2 61.152.0.209 4.411 ms 61.152.48.45 3.768 ms 61.152.0.213 3.330 ms3 202.101.63.130 5.664 ms 5.635 ms 5.604 ms4 202.97.24.198 3.860 ms 202.97.57.157 4.460 ms 202.97.50.158 4.173 ms5 202.97.91.46 4.135 ms 202.97.35.26 5.192 ms *6 202.97.51.250 135.293 ms 202.97.27.218 162.397 ms 202.97.52.230 159.786 ms7 202.97.50.225 153.405 ms 202.97.50.81 169.225 ms 202.97.50.225 152.983 ms8 64.62.244.61 136.720 ms 129.819 ms 129.838 ms9 184.105.81.237 152.707 ms 156.398 ms 157.717 ms10 184.105.64.134 161.347 ms 162.422 ms 184.406 ms11 66.220.22.86 162.737 ms 160.479 ms 173.612 ms12 69.163.40.80 175.934 ms 176.192 ms 157.108 msMy home is actually on the business network, since we share the same PON uplink with a few businesses located near here.

author: carl0s
author_rank: Unknown
timestamp: September 13, 2018, 09:11:39 pm
content: Quote from: technix on September 13, 2018, 03:40:22 amHoly crap. You have ~170ms RTT to your own webserver in the same country as you? That's not good is it? In fact that's worse than all my tests from the UK to your web server.

author: carl0s
author_rank: Unknown
timestamp: September 13, 2018, 09:54:08 pm
content: Quote from: blueskull on September 13, 2018, 09:25:39 pmooh, that'd explain it. I'll get m'coatI stupidly assumed that one would normally get web hosting in one's own country, without actually checking the IP

author: technix
author_rank: Super Contributor
timestamp: September 14, 2018, 02:51:05 am
content: Quote from: carl0s on September 13, 2018, 09:54:08 pmIf I want to get a server in China, I need to:Start a company with no less than CNY 1M capital,Make sure no less than 50% of the shares are held by a state-owned entity (yes I must not have a controlling interest in it,)Hire no less than 6 licensed newspaper editors (even though they would do absolutely nothing I must have them on the payroll,)Go through a lengthy multi-agency licensing process, million-scale bribery might be necessary when trying to untangle cyclic dependencies,Surrender a good portion of creative control to the state-owned news agency (goes nicely with the surrender of controlling interest part,)That is why I put my servers outside China (in fact a good amount of website-owning Chinese people do this.)

author: drussell
author_rank: Super Contributor
timestamp: September 14, 2018, 03:57:19 am
content: Something is definitely weird somewhere upstream.I get about 30ms ping times to your server but if I try to fetch one of those images, I get about 35 KB/sec maximum. Upstream link is via a Hurricane Electric fiber.Code:traceroute to vps2.ds.maxchgw.info (69.163.40.80), 64 hops max, 40 byte packets1 XXX 0.738 ms 0.564 ms 0.536 ms2 XXX 1.125 ms 1.022 ms 1.902 ms3 XXX 6.126 ms 1.039 ms 8.390 ms4 XXX 2.251 ms 1.409 ms 4.584 ms5 v219.core1.yyc1.he.net (216.218.224.113) 3.738 ms 1.210 ms 3.806 ms6 100ge10-2.core1.yvr1.he.net (184.105.64.113) 14.034 ms 18.912 ms 15.824 ms7 100ge10-2.core1.sea1.he.net (184.105.64.109) 15.238 ms 14.404 ms 16.177 ms8 100ge11-1.core1.pdx1.he.net (184.105.64.138) 23.592 ms 20.989 ms 18.762 ms9 direct-space-networks-llc.gigabitethernet2-13.core1.pdx1.he.net (66.220.22.86) 27.861 ms 23.274 ms 27.294 ms10 69.163.40.80 (69.163.40.80) 28.194 ms 29.754 ms 29.906 ms

author: newbrain
author_rank: Super Contributor
timestamp: September 14, 2018, 06:52:47 am
content: technix, what is the maturity of DAP42 (your version or the original one)?Are there any rough edges or does it work OK for the most common things (debug, breakpoints, SWO etc.)?The Readme files a re bit sparse in details but the original one says:QuoteSorry to bring the thread back on topic!

author: carl0s
author_rank: Unknown
timestamp: September 14, 2018, 07:31:12 am
content: Wow. It's that bad? That is crazy :-/

author: westfw
author_rank: Super Contributor
timestamp: September 14, 2018, 10:13:20 am
content: QuoteWhat kind of performance do you get from it? (is there even a benchmark for debugger performance?)A lot of the "low-end" SWD or JTAG "built-in debuggers" have a reputation of being much slower than their more-expensive counterparts (ie Atmel mEDBG (a an ATmega32u4) vs Atmel EDBG (some sort of AVR32 chip.) (and also: much slower for uploading code than even serial programmers, despite the theoretically faster USB com link.) I've been wondering whether CMSIS/DAP is fundamentally slow, or whether poor implementations are to blame...

author: technix
author_rank: Super Contributor
timestamp: September 14, 2018, 12:49:37 pm
content: Quote from: newbrain on September 14, 2018, 06:52:47 amDevan's code is not compiling due to a broken libopencm3. As of mine I am still trying to get it to work properly really. (It can be detected by Keil uVison and OpenOCD but not yet connecting.)Quote from: westfw on September 14, 2018, 10:13:20 amCMSIS-DAP is speed limited by the interface. The HID-based CMSIS-DAP is capped 64kB/s on USB 1.1 interface (DAP42, mEDBG) and slightly faster on USB 2.0 (EDBG.) One can run it over Bulk for full link speed but that will require additional work.

author: technix
author_rank: Super Contributor
timestamp: September 14, 2018, 05:25:38 pm
content: Quote from: newbrain on September 14, 2018, 06:52:47 amDo you have any idea how to debug a CMSIS-DAP firmware? Something must be wrong with my implementation since I am getting RDDI-DAP errors in SWD modes but proper JTAG bus scans in JTAG mode against a STM32F407 target. As of actually programming and debugging that is another can of worms I have yet to open.

author: newbrain
author_rank: Super Contributor
timestamp: September 14, 2018, 08:22:38 pm
content: Quote from: technix on September 14, 2018, 05:25:38 pmWith another debugger?I have only got my toes wet adding support forTexas MSP432andNXP Kinetis KE04(not yet merged) to Black Magic Probe, but all the SWD infrastructure was already in place.I'm not promising anything, but if I have time I might try to clone your repo and flash it on a Nucleo F042, to see what happens.

author: technix
author_rank: Super Contributor
timestamp: September 15, 2018, 02:51:32 am
content: Quote from: newbrain on September 14, 2018, 08:22:38 pmWhat I mean is finding out the details behind the error message.