Impossible error in JTAGICE mkII debug session

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am attempting to debug a pair of CAN nodes. I have included a link to an AVRstudio screen shot showing R24 with a 0x57 value writing to SRAM special function I/O register address 0xEF (CANCDMOB) with a STS instruction and having CANCDMOB show a value of 0x97, not 0x57.

The screen shot is in disassembly view just after a F11 single step. It really shouldn't matter, but this is WinAVR 20100110. This debugging failure is produced with a simple run to cursor, then F11 single steps to get to the bad STS operation.

This is quite simply supposed to be impossible. There is no AT90CAN128 data sheet errata for this. Has anyone ever seen this behavior?

I can make the source code available for reproducing the failure, but you will need two connected operational AT90CAN128 CAN nodes with JTAGICE mkII hardware to check this problem. If anyone has the required hardware and is willing to help, please let me know (reply to this thread) and I'll get you the source code.

Link to AVRstudio screen shot:
http://www.onfreq.com/AVRbug3.gif

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Mike,

I cannot try this as I don't have a real can128 but what happens is you simply build/run this Asm in Studio?

	.include "can128def.inc"

	.cseg
	.org 0 
 	JMP reset 

; int vectors here

reset: 
	ldi r24,0x57 
	sts 0xEF,r24
loop:
	RJMP loop

Is bit 7 "stuck" in this case too?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My apologies Cliff (I have not been ignoring you). My other CAN node (an Olimex AVR CAN board) is having regulator voltage stability problems. It still works, but I want to replace the adjustable regulator chip with a fixed regulator before continuing with any testing. My other test board is a STK500/501/ATADAPCAN01.

I should have mentioned that just before the F11 step the CANCDMOB (0xEF) value was zero, so the bit is not stuck. Since there are 15 different CANCDMOB registers I modified your test code to address each CANCDMOB register, but can't run it yet until Digikey delivers the new regulator chip. I had previously modified the CAN initialization C code and was able to correctly set a 0x57 value in all the CANCDMOB registers, but the CAN was not yet enabled at that time, so I expect your assembly code will also work when I try it (verification is still important). Thanks for the help, I'll be back later with more.....