Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HP
Level 1
Level 1
First question asked Welcome!

Hey,
I am stuck with the following code.

movh.a a15, #0x8000
lea a15, [a15]0x4000 //0x80004000 contains a word (not 0, say 80808080)
ld.w d15, [a15+] //load a word from 80004000 into d15.     a15 + = 4
91 00 00 F8
D9 FF 00 04
44 FF

But d15 still contains 0. Processor 1766.
What have I done wrong?
ld.w d15, [a15 ] // without increment it works just fine

0 Likes
1 Reply
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hello,

Can you tell which version of Tricore/device and also the compiler used here? You seem to have provided the opcode/operand details for the first two instructions, can you also provide opcode/operand details for ld.w d15, [a15+]? Also, what is the value of a15 after the execution of ld.w?

Thanks.

0 Likes