Unable to establish HECC communication

Hi,

I'm trying to run AM35xx BSL test for CAN. The tests are being run on AM3517EVM and I'm using TotalPhase's Komodo as the other CAN device. I've used the two board connection scheme mentioned here where Komodo is acting as the second board. Its not the first time I'm using Komodo, I've used it with other boards as well (including am335xevm) so I'm pretty sure about that part of the setup. 

While running the BSL CAN tests, acknowledge bit does not get set for my transmission mailbox in CANTA register. Instead, the corresponding bit in CANAA register is set indicating acknowledge abort. Also the BOIF bit is set in CANGIF register indicating bus off while TM bit in CANES register is set to '1' indicating that the CAN kernel is transmitting a message. 

I'm not sure whats wrong here but I believe it might be a case of mismatched bitrates. I'm using the BSL CAN demo out of the box with default config and 26 MHz clock and the Komodo device is set to operate at 125 kHz (I've tried other bitrates as well without much success).

I'd appreciate any help/pointers.

Thanks!

  • Ayaz:

    Sorry to hear you are having trouble.  I recommend you disconnect the Komodo and only have a terminating resistor.  Then use an oscilloscope to measure the smallest bit time you see.  If you are wanting 125 Kbps, your smallest bit time should be 8 microseconds.  Once you have verified your AM35 bit time, then connect another device.  You can also check Komodo's bit time the same way.  Doing it this way also gives you the opportunity to check the slew rate.

    Thanks,


    JR Simma
    Simma Software, Inc.
    The CAN Experts!

  • In reply to JR Simma:

    Thanks for the tip JR,

    I've tried that and synchronized both Komodo and AM3517EVM but that did not help either. As soon as I start a transfer, the CAN module gets into configuration state (CCR in CANMC and CCE bit in CANES are set) by itself. Am I missing something with the hardware configuration?

    • I've shorted pins 2 & 3 of J15.
    • On J36, I've connected pin 1 to CAN+, pin 2 CAN- and pin 4 to GND of Komodo respectively.

    Anything missing?

  • In reply to Ayaz Shahid:

    Ayaz:

    Sorry that didn't help.  You say that your devices are sync'ed, but I hope that your baud rate is what your software is configuring it for (not just if your devices have the same baud rate).  That will show that your configuration is working as you expect.  Was your signal a nice clean square wave?  On page 15 of this J1939 presentation, there is a picture showing what your signal should look like:  http://www.simmasoftware.com/j1939-presentation.pdf 

    I agree you should have CAN_H, CAN_L, and ground connected between the two node, but we don't your hardware so I can't confirm shorting pin 2/3 on J15.

    If you transmit a single CAN data frame, but look at it with an o-scope, does the scope show the frame being constantly retried?  A single 29-bit ID, 8-byte frame at 125K should take around 1 millisecond.  If you are seeing the message being constantly retried, then we know the Komodo isn't ACK'ing the frame message.  Reasons for no ACK are: incorrect wiring, different baud rate, Komodo not configured correctly.

    Sorry I can't be of more help.

    Thanks,


    JR Simma
    Simma Software, Inc.
    The CAN Experts!

  • In reply to JR Simma:

    Thanks for all your help JR, specially the presentation that you shared was very informative. I really appreciate that.

    For now I am exploring the HECC driver in loopback mode. It seems to suffice my needs for the next couple of days. Eventually I'd need to figure out whats going wrong and when I do, I'll post the solution here so that others can benefit form it as well. My doubt, like yours, is on the bit rates. I'll spend some time on it in a couple of days and see whats wrong.

    Once again thanks for the help.

  • In reply to Ayaz Shahid:

    Dear Ayaz/JR,

    I am facing somewhat same problem . When i perform the Loopback test for CAN without interrupts enabled it works fine. But when i enable Interrupt on Rx mailbox , two interrupts are raised in the CANGIF0 one is one is tranmission was completed bit 15 and other is Abort bit 14. I need some views on this ...

    if the code works perfectly in loopback test with interrupts disabled..then the behaviour of the code should not changed when interrupts are enabled ?

    Thanks and Regard's

    Hrishikesh 

  • In reply to Ayaz Shahid:

    Dear Ayaz/JR,

    I am facing somewhat same problem . When i perform the Loopback test for CAN without interrupts enabled it works fine. But when i enable Interrupt on Rx mailbox , two interrupts are raised in the CANGIF0 one is  tranmission was completed bit 15 and other is Abort bit 14. I need some views on this ...

    if the code works perfectly in loopback test with interrupts disabled..then the behaviour of the code should not changed when interrupts are enabled ?

    Thanks and Regard's

    Hrishikesh 

  • In reply to hrishikesh choudhary:

    Hrishikesh:

    I too would expect similar results as lookback IF you have:

    - another CAN node attached to the network, with same baudrate

    - a terminating resistor

    - a functioning CAN transceiver

    Are you still having trouble?  Can you verify the above items?

    Thanks,

    JR

  • In reply to JR Simma:

    Dear JR,

    Yeah still .. I am facing the same problem . As i am waiting for one more board to get populated with the CAN Node where i can test. But with Loopback interface .. still the Problem Persist.

    Thanks and Regard's

    Hrishikesh.

  • In reply to hrishikesh choudhary:

    hrishikesh / JR,


    First up, my sincere apologies for not being able to keep an eye on the thread. 


    As for my problem, yes I solved that problem and I am able to run CAN successfully on AM3517EVM. It turned out that my problem was more hardware related. My daughter board was showing that it had power (power LED was on) but it appears that one of the connectors (the ones that connect daughter board to the main board) was faulty. Fixing that connector fixed my problem.


    @hrishikesh, do you have another board handy? If you do, try running the demo on that and see if it works for you. Also what other nodes are you using in you CAN network?