Hi Ryan, The register offsets in the TRM are represented in the smallest C2000 (C28x) byte size, which is 16-bit wide. This can be a bit confusing since a normal bye is 8 bits wide. MCAN registers are 32 bits wide so the step offset as show in TRM is by 2. In the SDK, addressing step was abstracted so it would 'follow' the 8-bit byte mode as with the rest of the world, hence the offset is expressed in terms of 32-bit step or 4 bytes as declared in hw_mcanss header. The SDK uses macros HW_WR_FIELD32, HW_SET_FIELD32, HW_RD_FIELD32...etc to take care of this operation. Our latest C29 core-based devices is now able to address the smallest byte unit of 8 bits so the offsets of those products will be by 4 for 32-bit registers. Regards, Joseph
↧