Hello,
I had used to disable the can message interrupt for message box dynamically while program is running by using the below code snippet,
while ((canREG1->IF2STAT & 0x80U) == 0x80U);
canREG1->IF2MCTL = 00001088uL;
canREG1->IF2CMD = 0xC0u;
canREG1->IF2NO = 1u;
while ((canREG1->IF2STAT & 0x80U) == 0x80U);
And this function is successful. Please let me know is there any problem in this code snippet.