This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

bad cpu/memory?

Hello everyone, this time I doubt the problem is caused by my (lack of) c skills, as the issue occurs inside the standard keil STARTUP.A51 file :)

Have a look at this assembly code;
I expanded it to be more "granular", so as to see exactly which partial instruction is failing:

IF IDATALEN <> 0
MOV R0,#IDATALEN - 1
IDATALOOP:
CLR A
MOV @R0,A
DEC R0
MOV A,R0
JNZ IDATALOOP
; DJNZ R0,IDATALOOP
ENDIF

This piece of code sometimes stalls (seemingly at random); if I step into it with the uVision debugger, I see the DEC R0 instruction decrementing R0, then the MOV A,R0 puts the old(!) value of R0 into A.

To me that says faulty hardware. [confirm/deny]?

my IDATALEN is 80H, and i'm using a 8252.


Cheers,
Barry

Parents
  • It doesn't seem to be exactly reproducible, although the sequence of events needed to trigger the problem may just be eluding me.
    I do have MON51 loaded, and yes; i'm using RTX51TNY (with round-robin disabled).

    Question: the keil documentation seems to say that STARTUP.A51 is the absolutely first piece of code run after a cpu reset.
    I must admit though, the problem did first occur once I started using the rtx51tiny rtos; so your suggestion as to the probable cause is likely correct :)


    cheers,
    Barry

Reply
  • It doesn't seem to be exactly reproducible, although the sequence of events needed to trigger the problem may just be eluding me.
    I do have MON51 loaded, and yes; i'm using RTX51TNY (with round-robin disabled).

    Question: the keil documentation seems to say that STARTUP.A51 is the absolutely first piece of code run after a cpu reset.
    I must admit though, the problem did first occur once I started using the rtx51tiny rtos; so your suggestion as to the probable cause is likely correct :)


    cheers,
    Barry

Children
No data