+ Reply to Thread
Results 1 to 8 of 8

Thread: XE167FH MultiCAN problem

  1. #1

    XE167FH MultiCAN problem

    It's first time I use the XE167FH MCU. I'm evaluating XE167FH kit.

    The first thing I did was using DAVE. I initialized CAN0 at pins P2.6 and P2.5. Tried sending extended frames at 1 Mbps and it worked fine.
    Figure below shows pulses on Tx pin.
    Click image for larger version

Name:	d35e8d7b6b3c3db010845d5714d50bc2.jpg
Views:	2
Size:	99.3 KB
ID:	1514

    My next step was to remap CAN0 pins to P11.0 and P11.1. I kept MO settings the same as first time.
    I changed 2 lines:
    P2_IOCR05 = 0x00A0; ----> P11_IOCR01 = 0x00A0;
    CAN_NPCR0 = 0x0003; ----> CAN_NPCR0 = 0x0005;

    Now CAN doesn't send any data. At the same time I observe this on Tx pin:
    Click image for larger version

Name:	27352ec07b0b9c698990021e081b3c24.jpg
Views:	1
Size:	91.2 KB
ID:	1513

    One more thing. If I configure BOTH P2.5 and P11.1 to be can transmitting pin, they both provide valid CAN Tx signals as on the first figure.
    What am I doing wrong? Is there any thing else I should configure to swap CAN pins?

    Last edited by TripleKill; Apr 29th, 2015 at 03:24 AM.

  2. #2
    What am I doing wrong? Is there any thing else I should configure to swap CAN pins?
    All attempts to modify them are
    ignored.if not used the (SET mask 0x40) see the bitpos ....
    CCE Bit 6 rw "Configuration Change Enable bit" in the NCRx Register.
    Can you post the part of the code ?
    Greetings Holger.
    See Node x Control Register.

  3. #3
    That's the initialization. It seems to be fine with NCR0 mask 0x0040.

    void CAN_vInit(void)
      MCAN_KSCCFG  =  0x0003;      // load Kernel State Configuration Register ¬ключаем can модуль
      _nop_();  // one cycle delay 
      _nop_();  // one cycle delay 
      ///  - the CAN module clock = 40,00 MHz
      CAN_FDRL     =  0x43FF;      // load Fractional Divider Register
      while(CAN_PANCTRL & CAN_PANCTR_BUSY){ };   //// команда работы со списком выполнена                       
      CAN_NCR0     =  0x0041; // прерывани€ разрешены
    //    P11_IOCR01 = 0x00A0;    //TXD = P11.1
    //    CAN_NPCR0    =  0x0005;      // RXD = P11.0
       P2_IOCR05 = 0x00A0;    //set direction register
       CAN_NPCR0    =  0x0003;      // load node0 port control register
       CAN_NBTR0L   =  0x2F41; // 1 ћ√ц
       SetListCommand(0x0101,0x0002);  // MO1 for list 1 (Node 0) 
      ///  -----------------------------------------------------------------------
      ///  Configuration of Message Object 1: Tx, Node 0 передача
      ///  -----------------------------------------------------------------------
      CAN_MOCTR1H = 0x0EA8;        // load MO1 control register high
      CAN_MOCTR1L = 0x0000;        // load MO1 control register low
      CAN_MOAR1H = 0x630C;         // identifier 29-bit
      CAN_MOAR1L = 0x000D;         // load MO1 arbitration register low
      ///  Configuration of Message Object 1 Data:
      CAN_MODATA1HH = 0x0A0A;      //;0x556     
      CAN_MODATA1HL = 0x0A0A;            // data MSG_CNT in XC2000
      CAN_MODATA1LH = 0x0A0A;  
      CAN_MODATA1LL = 0x0A0A;              // load MO1 Data Bytes(DB1 & DB0)
      CAN_MOAMR1H = 0x3FFF;        // load MO1 acceptance mask register high
      CAN_MOAMR1L = 0xFFFF;        // load MO1 acceptance mask register low
      CAN_MOFCR1H = 0x0800;        // load MO1 function control register high  
      CAN_MOFCR1L = 0x0000;        // load MO1 function control register low
      CAN_NCR0 &= ~ (uword) 0x0041; // reset INIT and CCE
      CAN_PANCTRL = 0x01;          // CAN Node initialization command
      while(CAN_PANCTRL & CAN_PANCTR_BUSY){ };// wait until Panel has finished
    } //  End of function CAN_vInit
    I just can't understand, why both P2.5 and P11.1 work and P2.5 itself works, but P11.1 doesn't work when set as Tx pin.
    Do you have any sample initialization code? Can you post it here?

    Last edited by TripleKill; May 4th, 2015 at 09:47 PM.

  4. #4
    Later i can post some Code, but lets analyse special this Port-Muxer problem step,by step...
    Here is to check out the Ports TX- Class A,B,C --SubClass A0,B0,C0.... and the Respective Node for the internal '''Muxer that i routed to the final Pins--PORT-I/O.
    First possible error Source can be the wrong Pin-Node Register you are storing on your mask 0x40 or 0x41
    So the Pin is not finaly routed throgh the Chip.or the Transcreiver Logic Encoder/Decoder is not routed. A,B,C Group-Switch-Matrix)Buff-Gate)--Outputdriver-->PIN

    See this Sample Picture wich i made for my derivate. Click image for larger version

Name:	MuliCan.PNG
Views:	2
Size:	220.1 KB
ID:	1530
    You must check your Datasheet exact for your Derivate,and the Shematic of corse, and the final-PCB Pins,

  5. #5
    Click image for larger version

Views:	1
Size:	33.9 KB
ID:	1531
    Can you check out the 0x40 mask with your es_special derivate & Datasheet.

    CCE Bit 6 rw "Configuration Change Enable bit" in the NCRx Register.
    Tip: This triggers the BOFF Status in your Irq-routine. Bus on Bus off ect. Like the old NE2000 Chip for Ethernet..during configuration.
    During config the Bus must be off-line, See bit Zero of Mask 0x41, In Reset this bit is set. to run the Bus-engine-State-engine it mus be Cleard-to Zero.
    And Bit 6 must be the CCE (Config-Change enable )write Enable trigger set to Zero.

  6. #6


    See here is a Pull-Up involved.
    I am checking the XE167FH Datasheet, but it takes a while for me.

    Next step is to check if your Tranceiver is enabled, or slit-mode set, or som pin is cross-talking via the alternate-at-port-Resistor(i post a photo of this two resitors later), that you get
    this gap'___' signal on your TEK-Scope.
    What else can ths be ???
    .I hope you find the 1 of thousend needle in a bunch of reasons why it has this problem.
    Or in the XE167FH Headerfile, 0x8000, 0x0080 ect. the switch-mux-'port-mask is wrong. Thats i had with the NXP derivate.

    Greetings Holger.

    void CAN_vInit_Node0(void)
    /// -----------------------------------------------------------------------
    /// Configuration of CAN Node 0:
    /// -----------------------------------------------------------------------
    /// General Configuration of the Node 0:
    /// - set INIT and CCE
    CAN_NCR0 = 0x0041; // load node 0 control register SUSEN=1
    /// Configuration of the used CAN Port Pins: I/O PIN Configuration for CAN 1
    CAN_NPCR0 = 0x0002; // P2.0 Rx = receive input C NO LOOP BACK
    /// Configuration of the used CAN Port Pins: I/O PIN Configuration for CAN 1
    P2_IOCR00 = 0x0020; // P2.0 as input (pull up)
    P2_IOCR01 = 0x0090; // P2.1 as output (ALT1, push pull)
    /// Configuration of the Node 0 Baud Rate:
    /// - required baud rate = 500,000 kbaud
    CAN_NBTR0L = BAUD_0500_000_WITH_MHZ_75; // Set Baud Rate of Node 0 at 500
    kbaud at 75 MHz
    /// -----------------------------------------------------------------------
    /// Configuration of the CAN Message Object List Structure:
    /// -----------------------------------------------------------------------
    /// Allocate MOs for list 1/Node0:
    SetListCommand(1, 11, CAN_INIT_LIST);
    SetListCommand(1, 12, CAN_INIT_LIST);
    } //End of CAN_vInit_Node0]
    Last edited by klatubarara; May 8th, 2015 at 01:07 AM. Reason: Datasheetlink

  7. #7

    sample initialization code for CAN Config and

    I just can't understand, why both P2.5 and P11.1 work and P2.5 itself works, but P11.1 doesn't work when set as Tx pin.
    Do you have any sample initialization code? Can you post it here?

    See the third entry with the Alternate Fuction Reg. Pull-Up.

    And the Link for Chinese Lib

    And Link to Datasheet for XE167FH.

  8. #8
    New Member New Member MonitorMan is on a distinguished road
    Join Date
    Dec 2019
    I am currently busy with the SAF-XE167FH-200F100LAB and the CAN communication. I have no problems with the TXD = P11.1 pin and RXD = P11.0. Runs smoothly.

+ Reply to Thread

All content and materials on this site are provided Уas isУ. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.

Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.