Tool/software: Code Composer Studio
Looking at this one code line that is part of the initialization code for the control law accelerator (part of the example project HVPM_Sensorless_CLA):
Cla1Regs.MVECT1 = ((Uint16)Cla1Task1 - (Uint16)&Cla1Prog_Start);
I have two questions
1. How does the compiler translate typecasing a function name eg: (uint16)Cla1Task1 ? I would have used (uint16)&Cla1Task1 instead where the address of the function is used instead of the functions itself.
2. In order for this to work the ISR function Cla1Task1() must be located in L3 DPSARAM region (between address 0x9000h - 0xA000h), but I can't find the code / linker script that is actually placing the Cla1Task1 function in this RAM region in the first place. Where/how does this work?