Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE
Tool/software: TI C/C++ Compiler
Hello everyone,
I am working with an F28075 and trying to understand how byte peripherals work. My goal is to make the DCAN peripheral work.
1. The only example code I have is in the controlSuite/device_support/F2807x directory. I have seen users on the forum mention C2000Ware. Which of these libraries should I use as a starting point and is one of them better maintained than the other?
2. I have the TMS320F2807x Technical Reference Manual which only offers the following information at chapter 21.3.1:
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.
I'm working with all optimization disabled therefore I think I can enforce 32-bit accesses (MOVL instructions) but I don't mind using the workaround with 16-bits accesses if necessary. However I wonder what the impact is on the debugger and the Expressions window. Is the debugger able to show me correct values of the DCAN registers?
3. I also have the TMS320C28x Optimizing C/C++ Compiler v18.1.0LTS User's Guide and I am trying to understand chapter 6.14.6, "Using the Byte Peripheral Type Attribute" but I have trouble understanding it. Is there a more detailed explanation available somewhere?
What does this sentence mean: "The byte peripherals bridge translates addresses between the CPU and byte peripherals by treating an address as a byte address."? Does it mean that when you make a 16-bit write to an address in a byte peripheral the value is truncated at 8 bits?
Cheers,
Pierre