SPRUII0F May 2019 – June 2024 TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S
The CAN module uses a special addressing scheme to support byte accesses. It is recommended to only use 32-bit accesses to the CAN registers using the HWREG_BP() macro that uses the __byte_peripheral_32() intrinsic. If 16-bit accesses are to be used, the lower 16-bits must be written to the register's address, and the upper 16-bits must be written to the register's address plus 2.
Because of the bus bridge, the view of the CAN module's register space through the Code Composer Studio™ (CCS) IDE memory window does not always match the actual addressing. When the view mode is 32-bit or 16-bit, even addresses are effectively duplicated; odd addresses can be ignored. When the view mode is 8-bit, even addresses from within the CAN module are duplicated into the odd addresses in the CCS memory view; odd addresses from the module are not displayed.
CAN Register Space | C28x 8-Bit | C28x 16-Bit | C28x 32-Bit | |||||
---|---|---|---|---|---|---|---|---|
Address | Name | Data | Access | Data | Access | Data | Address | Data |
0x00 | CAN_CTL | 0x33221100 | __byte((int *)0x00,0) | 0x0000 | (*((short *)(0x00))) | 0x1100 | (*((long *)(0x00))) | 0x33221100 |
0x04 | CAN_ES | 0x77665544 | __byte((int *)0x01,0) | 0x0011 | (*((short *)(0x01))) | 0x1100 | (*((long *)(0x01))) | 0x33221100 |
0x08 | CAN_ERRC | 0xBBAA9988 | __byte((int *)0x02,0) | 0x0022 | (*((short *)(0x02))) | 0x3322 | (*((long *)(0x02))) | 0x33221100 |
0x0C | CAN_BTR | 0xFFEEDDCC | __byte((int *)0x03,0) | 0x0033 | (*((short *)(0x03))) | 0x3322 | (*((long *)(0x03))) | 0x33221100 |
__byte((int *)0x04,0) | 0x0044 | (*((short *)(0x04))) | 0x5544 | (*((long *)(0x04))) | 0x77665544 | |||
__byte((int *)0x05,0) | 0x0055 | (*((short *)(0x05))) | 0x5544 | (*((long *)(0x05))) | 0x77665544 | |||
__byte((int *)0x06,0) | 0x0066 | (*((short *)(0x06))) | 0x7766 | (*((long *)(0x06))) | 0x77665544 | |||
__byte((int *)0x07,0) | 0x0077 | (*((short *)(0x07))) | 0x7766 | (*((long *)(0x07))) | 0x77665544 | |||
__byte((int *)0x08,0) | 0x0088 | (*((short *)(0x08))) | 0x9988 | (*((long *)(0x08))) | 0xBBAA9988 | |||
__byte((int *)0x09,0) | 0x0099 | (*((short *)(0x09))) | 0x9988 | (*((long *)(0x09))) | 0xBBAA9988 | |||
__byte((int *)0x0A,0) | 0x00AA | (*((short *)(0x0A))) | 0xBBAA | (*((long *)(0x0A))) | 0xBBAA9988 | |||
__byte((int *)0x0B,0) | 0x00BB | (*((short *)(0x0B))) | 0xBBAA | (*((long *)(0x0B))) | 0xBBAA9988 | |||
__byte((int *)0x0C,0) | 0x00CC | (*((short *)(0x0C))) | 0xDDCC | (*((long *)(0x0C))) | 0xFFEEDDCC | |||
__byte((int *)0x0D,0) | 0x00DD | (*((short *)(0x0D))) | 0xDDCC | (*((long *)(0x0D))) | 0xFFEEDDCC | |||
__byte((int *)0x0E,0) | 0x00EE | (*((short *)(0x0E))) | 0xFFEE | (*((long *)(0x0E))) | 0xFFEEDDCC | |||
__byte((int *)0x0F,0) | 0x00FF | (*((short *)(0x0F))) | 0xFFEE | (*((long *)(0x0F))) | 0xFFEEDDCC |
CCS 8-Bit | CCS 16-Bit | CCS 32-Bit | |||||
---|---|---|---|---|---|---|---|
Address | Displayed Data | Address | Displayed Data | Address | Displayed Data | ||
0x00 | 0x00 | 0x00 | 0x1100 | 0x00 | 0x11001100 | ||
0x01 | 0x00 | 0x01 | 0x1100 | 0x02 | 0x33223322 | ||
0x02 | 0x22 | 0x02 | 0x3322 | 0x04 | 0x55445544 | ||
0x03 | 0x22 | 0x03 | 0x3322 | 0x06 | 0x77667766 | ||
0x04 | 0x44 | 0x04 | 0x5544 | 0x08 | 0x99889988 | ||
0x05 | 0x44 | 0x05 | 0x5544 | 0x0A | 0xBBAABBAA | ||
0x06 | 0x66 | 0x06 | 0x7766 | 0x0C | 0xDDCCDDCC | ||
0x07 | 0x66 | 0x07 | 0x7766 | 0x0E | 0xFFEEFFEE | ||
0x08 | 0x88 | 0x08 | 0x9988 | ||||
0x09 | 0x88 | 0x09 | 0x9988 | ||||
0x0A | 0xAA | 0x0A | 0xBBAA | ||||
0x0B | 0xAA | 0x0B | 0xBBAA | ||||
0x0C | 0xCC | 0x0C | 0xDDCC | ||||
0x0D | 0xCC | 0x0D | 0xDDCC | ||||
0x0E | 0xEE | 0x0E | 0xFFEE | ||||
0x0F | 0xEE | 0x0F | 0xFFEE |