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.

CCS/TMS570LC4357: CAN Signal generation at 1 second rate

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

I am generating CAN signals from the CAN Channels in TI TMS570LC4357 based Launchpad. I need to generate CAN signals at 1 sec rate i.s. one CAN signal per one second. 

But it is coming in one microsecond.

Can anyone please guide me how to use Halcogen and Code composer studio to get this result.

  • Hello Rashmi,

    The CAN module will only transmit data when it is told to do so and will only receive data when there is a matching ID sent by another element on the CAN bus/network.

    All this to say, if you are transmitting at the rate you note (1us) then you would need to not call the transmit functionas frequently. If exact timing is needed, you can configure the RTI to trigger an interrupt at some overflow value corresponding to a time base that allows you to meet the 1 second timing. When the timing is reached, call the function to sent the CAN data.

    If the issue is you are receiving data every 1us, then you need to understand the source of the transmission. i.e., there would have to be another device on the network sending data with an ID that matches the MSGID mask filtering. This would then allow the message to be received by the CAN module. This could be because do not have the mask setup exclusively enough to filter unwanted transmissions from other devices, or that the system is not complying with your 1 second requirement.
  • Hello RASHMI,

    Do you mean 1bps for the bit rate?

    You can not reach this lower value:

    1. CAN uses VCLKA or Crystal as the driving clock. If the 16MHz crystal is used as the clock source for CAN module. 

    2. The maximum quanta (tq): 1024/16Mhz ->64us (1024 is the BRP plus BRPE)

    3. The maximum tq for 1 bit: 29  (sync_seg + prop_seg+Phase_seg1/2+SJW)

    4. so 29*64->1.856ms

  • Actually the component to be controlled requires CAN signal at 1 signal per second. but it is coming multiple signal at 1 sec. I need help how to do it?
  • Can anyone please refer any document which can help me to use interrupts and delay functions?