Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE
Hello,
In the 'Ecan.c' file of the C2000ware package, there is a line 'ECanaRegs.CANME.all = 0', which is used to disable all mailboxes (In lines 208 and 358). But since CANME comes under control and status registers category, for which only 32-bit accesses are allowed, won't this statement corrupt the register contents? As per the datasheet, the control and status registers can be accessed only through shadow register.
So, instead of 'ECanaRegs.CANME.all = 0', shouldn't it be as follows:
ECanaShadow.CANME.all = ECanaRegs.CANME.all;
ECanaShadow.CANME.all = 0
ECanaRegs.CANME.all = ECanaShadow.CANME.all;
Thanks,
Anu