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.

Concerto F28M35x - can_loopback_m3 Bit Rate

Other Parts Discussed in Thread: CONTROLSUITE, SN65HVD230

Hi,

I am using the Concerto F28M35x evaluation kit. I'm looking at the can_loopback_m3 example project found in:

controlSUITE\device_support\f28m35x\v130\F28M35x_examples_Master\can_loopback\m3\ccs.

I have connected CANView-USB to the board and am monitoring the board's CAN messages on a CAN Monitor on my computer. The project works fine at the bit rate it is set to originally, 500000. But if I change that to 125000 in the call to CANBitRateSet(), and change my baud on the CAN Monitor side to 125k, CANView detects overflow errors and I do not receive all the messages being sent, in fact I hardly receive any at all. Is there something else I need to change when I change the baud in the program? The M3's main clock is set up at 75 MHz and the CAN peripheral is clocked off the M3/Master subsystem clock.

Thanks,

Mike

  • Hi, Mike!

    I'm using H52C1 Concerto Experimenter Kit and the CAN transceiver (SN65HVD230) connected to port B (PB4, PB5). If I use Normal mode (commented line 229, 230 in file can_loopback.c "HWREG..." MWare v130), impulses on port aren't present - only high level... How do you managed to adjust the interface in a Normal mode? Do you share an example of setup of the CAN interface for a Normal operating mode? And we together can solve a problem with Bit Rate!

    Thanks in advance.
    Best regards. 

  • Mike,

    I don't have too much experience with the CANBitRateSet API, but I don't really like how it calculates the appropriate values for the timing registers.  I would recommend you manually calculate the TSeg1 and TSeg2 values and set them yourself.  This way you are insured they are correct.  The CANBitRateSet API tries to get close, but only has a few values it can choose for TSeg1 and 2 so often times the value it chooses isn't exactly right.

    Trey

  • Gnusmas,

    It sounds like you have everything setup correctly.  Is your CAN bus properly terminated?  That's the only thing that might cause it not to transmit.

    Trey

  • Hi, Trey German!

    Thank you that responded!

    I didn't know that terminator influences transfer start... I thought that the transmitter will try to transfer all the same the message even without terminator. During experiments I disconnected the driver from the MCU and the signal looked at the TX lines an oscilloscope. It turns out that high level on the TX lines it was start of bits which via the driver and terminator should return to the RX line to start transfer... I understood this correctly?

     Best regards. 

  • If the RX line is high, it will try to transmit the same message over and over again even if there is no transceiver or terminator connected.  I suspect that the RX line is low and the CAN controller is in the bus off state.  The idle state for the RX pin should be high and if you connect a transceiver and terminator it should be in this state.

    Is your RX line high or low?

    Trey

  • Hi, Trey!

    I have not looked at the state line RX... It is possible, that she was in a low level, as at the moment I have disconnected the driver from MCU and RX line floated. So, I need to connect drivers to the MCU, set the terminator, connect to my USB-to-CAN converter (IXXAT) and set the rate of default (500 kbps) - should be all right. I'll try to do so after this weekend. I'll write about that I will in this case.

    P.S. Would your tell me when is expected to yield the final version of the Concerto chips and MCUSDK released?

    Thanks for the help, Trey!

  • Hi, Mike and Trey!

    I connected driver and terminator to the MCU and the bus started working in normal mode! Thanks for help, Trey!

    Mike, I have CAN bus properly configured using the library (MWare v130)! The M3's main clock is set up at 75 MHz (or 100 MHz ) and the CAN peripheral is clocked off the M3/Master subsystem clock. By the way, she is working properly at speeds: 125, 250, 500, 800, 1000 kbps!

    Best regards.

  • Gnusmas,

    Good to hear you got everything working!

    Final production versions of Concerto should be available later this year.  The MCUSDK will be released in the next week or so, but I'm not sure if it will be released under that name.  I had heard "TI-RTOS" being thrown around, but who knows what marketing will settle on.

    Trey