Part Number: TMS320F28379D
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE
Hello,
If I select the following 1Mbps configuration in SYSCONFIG:

...the following code is generated:
CAN_setBitTiming(MAIN_CAN_BASE, 7, 0, 15, 7, 2);
There's a direct numerical mapping between the GUI contents and the arguments to CAN_setBitTiming(). Unfortunately this function updates the register with the arguments directly which means that the Tq values are not converted to the register values correctly.
For example, "(Re)Synchronization Jump Width (Tq)" = 2 should set CAN_BTR.SJW = 1 since actual SJW = CAN_BTR.SJW + 1.
The purpose of the SYSCONFIG (I think) is to abstract the design parameters, in this case Tq, from the register contents but this does not seem to be the case for CAN bit timing.
