JTAG C8051 Programming Flakyness - Page 1
Forum section: electronics / projects

author: Jester
author_rank: Frequent Contributor
timestamp: April 05, 2017, 10:57:27 pm
content: I have been asked to investigate a problem related to JTAG programming of a C8051F020 uController, using one of these:http://www.silabs.com/products/development-tools/mcu/8-bit/8bit-mcu-accessories/8-bit-debug-adapterMost of the time this programmer works (I would say ~90% of the time) however it's never 100% this is with the a direct short connection to the JTAG port. I'm not sure why it fails occasionally seems like the firmware is somewhat flaky, unplug the USB end and start again and it usually starts to work.The problem is that this programmer is being used in an automated production test jig that mates to the JTAG port via pogo-pins and furthermore the signals pass through a quad bilateral switch (MAX4602) in the test jig (I assume to isolate the port when the board is being tested as opposed to the programming stage). When the signals pass through the MAX4602 programming is even less reliable, sometimes 50 boards no problem, other times it just decides to stop and sometimes unplugging the USB gets it going again and other times I check everything; continuity signal level on a scope etc and then it just starts working again for no apparent reason. The traces on the test board are quite short 1-2", the connections are all good. The mAX4602 has ~2 Ohm when closed, so I think that should be okay. I have tried two different programmers (same result).Does anyone have any suggestions or ideas?

author: mubes
author_rank: Regular Contributor
timestamp: April 05, 2017, 11:24:45 pm
content: Could be mismatching on the JTAG signals confusing matters, especially if the software happens to be a bit clunky and it's only been tested with happy-flow. Try adding small resistors (47R ish) at the 4602 end of the programming lead. I'm certainly not confident that will be the problem, but you did say you were looking for ideas :-)(Edited: Fix typos now on a proper PC rather than a phone)

author: digsys
author_rank: Unknown
timestamp: April 06, 2017, 12:11:19 am
content: Ahhhh my most favourite MPU series, that I have a love-hate relationship with :-) By coincidence, I am currently going through another round of headaches with their IDEs ..they just don't seem to stop screwing around with licenses, or fixing bugs. As to your issue -I gave up on that connect type and changed to their simple 2wire connect, as shown. I don't get the drop-outs I used to get, but compiling / build project > program are constantlyfreezing / cr@pping out. I use several of the MPUs over a few dozen designs. Even hired other programmers, and they had the same results.There are some nice switched on forum users at - community.silabs.com I would definitely post in there. At least the whole forum is dedicated to users of these MPUs.Apart from mubes suggested, sometimes it is just a layout / gnd / etc problem. I hope it is just that for you. I'm destined to put up with the constant intermittants.

author: Wimberleytech
author_rank: Super Contributor
timestamp: April 06, 2017, 12:33:45 pm
content: The I/Os on the F020 are a little finicky. The can suffer from transient latchup. I suggest that you protect the JTAG pins wth Schottky diodes from the port pins to VDD and ground. Best placement would be near the F020 but sounds like the board is in production, so just put the diodes as close to the pogo pins.

author: Jeroen3
author_rank: Super Contributor
timestamp: April 06, 2017, 12:47:38 pm
content: Their jtag adapter can't handle even the slightest common mode glitch from a nearby relay.Just keep trying, or buy preprogrammed parts.Does the jig use their cmd tooling or custom software?We've "fixed" it by using 5 programmers to program a set of 100 units semi-automatic.We start with 5, and end with 3 working programmers at the end. They're just not reliable.They're also horrible for debug, they keep dropping. But they work much better if you remove target power signal from the header.

author: Wimberleytech
author_rank: Super Contributor
timestamp: April 06, 2017, 02:18:37 pm
content: Just curious...why are these your favorite MPUs?

author: digsys
author_rank: Unknown
timestamp: April 06, 2017, 02:52:18 pm
content: Quote from: WimberleytechNearly all my work is very low level, dedicated, high IO, monitoring/control/security etc. The huge range of on-board ADCs, DACs, CAN, RTCs etc etc make my life so easy :-)I used to use 16/32b MPUs, DSPs, FPGAs, EPLDs etc etc which took up a lot of room and/or complexity, but now I can do just about anything in 1 tiny MPU.I've often replaced dedicated KBD/ LCD ICs with a single purpose 8051s as well, at much less cost, and with any "bugs" sorted. Some quite complex functions I've fittedinto a vehicle relay module, as a straight "replacement". Did I mention the extensive SFRs, memory management and other on-board logic :-)BUT, since day1, their constant IDE bugs / licensing cr@p SUCKED ! For the work I do, it's a perfect fit.

author: Wimberleytech
author_rank: Super Contributor
timestamp: April 06, 2017, 03:09:13 pm
content: Quote from: digsys on April 06, 2017, 02:52:18 pmThanks for your great comments!! "The huge range..." Indeed, that was one of the main goals of the product line when it was originally conceived!!

author: digsys
author_rank: Unknown
timestamp: April 06, 2017, 10:09:08 pm
content: Quote from: Wimberleytechyw. As an example - My open source BMS (monitor/safety) for Solar EV race cars (and other EV battery packs) - 22x cell packs with 1mV resolution, 2x primary temp sensors,bi-dir current sensor, fan control and a few IO plus extensive UART / CAN / SPI / I2R etc functionality. The F504 was a perfect fit !! and automotive grade !oops:www.pbase.com/digsys/image/161061568more pix on the gallery

author: Wimberleytech
author_rank: Super Contributor
timestamp: April 07, 2017, 01:36:03 am
content: Whoa! Lots of coulombs! Impressive. Thanks for sharing!! Virtually every product in the line from day 1 is still selling in volume since 2000. Unfortunately missed the Arduino wave...Atmel was pretty clever (or lucky) to land that.

author: Jeroen3
author_rank: Super Contributor
timestamp: April 07, 2017, 05:26:31 am
content: You're just paying almost $10 per part for those older ones. Very expensive compared to the competition.

author: digsys
author_rank: Unknown
timestamp: April 07, 2017, 06:21:34 am
content: Quote from: Jeroen3Well, I haven't checked prices in the last 2 yrs, I bought heaps back when I did the designs. Even so, $10-even $50 extra is not worth re-writing code / hardware for the savings.Quote from: Jeroen3Same series? Exactly the same internals, C8051F040 equivalent? What p/n would you compare this to? IDE package? Always worth a look.

author: Jeroen3
author_rank: Super Contributor
timestamp: April 07, 2017, 07:10:05 am
content: Any minimum flash size STM32F1 or F3 outperforms the 8051F04's. However, because it's 8051 you're kind of in a corner. Because code made for 8051 doesn't share platforms very well.Except of course when you're relying on fancy analogs. Then you might want those Cypress PSoC.And, you can get manyreliableprogramming tools for those chips as well!

author: digsys
author_rank: Unknown
timestamp: April 07, 2017, 12:12:21 pm
content: Quote from: Jeroen3ummmm NO. I thought you meant withexact sameinternals. To answer your points -- After a quick check, I can still buy them for ~$5.00, which is FINE.- These have all the processing CISC speed I need, it's the rich set of internals I NEED.- All my projects are dedicated function, they will NEVER need to be ported anywhere and I have 15 yrs of libraries that I've built up.- I have looked at Cypress and used / looked at others, and I did mention all that previously.- I can put up with the IDE issues

author: Jeroen3
author_rank: Super Contributor
timestamp: April 07, 2017, 12:21:44 pm
content: They're all special. And that's why they still sell. Fancy analogs, some computation, low energy.As long as there is market.You know you can use keil for 8051? Their ide and programmer is not that horrible.

author: ehughes
author_rank: Frequent Contributor
timestamp: April 08, 2017, 02:38:41 pm
content: I remember the original Cygnal brand and still love the 8051. I am pretty sure it will be around forever.