Hot!dsPIC33EV64GM102 with IFX1050G VIO XCVR, ECAN

Author
jcandle
Super Member
  • Total Posts : 343
  • Reward points : 0
  • Joined: 2011/09/19 22:01:53
  • Location: Rockledge, FL
  • Status: offline
2018/05/07 20:06:51 (permalink)
0

dsPIC33EV64GM102 with IFX1050G VIO XCVR, ECAN

Host is a BESRAM CAN to USB virtual COM port, which i am not at all hesitant to blame (cheap).    I can try a grid connect this weekend.  
Baud is 250K and it is using a 20MHz xtal.  Bit timing calculated in MPLab   
Individually, all units all communicate with the host.  Devices are set to emit bursts of three messages once per second.
Cable length between units is about 1 meter, good quality STP.  Terminated at both ends.
 
 // Phase Segment 1 time is 8 TQ 
 C1CFG2bits.SEG1PH=0x7;
 // Phase Segment 2 time is set to be programmable
 C1CFG2bits.SEG2PHTS = 0x1;
 // Phase Segment 2 time is 8 TQ
 C1CFG2bits.SEG2PH = 0x7;
 // Propagation Segment time is 3 TQ
 C1CFG2bits.PRSEG = 0x2;
 // Bus line is sampled three times at the sample point
 C1CFG2bits.SAM = 0x1;

 
When I tested two units on a host there were no problems, but the person it was designed for is seeing strange behavior.  They have a different host adapter and different devices, which may have been mistreated electrically.  I'll have all the hardware this weekend so i can look at waveforms on a scope.  But, for them:
 
1) Either device by itself emits messages that the host sees and responds to commands.
2) With two devices, neither responds to commands and the host only sees messages from the first.
 
The nodes have wide open filters. 
ecan1WriteRxAcptFilter(1,0x1FFFFFFF,1,15,0);
ecan1WriteRxAcptMask(1,0x1FFFFFFF,1,1);
 
I was not seeing bus errors (but maybe they are). 
I am using 5V in the devices and am assuming the BESRAM part is compatible.
 
I am open to any ideas to look into this.
#1

5 Replies Related Threads

    vjasinski
    Super Member
    • Total Posts : 137
    • Reward points : 0
    • Joined: 2013/04/30 11:48:06
    • Location: Michigan, USA
    • Status: offline
    Re: dsPIC33EV64GM102 with IFX1050G VIO XCVR, ECAN 2018/05/08 04:42:12 (permalink)
    0
    This may seem basic, but are both connected devices issuing the same message with perhaps different data payload? That may result in the messages passing arbitration, but failing in data section or CRC.
    Vince
    #2
    jcandle
    Super Member
    • Total Posts : 343
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: Rockledge, FL
    • Status: offline
    Re: dsPIC33EV64GM102 with IFX1050G VIO XCVR, ECAN 2018/05/08 05:17:05 (permalink)
    0
    no, eight bits of the MSID contain an "address" and are unique.  another 8 contain the message opcode, that would be unique. 
     
    I may want to verify that the addresses are in the earliest bits, but that shouldn't matter until I get to congestion levels of traffic, which are a long way away.
    I may want to rearrange the opcode sequence for the same reason. 
    Still that is a good catch.
     
    I believe that one or both devices in the pair that exhibit this have seen miswiring and that the protective diodes may have been overstressed.  I could see one or both diodes messing up one or both sides of the diff pair, but I would expect the same unit to overcome the issue regardless of order.
     
    It also turns out the wire is not STP at the end user, but the total length is under 1 meter.  I will test on an oscilloscope this weekend.
     
    I am also no longer 100% sure the end user has the termination in the right places.
     
    In any case, I am trying to front load my weekend with as many straws to grasp at as possible...
     
    Thanks
    #3
    RISC
    Super Member
    • Total Posts : 5272
    • Reward points : 0
    • Status: offline
    Re: dsPIC33EV64GM102 with IFX1050G VIO XCVR, ECAN 2018/05/13 15:08:22 (permalink)
    0
    Hi,
    There is a dsPIC33EV evaluation kit, which has some source SW for CAN / LIN / SENT protocoles which might help.
    It is on this page : http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=DM330018
    The User manual of this DM330018 has the schematics of the board
    Do you have a CAN Analyzer at hand ?
    There are other schematics of CAN terminations on the ECAN Pictail (user manual)
    Regards
    #4
    jcandle
    Super Member
    • Total Posts : 343
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: Rockledge, FL
    • Status: offline
    Re: dsPIC33EV64GM102 with IFX1050G VIO XCVR, ECAN 2018/05/16 19:47:45 (permalink)
    4 (1)
    other person (user) crossed a hard wired cable that daisy chains to next unit or a termination.  That will do it every day!
    #5
    Isaac_Sewell
    Senior Member
    • Total Posts : 160
    • Reward points : 0
    • Joined: 2003/11/25 06:26:50
    • Location: Sheffield, England
    • Status: offline
    Re: dsPIC33EV64GM102 with IFX1050G VIO XCVR, ECAN 2018/05/17 00:39:23 (permalink)
    0
    Seen that a few times! Thanks for the feedback
    #6
    Jump to:
    © 2018 APG vNext Commercial Version 4.5