Electronics > Repair
Fluke 8840A Faulty CPU
essele:
Ok .. I've had enough for a while on this, I just can't get over this last issue.
I've even implemented a more efficient serial receiver using a datapath component so that I can fit it all in to the programmable logic, but no change in behaviour, so I think the serial side is actually a red herring (especially given the external trigger, which is over serial, seems to work perfectly.).
For the time being I've just dumped all of the code, schematic, and pcb stuff into GitHub ... I haven't tidied it much, so there are lots of remnants of debugging in there and still quite a few things to tidy.
https://github.com/essele/Fluke_Z8_Emulator
If anyone feels like getting stuck in then please let me know.
SilverSolder:
I noticed this sticker on your meter:
:-DD
coromonadalix:
yep broken sticker loll
Keep up the good work, hope you find the little buggar ..
essele:
Ok ... I’ve just come back to this as I need to sort out the three broken 8840A’s that I now have, all with CPU issues.
So now I’ve implemented a firmware ‘patching’ mechanism by using an illegal instruction as a special emulator call and then patching this into the firmware in some key places, this makes it easier to do the following:
1. Replace the line freq code with native code to ensure accuracy.
2. Replace the main delay loop subroutine with a more accurate one.
3. Put test code in at specific points to better understand what is going on.
I also redid the interrupt code yet again, and spent ages decoding serial again ... both of these to no avail.
However, using (3) above, I was looking more closely at the timer, and for some reason I completely missed the fact that it sometimes configures itself to use an external clock input (the ADC signal) rather than the internal clock ... this seems to be when using external triggers. My emulator doesn’t currently support that and it just continues to run with the internal clock.
So my theory now is that, whenever you have a GPIB card, trigger signals are generated by that instead of the normal clock, and hence this then uses the timer differently. So I think with my current implementation the GPIB triggers and the timer triggers are interfering with each other ... which fits quite well with what I’m seeing.
So, I’ve reworked the timer using two cascaded TCPWM modules and I should be able to remove my custom verilog hack as a result. I just need to add support for the external clock input (which looks straightforward) and then I have a good level of confidence I might have cracked it.
Hopefully will update at the weekend...
essele:
I've finally cracked it!
After much probing and reworking, I've managed to get it working...
I reworked the timer code, I put in "patches" to accelerate the ADC reads and the display updates, so they are handled by the PSoC and not emulated, I put in a patch to more accurately handle delays, I even put in a patch to cache the cal EEPROM to speed up that access. I also used another timer to delay the serial send and receive. None of that worked.
So, I redid the interrupt code again (probably for the 10th time now!) and now have it so that it runs with PSoC IRQ's enabled, the handlers just set an appropriate flag and then the main execution loop checks to see if an IRQ has occurred and causes the Z8 ISR to run.
That didn't work either ... at first!
So when I moved the IRQ check and ISR call so that it was after the "next instruction execution" everything started working, so I think the Z8 will actually check the interrupt status during a given instruction execution (for example the one after the IRET) and I was checking before, and therefore potentially jumping into another ISR without executing that instruction.
So everything is working ... serial comms to the GPIB card (although I still need to check GPIB actually works), remote triggering, all the self tests, running on slow, medium, and fast speeds. All looks good.
It does break again when you compile with any optimisation enabled, so there is likely some very tight timing needs, but "None" seems to do the job nicely and I'm not inclined to spend any more time on this. I'm going to get my three 8840A's up and running and then I never want to see another one ;-)
I'll update the GitHub once all is complete.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version