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.

CAN transciever ISO1050EVM

Other Parts Discussed in Thread: ISO1050, CONTROLSUITE, ISO1050EVM, SN6501

Hi

Can anyone of you help me on urgent basis?

I need to establish CAN communication using F28335 experimenter kit.I have bought the ISO1050 EVM (CAN transciever module).I read its user guide,but it does not clears my doubts  abouts its connections and working.

As I am new with this,I am a bit hesistant to experiment with the kit and the CAN module.I want to know What connections have to be used with which CAN mode(i.e. common mode or without), The banana jacks,Sma and other wires required.

Kindly help me.Your help would be appreciated.

Thanks

Sneha

  • Hi Sneha,

    Though I've not used the kit myself, but by doing a forum search here's a link which indicates the wiring:

    http://e2e.ti.com/support/interface/industrial_interface/f/142/t/290299.aspx

    I'm not sure whether you already have read this.

    Regards,

    Gautam

  • Hi Gautam

    Thanks for the reply.

    I have already read this thread.But I am facing problems as to what the connections could be,below is the evaluation module ISO1050 layout:

    I have gone through its guide too..As per my understanding,I am doing the following connections:
    DSP1                                    EVM1                                          

    CANTx,GND         to    JMP2-RXD,GND  

    CANRx,GND         to JMP!-TXD,GND

    Similar for DSP2 and EVM2

    EVM1                                            EVM2

    JMP3 CANH          to                   JMP3 CANH  

    JMP3 CANL            to                 JMP3 CANL 

    EVM1 and EVM2 are both supplied by 3.3 V on controller side and as I am operating both sides at same level so not supplying the otherVcc2.

    I am running the program given in controlsuite.eCANA to eCANB xmit :

    5383.ecan.txt
    // TI File $Revision: /main/2 $
    // Checkin $Date: July 30, 2009   18:44:22 $
    //###########################################################################
    // Filename: Example_28xEcan_A_to_B_Xmit.c
    //
    // Description: eCAN-A To eCAN-B TXLOOP - Transmit loop
    //
    // ASSUMPTIONS:
    //
    //    This program requires the DSP2833x header files.
    //
    //    Both CAN ports of the 2833x DSP need to be connected
    //    to each other (via CAN transceivers)0
    
    
    
    //
    //       eCANA is on GPIO31 (CANTXA)  and
    //                   GPIO30 (CANRXA)
    //
    //       eCANB is on GPIO8  (CANTXB)  and
    //                   GPIO10 (CANRXB)
    //
    //    As supplied, this project is configured for "boot to SARAM"
    //    operation.  The 2833x Boot Mode table is shown below.
    //    For information on configuring the boot mode of an eZdsp,
    //    please refer to the documentation included with the eZdsp,
    //
    //       $Boot_Table:
    //
    //         GPIO87   GPIO86     GPIO85   GPIO84
    //          XA15     XA14       XA13     XA12
    //           PU       PU         PU       PU
    //        ==========================================
    //            1        1          1        1    Jump to Flash
    //            1        1          1        0    SCI-A boot
    //            1        1          0        1    SPI-A boot
    //            1        1          0        0    I2C-A boot
    //            1        0          1        1    eCAN-A boot
    //            1        0          1        0    McBSP-A boot
    //            1        0          0        1    Jump to XINTF x16
    //            1        0          0        0    Jump to XINTF x32
    //            0        1          1        1    Jump to OTP
    //            0        1          1        0    Parallel GPIO I/O boot
    //            0        1          0        1    Parallel XINTF boot
    //            0        1          0        0    Jump to SARAM	    <- "boot to SARAM"
    //            0        0          1        1    Branch to check boot mode
    //            0        0          1        0    Boot to flash, bypass ADC cal
    //            0        0          0        1    Boot to SARAM, bypass ADC cal
    //            0        0          0        0    Boot to SCI-A, bypass ADC cal
    //                                              Boot_Table_End$
    //
    // DESCRIPTION:
    //
    //    This example TRANSMITS data to another CAN module using MAILBOX5
    //    This program could either loop forever or transmit "n" # of times,
    //    where "n" is the TXCOUNT value.
    //
    //    This example can be used to check CAN-A and CAN-B. Since CAN-B is
    //    initialized in DSP2833x_ECan.c, it will acknowledge all frames
    //    transmitted by the node on which this code runs. Both CAN ports of
    //    the 2833x DSP need to be connected to each other (via CAN transceivers)
    //
    //###########################################################################
    // Original Author: HJ
    //
    // $TI Release: 2833x/2823x Header Files V1.32 $
    // $Release Date: June 28, 2010 $
    //###########################################################################
    
    #include "DSP28x_Project.h"     // Device Headerfile and Examples Include File
    
    #define TXCOUNT  100  // Transmission will take place (TXCOUNT) times..
    
    // Globals for this example
    long      i;
    long 	  loopcount = 0;
    
    
    void main()
    {
    
    /* Create a shadow register structure for the CAN control registers. This is
     needed, since, only 32-bit access is allowed to these registers. 16-bit access
     to these registers could potentially corrupt the register contents. This is
     especially true while writing to a bit (or group of bits) among bits 16 - 31 */
    
       struct ECAN_REGS ECanaShadow;
    
    // Step 1. Initialize System Control:
    // PLL, WatchDog, enable Peripheral Clocks
    // This example function is found in the DSP2833x_SysCtrl.c file.
       InitSysCtrl();
    
    // Step 2. Initalize GPIO:
    // This example function is found in the DSP2833x_Gpio.c file and
    // illustrates how to set the GPIO to it's default state.
    // InitGpio();  // Skipped for this example
    
       // Just initalize eCAN pins for this example
       // This function is in DSP2833x_ECan.c
       InitECanGpio();
    
    // Step 3. Clear all interrupts and initialize PIE vector table:
    // Disable CPU interrupts
       DINT;
    
    // Initialize the PIE control registers to their default state.
    // The default state is all PIE interrupts disabled and flags
    // are cleared.
    // This function is found in the DSP2833x_PieCtrl.c file.
       InitPieCtrl();
    
    // Disable CPU interrupts and clear all CPU interrupt flags:
       IER = 0x0000;
       IFR = 0x0000;
    
    // Initialize the PIE vector table with pointers to the shell Interrupt
    // Service Routines (ISR).
    // This will populate the entire table, even if the interrupt
    // is not used in this example.  This is useful for debug purposes.
    // The shell ISR routines are found in DSP2833x_DefaultIsr.c.
    // This function is found in DSP2833x_PieVect.c.
       InitPieVectTable();
    
    // Interrupts that are used in this example are re-mapped to
    // ISR functions found within this file.
    
    // No interrupts used in this example.
    
    // Step 4. Initialize all the Device Peripherals:
    // This function is found in DSP2833x_InitPeripherals.c
    // InitPeripherals(); // Not required for this example
    
       // In this case just initalize eCAN-A and eCAN-B
       // This function is in DSP2833x_ECan.c
       InitECan();
    
    // Step 5. User specific code:
    
    /* Write to the MSGID field  */
    
       ECanaMboxes.MBOX25.MSGID.all = 0x95555555; // Extended Identifier
    
    /* Configure Mailbox under test as a Transmit mailbox */
    
       ECanaShadow.CANMD.all = ECanaRegs.CANMD.all;
       ECanaShadow.CANMD.bit.MD25 = 0;
       ECanaRegs.CANMD.all = ECanaShadow.CANMD.all;
    
    /* Enable Mailbox under test */
    
       ECanaShadow.CANME.all = ECanaRegs.CANME.all;
       ECanaShadow.CANME.bit.ME25 = 1;
       ECanaRegs.CANME.all = ECanaShadow.CANME.all;
    
    /* Write to DLC field in Master Control reg */
    
       ECanaMboxes.MBOX25.MSGCTRL.bit.DLC = 8;
    
    /* Write to the mailbox RAM field */
    
       ECanaMboxes.MBOX25.MDL.all = 0x55555555;
       ECanaMboxes.MBOX25.MDH.all = 0x55555555;
    
    /* Begin transmitting */
    
    
       for(i=0; i < TXCOUNT; i++)
       {
           ECanaShadow.CANTRS.all = 0;
           ECanaShadow.CANTRS.bit.TRS25 = 1;             // Set TRS for mailbox under test
           ECanaRegs.CANTRS.all = ECanaShadow.CANTRS.all;
    
           do
        	{
          	ECanaShadow.CANTA.all = ECanaRegs.CANTA.all;
        	} while(ECanaShadow.CANTA.bit.TA25 == 0 );   // Wait for TA5 bit to be set..
    
    
           ECanaShadow.CANTA.all = 0;
           ECanaShadow.CANTA.bit.TA25 = 1;     	         // Clear TA5
           ECanaRegs.CANTA.all = ECanaShadow.CANTA.all;
    
           loopcount ++;
        }
         asm(" ESTOP0");  // Stop here
    }
    
    
    

    But I am nnot observing any change in eCANA and eCANB registers,just that there are changes in CANTSC register.

    What the program is doing..how is it working..whether the connections are correct or not?I dont know?

    How do I understand CAN and start going with it..I really have a deadline in front of me for establishing CAN communication.

    Hope you can guide me,as I am unable to find a suitable source for guidance in this regard.

    Thanks

    Sneha

  • Hi Sneha,

    The bare minimum number of connections you will have to make to the EVM are the following:

    • VCC1 (banana jack): 3.0V to 5.5V with respect to GND 1 (preferably the same voltage of you µC so that you don't have to level shift the inputs and outputs)
    • Connect the ground from the µC module to the GND1 of the ISO1050EVM
    • The output connection from the DCAN port goes to the TXD pin of the ISO1050EVM module (TXD is an input on the ISO1050 device)
    • The input connection from the DCAN port goes to the RXD pin of the ISO1050EVM module (RXD is an output on the ISO1050 device)
    • VCC1 (banana jack on the right side of the board): 4.75V to 5.25V with respect to GND 2 - this powers the right side isolator die and the transceiver die on the device.

    The JMP4 and JMP5 are only needed if you want to inject a common mode voltage onto the bus. The EVM comes with the termination needed for the bus to operate normally (without any other nodes connected to CANH and CANL).

    Once you have made all these connections you can view the bus activity on CANH and CANL with respect to GND2.

    I hope this helps, please let me know if you have any other questions.

    John

  • Hi John

    Thanks for the reply.I tried running the can xmit A to can xmit B as per the connections told by you.

    1.I am using 3.3V to supply both Vcc1 and Vcc2(written in datasheet,we can give one supply).

    2.Transmitter from eCANA:
    Connecting Can-TXD to TXd pin of ISO1050EVM and Can-RXD to RXD pin of ISO1050EVM,With the dsp ground connected to GND1.
    GPIO18/19 are used for this CANA.

    3.Receiver eCANB:

    same connections as above but on different EVM board,with GPIO8/10 for CANB.

    4.CANH and CANl of both EVMs are connected and also their grounds.

    I can see the CANH and CANL waveform on DSO coming from Transmitter side EVM CANH and CANL pins.I can see the output going high on TXD pin of transmitter DSP and simultaneously receive a high on RXD pin of receiver.

    But I am seeing no change in registers in the watch window w.r.t to CANTA,CANMSGCTRL registers..

    Am I doing right?

    Say If I want to send some data then would that be put in CANMDL and CANMDH registers?

    Thanks in advance.

    Sneha

  • Hi Sneha,

    1) Where in the datasheet are you seeing that you can supply both supplies from the same 3.3V supply? If you look at page 7 of the datasheet the recommended VCC1 and VCC2 supply ranges are as follows:

    2) Looking at the following guide on ti.com:

    http://www.ti.com/lit/pdf/SPRUEU1

    On page 13 it shows that TX is an output for the F28335, and RX is an input. Therefore the TX should be connected to the TXD of the ISO1050, and the RX should be connected to the RXD of the ISO1050. It looks like pins 62 and 63 are CANRXA and CANTXA respectively (GPIO18 and GPIO19 - but not configured as GPIOs).

    3) GPIO8 (pin 17) is the TX for the CAN-B, and GPIO10 (pin 19) is the RX.

    4) Is the RXD pin toggling with the TXD pin? The RXD pin is what that transceiver receives from the bus (it is an output). Can you share a screenshot of the TXD, RXD, CANH and CANL signals of the ISO1050?

    Thanks,

    John

  • Hi John

    Thanks For the reply.

    1. I am consulting the following user guide for ISO1050EVM:

    2337.user guide.pdf

    Its clearly written we can give one supply..

    2.Yes, I am  following the same guide for CAN and connecting the pins in similar way as described by you.

    I have programmed the GPIOs 8/10/18/19 for CAN function by their registers.

    3. i dont think RXD pin is toggling with the TXD,its constantly high as is the TXD.

    Sure I will share with you the waveforms once I get back to the lab in the morning.

    Thanks for your patient replies.

    Good Night

    Sneha

  • Hi Sneha,

    If you are indeed supplying VCC2 side of the device with 3.3V the transceiver may not have hit POR. Therefore, it may not be powered up and toggling.

    If you do supply the device with one supply on both sides VCC1 and VCC2, then it needs to be 5.0 volts since that is what is required with VCC2 side. Since you are using 3.3V on the F28335, you will then need a second 5.oV supply for VCC2.

    We have a very basic push pull transformer driver IC, the SN6501:

    www.ti.com/lit/gpn/sn6501

    This device can take the 3.3V supply and drive a transformer that can create an isolated 5.0V supply on the VCC2 side of the device.  Please take a look and consider it for your final solution.

    Thanks,

    John

  • Hi John

    Thanks for your patient replies.

    But I am still facing the same issues.

    1. no change in registers of CAN ...CANTA for module B which is recieving should changes.

    2.I gave 3.3 V to VCC1 and 5V to Vcc2... still nothing observable..

    couldn't get the CANH and CANL pulse waveforms...It was continuously high.

    3.The TXD of tx and RXD of rx end both are continuously high..

    I am not able to find wats going wrong ??

    Do you have any video related to the EVM operation,connections??

    Or any basic program of CAN that can be used to observe the chnage in registers.

    Thanks

    Sneha

  • HI John

    I am still stuck with the issue.therefore,i tried to write down a program for CAN-TX and CAN RX for sending a data from MBOX5 in  its MDL/MDH to MBOX1.

    But It is not working..I donot get CANh and low waveforms .Just a continuous high..same on the txd pin and then at the rxd pin.

    the programs are:

    5076.can-tx.txt
    //
    //      Lab CAN_1  : TMS320F2812
    //      (C) Frank Bormann
    //
    //###########################################################################
    //
    // FILE:    Lab_CAN_1.c
    //
    // TITLE:   DSP28 CAN - Transmission with the Zwickau-adapterboard
    //
    //          Jumper JP4 :  2-3  ( 120 Ohm enabled)
    //          Jumper JP5 :  1-2  ; Jumper JP6 _ 1-2 ( highspeed transceiver SN
    
    
    //
    //          Aim of the test :
    //          Transmit the status of the 8 switches from GPIO - Port B15...B8
    //          repeat the transmission every second
    //          Mailbox 5 is used for transmission
    //          Identifier : 0x1000 0000
    //          DLC =  1
    //
    //          Frequency Osscillator : 30MHz
    //          PLLCR = 0xA   :  multiply by 5
    //          SYSCLKOUT = CLKIN = 150MHz
    //          Highspeed - Prescaler (HISPCP = 0x0001; div by 2 ) : 75 Mhz
    //          Lowspeed - Prescaler (LOSPCP  = 0x0002; div by 4 ) : 37.5 Mhz
    //###########################################################################
    //
    //  Ver | dd mmm yyyy | Who  | Description of changes
    // =====|=============|======|===============================================
    //  1.0 | 09 May 2003 | F.B. | Startup Version for Lab_CAN_1
    //  2.0 | 27 Nov 2003 | F.B. | adapted to header-files Version 1.00
    //      |             |      |
    //###########################################################################
    
    // CAUTION :  DSP281x_ECan.h  , Version 1.0 ( Hareesh) contains an error
    // the byte field of struct  CANMDL_BYTES and CANMDH_BYTES
    // have the wrong order ( Byte1 to 4)instead of Byte 4 to 1)
    // MODIFY  :  inside DSP281x_ECan.h modify the two structures to :
    // struct  CANMDL_BYTES {      // bits   description
    //   Uint16      BYTE3:8;     // 31:24
    //   Uint16      BYTE2:8;     // 23:16
    //   Uint16      BYTE1:8;     // 15:8
    //   Uint16      BYTE0:8;     // 7:0
    // };
    //
    // struct  CANMDH_BYTES {      // bits   description
    //   Uint16      BYTE7:8;     // 63:56
    //   Uint16      BYTE6:8;     // 55:48
    //   Uint16      BYTE5:8;     // 47:40
    //   Uint16      BYTE4:8;     // 39:32
    // };
    //##########################################################################
    
    #include "DSP28x_Project.h"
    
    
    #define IDENTIFIER 0x10000000
    
    // Prototype statements for functions found within this file.
    
    void Gpio_select(void);
    void delay_loop();
    Uint16 loopcount =0;
    // Global Variables
    
    /* Create a shadow register structure for the CAN control registers. This is
     needed, since, only 32-bit access is allowed to these registers. 16-bit access
     to these registers could potentially corrupt the register contents. This is
     especially true while writing to a bit (or group of bits) among bits 16 - 31 */
    
    struct  ECAN_REGS ECanaShadow;
    
    main()
    {
    // Initialize System Control registers, PLL, WatchDog, Clocks to default state:
    // This function is found in the DSP28_SysCtrl.c file.
        InitSysCtrl();
    
    // Initialise the physical pins of the DSP
        Gpio_select();
    
    /* Initialize the CAN module */
        InitECan();
    
    /* Write to the MSGID field  */
    
        ECanaMboxes.MBOX5.MSGID.all     = IDENTIFIER;
        ECanaMboxes.MBOX5.MSGID.bit.IDE = 1;  // Extended Identifier
    
    /* Configure Mailbox under test as a Transmit mailbox */
    
        ECanaShadow.CANMD.all = ECanaRegs.CANMD.all;
        ECanaShadow.CANMD.bit.MD5 = 0;
        ECanaRegs.CANMD.all = ECanaShadow.CANMD.all;
    
    /* Enable Mailbox under test */
    
        ECanaShadow.CANME.all = ECanaRegs.CANME.all;
        ECanaShadow.CANME.bit.ME5 = 1;
        ECanaRegs.CANME.all = ECanaShadow.CANME.all;
    
    /* Write to DLC field in Master Control reg */
    
        ECanaMboxes.MBOX5.MSGCTRL.bit.DLC = 1;
        ECanaMboxes.MBOX5.MDL.all = 0x00000005;
          ECanaMboxes.MBOX5.MDH.all = 0x00000005;
    /* Begin transmitting */
    
    
          for(;;)
          {
              ECanaShadow.CANTRS.all = 0;
              ECanaShadow.CANTRS.bit.TRS5 = 1;             // Set TRS for mailbox under test
              ECanaRegs.CANTRS.all = ECanaShadow.CANTRS.all;
    
              do
               {
               ECanaShadow.CANTA.all = ECanaRegs.CANTA.all;
               } while(ECanaShadow.CANTA.bit.TA5 == 0 );   // Wait for TA5 bit to be set..
    
    
              ECanaShadow.CANTA.all = 0;
              ECanaShadow.CANTA.bit.TA5 = 1;               // Clear TA5
              ECanaRegs.CANTA.all = ECanaShadow.CANTA.all;
    
              loopcount ++;
           }
            asm(" ESTOP0");  // Stop here
    
    }
    
    void Gpio_select(void)
    {
        EALLOW;
        GpioCtrlRegs.GPAMUX1.all=0; //PORT A IS THE can PORT
        GpioCtrlRegs.GPAMUX2.all=0;
        GpioCtrlRegs.GPBMUX1.all=0;
           GpioCtrlRegs.GPBMUX2.all=0;
    
    
        GpioCtrlRegs.GPAMUX2.bit.GPIO19 = 3; // setting gpio19 as CANTXA
        GpioCtrlRegs.GPAMUX2.bit.GPIO18 = 3;  // setting gpio18 as CANRXA
    
        GpioCtrlRegs.GPADIR.all=0;       // GPIO PORTs  as input
        GpioCtrlRegs.GPBDIR.all=0x00ff;  // GPIO Port B15-B8 input , B7-B0 output
        GpioCtrlRegs.GPCDIR.all=0;
    
    
        GpioCtrlRegs.GPAQSEL1.all=0;          // Set GPIO input qualifier values
        GpioCtrlRegs.GPAQSEL2.all=0;
    
        GpioCtrlRegs.GPBQSEL1.all=0;
            GpioCtrlRegs.GPBQSEL2.all=0;
    
    
    
        GpioDataRegs.GPBDAT.all = 0x0000;   // Switch off LED's ( B7...B0)
    
        EDIS;
    }
    
    void delay_loop()
    {
        long      i;
        for (i = 0; i < 10000000; i++) {}
    }
    
    

    1524.can-rx.txt
    //
    //      Lab CAN_2  : TMS320F2812
    //      (C) Frank Bormann
    //
    //###########################################################################
    //
    // FILE:    Lab_CAN_2.c
    //
    // TITLE:   DSP28 CAN - Receive with the Zwickau-adapterboard
    //
    //          Extended CAN-Frame is received with 1 MBPS
    //          from highspeed-CAN
    //          Jumper JP4 :  2-3  ( 120 Ohm enabled)
    //          Jumper JP5 :  1-2  ; Jumper JP6 _ 1-2 ( highspeed transceiver SN
    
    
    //
    //          Aim of the test :
    //          Receive a 1 byte dataframe with Identifier 0x10000000
    //          and show the databyte on the LED's at GPIO-Port B7...B0
    //          Mailbox 1 is used as receiver
    //          Identifier : 0x1000 0000
    //          DLC =  1
    //
    //          Frequency Osscillator : 30MHz
    //          PLLCR = 0xA   :  multiply by 5
    //          SYSCLKOUT = CLKIN = 150MHz
    //          Highspeed - Prescaler (HISPCP = 0x0001; div by 2 ) : 75 Mhz
    //          Lowspeed - Prescaler (LOSPCP  = 0x0002; div by 4 ) : 37.5 Mhz
    //###########################################################################
    //
    //  Ver | dd mmm yyyy | Who  | Description of changes
    // =====|=============|======|===============================================
    //  1.0 | 09 May 2003 | F.B. | Startup Version for Lab_CAN_2
    //  2.0 | 27 Nov 2003 | F.B. | adapted to header-files Version 1.00
    //###########################################################################
    
    // CAUTION :  DSP281x_ECan.h  , Version 1.0 ( Hareesh) contains an error
    // the byte field of struct  CANMDL_BYTES and CANMDH_BYTES
    // have the wrong order ( Byte1 to 4)instead of Byte 4 to 1)
    // MODIFY  :  inside DSP281x_ECan.h modify the two structures to :
    // struct  CANMDL_BYTES {      // bits   description
    //   Uint16      BYTE3:8;     // 31:24
    //   Uint16      BYTE2:8;     // 23:16
    //   Uint16      BYTE1:8;     // 15:8
    //   Uint16      BYTE0:8;     // 7:0
    // };
    //
    // struct  CANMDH_BYTES {      // bits   description
    //   Uint16      BYTE7:8;     // 63:56
    //   Uint16      BYTE6:8;     // 55:48
    //   Uint16      BYTE5:8;     // 47:40
    //   Uint16      BYTE4:8;     // 39:32
    // };
    //##########################################################################
    
    #include "DSP28x_Project.h"
    
    #define IDENTIFIER 0x10000000
    
    // Prototype statements for functions found within this file.
    
    void Gpio_select(void);
    
    // Global Variables
    
    /* Create a shadow register structure for the CAN control registers. This is
     needed, since, only 32-bit access is allowed to these registers. 16-bit access
     to these registers could potentially corrupt the register contents. This is
     especially true while writing to a bit (or group of bits) among bits 16 - 31 */
    
    struct  ECAN_REGS ECanaShadow;
    
    main()
    {
    // Initialize System Control registers, PLL, WatchDog, Clocks to default state:
    // This function is found in the DSP28_SysCtrl.c file.
        InitSysCtrl();
    
    // Initialise the physical pins of the DSP
        Gpio_select();
    
    /* Initialize the CAN module */
    
        InitECan();
    
    /* Write to the MSGID field - MBX number is written as its MSGID */
        ECanaMboxes.MBOX1.MSGID.all  = IDENTIFIER;  // extended identifier
        ECanaMboxes.MBOX1.MSGID.bit.IDE = 1;
    
    /* Configure Mailbox 1 as Receiver mailbox */
        ECanaShadow.CANMD.all = ECanaRegs.CANMD.all;
        ECanaShadow.CANMD.bit.MD1 = 1;
        ECanaRegs.CANMD.all = ECanaShadow.CANMD.all;
    
    /* Enable Mailbox 1  */
    
        ECanaShadow.CANME.all = ECanaRegs.CANME.all;
        ECanaShadow.CANME.bit.ME1 = 1;
        ECanaRegs.CANME.all = ECanaShadow.CANME.all;
    
    /* Begin Receiving */
       while(1)
        {
         do {
            ECanaShadow.CANRMP.all = ECanaRegs.CANRMP.all;
            }
            while(ECanaShadow.CANRMP.bit.RMP1 != 1 );       // Wait for RMP1 to be set..
    
         ECanaShadow.CANRMP.bit.RMP1 = 1;
         ECanaRegs.CANRMP.all = ECanaShadow.CANRMP.all;    // Clear RMP1 bit and start again
    
    
    
        }
    
    }
    
    void Gpio_select(void)
    {
        EALLOW;
        GpioCtrlRegs.GPAMUX1.all=0; //PORT A IS THE can PORT
        GpioCtrlRegs.GPAMUX2.all=0;
        GpioCtrlRegs.GPBMUX1.all=0;
           GpioCtrlRegs.GPBMUX2.all=0;
    
    
        GpioCtrlRegs.GPAMUX2.bit.GPIO19 = 3; // setting gpio19 as CANTXA
        GpioCtrlRegs.GPAMUX2.bit.GPIO18 = 3;  // setting gpio18 as CANRXA
    
        GpioCtrlRegs.GPADIR.all=0;       // GPIO PORTs  as input
        GpioCtrlRegs.GPBDIR.all=0x00ff;  // GPIO Port B15-B8 input , B7-B0 output
        GpioCtrlRegs.GPCDIR.all=0;
    
    
        GpioCtrlRegs.GPAQSEL1.all=0;          // Set GPIO input qualifier values
        GpioCtrlRegs.GPAQSEL2.all=0;
    
        GpioCtrlRegs.GPBQSEL1.all=0;
            GpioCtrlRegs.GPBQSEL2.all=0;
    
    
    
        GpioDataRegs.GPBDAT.all = 0x0000;   // Switch off LED's ( B7...B0)
    
        EDIS;
    }
    
    
    

    The snapshots are..

    TXD pin

    CANH-CANL

    RXD

    Kindly suggest the changes

    thanks

    Sneha

  • Hi Sneha,

    This does not appear to be a ISO1050 issue. If the TXD pin is not toggling, then the driver will not change states. Therefore, the other receiving node will not receive any data and the registers will not update.

    I can help you with debugging the ISO1050 EVM once you have the TXD pin toggling from the micro. Unfortunately, I have not spent any time with the F28335 experimenter kit. I would recommend posting a new thread in this forum with your code and state that you are not able to get the TXD pin on the F28335 to toggle. Once you get that issue solved we can see if there is anything needing updating on the ISO1050EVM. I do not think the ISO1050 is miss-wired.

    Thanks,

    John

  • Hi John 

    Thanks

    I Have posted a new thread.Will get back to you soon.

    Thanks

    Sneha

  • Hi John

    I have posted the thread related to CAN TXD output problem.

    But I was just trying to check up with ISO1050EVM by applying a Pulse to its TXD pin at JMP1 and then checking its CANH and CANL signals.The output signal is continuously high for CANH and continuously low fr CANL.Is this the correct way of checking? and if yes does this mean EVM is not working?

    Thanks

    Sneha

  • Hi Sneha,

    I do not have much information to go on. Can you share a picture that has the connections to the EVM and the waveforms on the scope? The important waveforms would be TXD, RXD CANH and CANL.

    A few questions:

    • Are you running this test with 3.3V to VCC1 and 5.0 volts to VCC2?
    • There is a 50Ω resistor from the TXD input to GND1, so if you are using an arbitrary waveform generator with the output set to high impedance, there is a 1/2 voltage divider that is on the boar (50Ω output impedance with 50Ω termination).
    • What is the frequency, duty cycle of your pulse (how long is it high and low, and is it repeating?

    Thanks,

    John

  • Hi John 

    Thanks For the reply.

    • Yes I am running VCC1 on 3.3 V and VCC2 on 5.0 V.
    • The pulse I am generating is using cputimer interrupts and  on GPIO31.

      I will send you a full document for all the details asked by you in few hours.

    Thanks

    Sneha 

  • Hi John

    The following is the document including the connections and the waveforms for eCAN xmitA to eCAN xmit B and also for the testing of ISo1050 EVM:

    4572.eCAN_xmitA_to_eCAN_xmitB.pdf

    The problem is that I do not get the toggling output with TXD pin as suggested by you and also my programs is stuck at while loop waiting for acknowledge signal from reciever.

    I can not understand what's going wrong and where.

    Your help would be appreciated and I am still waiting for someone to reply on my other thread related to CAN TXD pin output problem..

    Thanks

    Sneha

  • Hi Sneha,

    Thank you for sending the PDF with pictures of your set-up, this helps a lot!

    I can see two things that are incorrect about the set-up

    1. The device has a dominant state timeout that releases the bus from a dominant state typically at 450µs. Therefore, since you are sending a 1 hertz pulse, you may be missing the dominant time. The bus will go dominant for around 450µs, and then will be in the recessive state for 999.55ms, then dominant again for 450µs. Please send a 100 KHz signal to the device and see if this helps.
    2. Each EVM is populated with a 60Ω termination resistor. Therefore, if you have two in parallel, you will be loading the bus with a 30Ω termination resistance. Please remove R2 on one of the EMVs.

    The good news is that the TXD, CANH, and CANL waveforms are powered on, so we know the VCC1 and VCC2 supplies are working.

    Thanks,

    John

  • Hi John

    Thanks alot for your time.

    I have noted these points.Will implement these changes and will get back to you.

    Thanks

    Sneha

  • Hi John

    But one question .How do i bypass 60 ohm ressitance?? It would always come into picture right?

    thanks

    Sneha

  • Hi Sneha,

    You will need to de-solder the R2 resistor on the board. Unfortunately, there is no way to bypass this resistor without soldering.

    Thanks,

    John

  • Ohhk

    Alright!!!

    Wil get back to you soon  :)

    Thanks

    Sneha

  • Hi John

    The good thing is by changing my input pulse to high frequency  100kHz i could get CANH and CANL waveforms.So my EVM's are working fine. Hurray!!!! :)

    Now,I am yet to deal with the CAN example program that I am running from control suite.I suppose it shouldn't be wrong,But then I am not getting any pulses on TXD pin..I am working on it.

    Instead of de-soldering the resistor R2 from the EVM, I am purchasing the IC ISO1050  and will work with it on one end by preapring the circuit required for it. Will that work??I really dont want to risk my EVM by de-soldering and stuff.

    Thanks for your patience. :)

    Sneha

  • Hi Sneha,

    Yes, you can do that. And fortunately, there are not a lot of components you need to populate for it to operate. I would recommend a bypass capacitor from both VCC1 to GND1 and VCC2 to GND2. For now, you do not need to place any bus protection or filtering circuitry for testing your set-up. On your final design I would definitely recommend some bus filtering and protection.

    Thanks,

    John 

  • Hi John

    Thanks!!!

    Is it necessary to have this pulsating output on TXD pin for CANH and CANL to perate and in turn transmit the data?

    Regards

    Sneha

  • Sneha,

    If I am understanding your question correctly, yes. TXD needs to drop to less than 0.8 volts for the device to register a dominant bit. This in turn causes the drivers to turn on and drive CANH towards VCC2 and CANL towards GND2. Then for a recessive bit to be registered, the TXD signal needs to rise to about 2.0 volts for the driver to turn off and the signals to settle back to the VCC2 / 2 common mode voltage.

    Thanks,

    John

  • Hi John

    Yes,this is what I wanted to confirm.I mean having a pulsating input for the CAN transceiver TXD pin is necessary for CANH and CANL wave forms and hence for CAN based communication to take place.

    I understand the pre-requisites of the ISO1050,its operation the way its taking the data.But I do not understand this for the kit F28335 which I am using for the code generation,transmission and reception.Its datasheet gives the steps for configuring it for transmission,receiving and all processes,But Its no where clear  how the data which is being written into its registers MDL/MDH transforms to this pulsating waveform which is required.

    Say,now I am trying to run the control suite programs to understand this and then modify them for my requirement.But even those programs aren't working properly or may be I am  missing out on something.

    To add to it when I search the TI forum,most of the queries related to CAN are lying unanswered and so do my query.Its been  days I posted it and even when it has been forwarded to expertise team ,still I get no response.

    I understand,there might be some unavoidable circumstances  or probably my doubt is so silly to be answered But then at least someone needs to point out,something or the other.

    I have had good experience with TI support and I really wish it continues.

    Thanks John for all your patience.I will keep bugging you up ,till I get it right as I have to do it.

    Regards

    Sneha 

  • Hi Sneha,

    I am sorry that the support for you embedded processing questions are not getting answered. This is something I wish I had more experience with.

    Good luck and feel free to post any transceiver questions in the industrial interface forum.

    Thanks!

    John

  • HI John

    Thanks for all you support.

    And yes I will back to you soon as there is still lot to do with transceiver.

    Thanks

    Sneha