I am having some problem to pass parameter into subroutine.
I have defined:
BOOLEAN CRC_Message_Verify(UINT8 nbyte);
in my program, I have this line:
crc_ok = CRC_Message_Verify(SpiLoadIndex);
in which, SpiLoadIndex is defined as UINT8 xdata type,
when I single step debugging, before calling CRC_Message_Verify function, SpiLoadIndex = 5, and inside the subroutine, nbyte = 95. How come nbyte is totally different? Any ideas?
when I single step debugging, before calling CRC_Message_Verify function, SpiLoadIndex = 5, and inside the subroutine, nbyte = 95. How come nbyte is totally different? Any ideas? 1) which chip - reflects on what debug is available 2) 'debugging'? how (WHICH simulator/emulator.JTAG) ???? 3) some 'dehuggers' can not 'see' a value if you click on it in the function header, only if you click on it where it is used inside the function 4) I assume that "inside the subroutine" means while stepping inside the function, not looking at the variable while stepping somewhere else (scope)
Erik
The chip is Analog device ADuC848, and the debugger is USpear from accutron ltd, it is a two-pin emulator. I put SpiLoadIndex and nbyte in the watch window and I can see these two numbers do not match. And yes, I am stepping inside the function and there is only one place calling this function. It is very strange.
So, have you asked Accutron about this, then?
View all questions in Keil forum