Quantcast
Channel: ARM Connected Community: Message List
Viewing all articles
Browse latest Browse all 8551

About sample code for Newnes "Definitive guide to ARM Cortex M3 and Cortex M4 Processors" on OS support

$
0
0

I have the Third edition of the book and I'm having a bit of trouble understanding something. I have read this part several times and tried analyzing it but I know I'm missing something:

 

In the first example (sample code) in chapter 10 (pg340 in my book) there is a line that says:

 

HW32_REG((PSP_array[0]+(14<<2)) = (unsigned long) task0;

//initial Program Counter

 

What I don't understand is why (14<<2)? And I guess my question is two-part; why put that and not 56? And why that value? (it confuses me because it is not a multiple of 32, which I figured would be the expected offset for an address...)

 

Thank you for your time,

Nick


Viewing all articles
Browse latest Browse all 8551

Latest Images

Trending Articles



Latest Images