Intermittent problem accessing 5223x with TBLCF

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Intermittent problem accessing 5223x with TBLCF

2,512 Views
Oliver
Contributor III
Hello everyone,


I have a strange problem accessing my 5223x board with DanielM's TBLCF board.

When things work, they keep working, I can erase, flash, debug... everything.

But sometimes things don't work.TBLCF is recognized and the LED flashes, but the blank check
and verify blank, programming, basically every access fails with a "Flash Programmer: CFGDIProtocolPlugin : An error occurred while trying to read registers" message in the log file.

When I turn off target initialisation, erase runs to completion, but I'm not sure the device is actually erased.

The funny part is, I have not managed to find the reason for this behavior. I am using the exact same config file I'm using when everything works. I have unplugged and replugged TBLCF, both the USB side and the CF side. Powering down the target does not help either, neither does reset. Reboot of the PC, no effect.

But turning everything off, cursing, going to bed, and powering everything up the next day seems to help, because things tend to run again the next day.

Of course this slows down development immensely, I'd like to get this thing to run, or at least know what to do to prevent this from happening the next time I try to work on my project.

Any help will be appreciated!

Best regards,


Oliver
Labels (1)
0 Kudos
4 Replies

427 Views
ChrisJohns
Contributor I
hi Oliver,

This should not happen but could and yes cursing is always well worth a try. There are a few things you could do to isolate the problem. The problem could be related to the target, the pod, or the DLL (and host USB software). I exclude the application software as I assume a restart of this software will clear any issues.

I assume you are using a Windows flash programmer. Which one ?

A few ideas are listed here. If the problem exists after each one the state must be held up stream. A target power cycle should clear any errors in the target (problem in pod or host software). Disconnect and reconnect the pod (problem in host software). The DLL may stay loaded and may hold a state. This last one is a guess as I do not know the DLL software or how it works. In other words try and break the problem down to which part is not recovering.

The flash erase may appear to work when the target is switched off. If this is happening it may be just good luck rather than by design.

Different host software may also help isolate the problem. I have a patch for the Sourceforge BDM project to support 5223x flash programming. I am yet to get this into CVS so those tools will not help you do your flashing how-ever the tools can help debug the current problem. You could always download this softare and try it to see if the pod is still working at a low level after a failure. Just try a target reset. The download is:

 http://www.rtems.org/ftp/pub/rtems/people/chrisj/bdm/m68k-bdm-1.4-pre3.exe.

Regards
Chris
0 Kudos

427 Views
Oliver
Contributor III
Hi Chris,

thanks for responding.

I am using Daniel Malik's Turbo-BDM-Light for Coldfire or whatever the official name is.

Target power cycling does not help. Neither does disconnecting or reconnecting the pod, or disconnecting the
USB connection. The communication between PC and pod seems to be fine also, because when I disconnect the pod from the target, I get some "Can't connect to target" message. With the pod connected to the target, I am able to run the hardware tests on the target without error (well, I abort them after a few seconds, because I only want to test the communcation), and I'm able to run erase/program/verify to the point where some code is downloaded into the target CPU and then fails with an "error reading" or "error writing".

Indeed, a DLL may stay loaded, but I also tried to shut Target and PC down, and restart everything, and the situation persisted. Maybe there is a certain sequence that must be adhered to, I don't know. I power cycled  the target before booting Windows, but I don't know if that's relevant. The pod should not care, IMO.

You see, I have already tried to logically isolate what is wrong, and I was about to pronounce the processor dead, when the next day everything worked again, and with the system working I was able to plug/unplug the pod, disconnect/reconnect USB, power cycle, everything worked again and I haven't been able to reproduce the problem, until it came back yesterday. I'm new to working with the ColdFire, so I've only had 6 sessions so far, with the failure occurring twice so far. So my hope is the problem will be gone next time, but I don't know for sure, and it takes the fun out of working with ColdFire I can tell you, whatever the reason is.
0 Kudos

427 Views
Oliver
Contributor III
Hi again,

I was able to get things to run again - for some reason the "Erase sectors individually" was set, but this time I was able to erase even with device initialisation on, which was not the case before. Unchecking the box led to success with blank check, and successive programming/verify worked as well.

I've saved the settings again, let's see if it acts up again tomorrow...

Thanks,

Oliver
0 Kudos

427 Views
ChrisJohns
Contributor I
Hi Oliver,

I do not have any further documentation on using the BDM tool. I will look into this but it will not happen soon. Sorry about that.

Regards
Chris
0 Kudos