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.

TMS320F28075: Access to CAN registers

Part Number: TMS320F28075
Other Parts Discussed in Thread: C2000WARE

In Technical Reference Manual on page 2074 there is the following note:

The CAN module uses a special addressing scheme to support byte accesses. This is the same addressing that is used on the USB module.
For ease of use, IT IS RECOMMENDED TO ONLY MAKE 32-BIT ACCESSES TO THE CAN REGISTERS. However, at higher optimization levels, the compiler may split a 32-bit access into two sequential 16-bit accesses, which will corrupt the register value. A compiler fix is in development. IN THE MEANTIME, 16-BIT ACCESSES CAN BE USED AS A WORKAROUND. The lower 16 bits should be written to the register's address, and the upper 16 bits should be written to the register's address plus 2.

Then on page 2097 there is the following note:

Only 32-bit accesses to the CAN registers are allowed, as 16-bit accesses may not work as expected.

Moreover in can control SUITE I've found files can.c with the following header:

// FILE:   can.c
//
// TITLE:  F2807x CAN Initialization & Support Functions.
//
// NOTE: The CAN bus bridge uses a different addressing scheme in order to
//       allow byte accesses. Because of this, 32-bit reads/writes can execute
//       abnormally at higher optimization levels. The CAN driver functions
//       have been adjusted to explicitly use two 16-bit read/writes to access
//       the full 32-bit register where HWREGH(base + offset) represents the
//       lower 16-bits and HWREGH(base + offset + 2) represents the upper
//       16-bits.


however in file can.c I've found many lines where CAN registers are read with a 32-bit access.

So I'm a bit confused.

How should I access the CAN registers?
Should I use only 16-bit access both in writing and in reading?
Should I use 16-bit access in writing and 32-bit access in reading?

If I use 16-bit access and an interrupt falls between lower 16-bit access and upper 16-bit access to the same register could data transfer be corrupted?

Should I disable interrupt so that 16-bit lower access and 16-bit upper access are strictly sequential?