This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Can anyone help me understand why subtracting 16 from interrupt address?



Hello everyone,

I am such a beginner. I hope someone can help me understand this question.

I am studying about interrup using given interrupt example.

But there are some codes I cannot understand.

HWREG(NVIC_SW_TRIG) = INT_GPIOC - 16;

I know this code is to trigger GPIOC interrupt on purpose. But I dont know why it is subtracted by 16?

Is INT_GPOIC the address of GPIO interrupt?

It would be really helpful if anyone can give me correct answer.

Thanks,