Banner_AURIX_Security-Solution Banner_AURIX_Security-Solution Banner_AURIX_Security-Solution Banner_AURIX_Security-Solution


+ Reply to Thread
Results 1 to 5 of 5

Thread: TC27x MultiCAN

  1. #1
    New Member New Member pgm is on a distinguished road
    Join Date
    May 2019
    Posts
    3
    Points
    40

    TC27x MultiCAN

    Hi,

    I'm preparing CAN communication for AURIX™ TC27x D-Step based on the example from User’s Manual V2.2 2014-12
    .
    The code from chapter 22.5 works perfectly with loopback mode.

    Code:
    (8) CAN_NPCR0 = (1 << 8); // LBM=1
    (9) CAN_NBTR0 = 0x3EC9;   //set bit segments
    ...
    (11) CAN_NPCR1 = (1 << 8); // LBM=1
    (12) CAN_NBTR1 = 0x3EC9;   //set bit segments
    My goal is to communicate with other CAN device via TXDCAN0/RXDCAN0A

    Code:
    CAN_NPCR0.U = 0x001; // set NPCRx.RXSEL 001 to select Port 20.8 for TXDCAN0 and Port 20.7 for RXDCAN0A
    CAN_NPCR1.U = 0x001;
    unfortunately it doesn't work after selecting the port and I'm not sure if the code or wiring or bitrate is wrong.

    Thanks in advance.

    Similar thread:
    https://www.infineonforums.com/threa...odule-on-TC275

  2. #2
    Advanced Advanced
    Infineon Employee
    Infineon Employee
    MoD is on a distinguished road
    Join Date
    Feb 2012
    Location
    Munich
    Posts
    52
    Points
    944.375
    Hi,
    you must configure the P20.8 as output of TXDCAN0 (P20.IOCR8) and P20.7 as input for RXDCAN0A (P20.IOCR4).
    Addtional the PDR Register for P20.8 should be set to the needed output strength (depends on needed CAN speed).
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  3. #3
    New Member New Member pgm is on a distinguished road
    Join Date
    May 2019
    Posts
    3
    Points
    40
    Thank you for quick response.

    Before updating the code I've checked related registers values in UDE after calling iLLD function :

    Code:
    CAN0_Init(125000);
    PC8 = 0x15 in P20_IOCR8 looks ok however I do not see P20_PDR.B.PD1 = 0 (speed grade 1)

    Are these settings correct for Port 20.8/TXDCAN0 and Port 20.7/RXDCAN0A with 125000 bitrate ?

    Thanks

    Click image for larger version

Name:	TC27x_P20_IFX.PNG
Views:	5
Size:	12.4 KB
ID:	3983

  4. #4
    Advanced Advanced
    Infineon Employee
    Infineon Employee
    MoD is on a distinguished road
    Join Date
    Feb 2012
    Location
    Munich
    Posts
    52
    Points
    944.375
    Config seems be good. Check the output P20.8 when you send anything on this node. Because you set also node 1 you will use there P14.0/P14.1. If the IO config for P14.0/P14.1 is also correct?
    You are sure that you have a transceiver on this two pairs P20.7/P20.8 and P14.0/P14.1 and they are connected togheter?
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  5. #5
    New Member New Member pgm is on a distinguished road
    Join Date
    May 2019
    Posts
    3
    Points
    40
    You are right - the sample from chaper 22.5 uses node0 for TX and node1 for RX (via loopback).

    Code:
    (14) CAN_PANCTR = (1 << 24)|(0 << 16)| 2; // MO 0 to list 1
    (16) CAN_PANCTR = (2 << 24)|(1 << 16)| 2; // MO 1 to list 2
    As I need only one node I updated the code like below and TX/RX works fine via TXDCAN0/RXDCAN0A

    Code:
    CAN_PANCTR.U = (1 << 24)|(0 << 16)| 2; 	// MO 0 to list 1
    CAN_PANCTR.U = (1 << 24)|(1 << 16)| 2; 	// MO 1 to list 1
    Thank you for support.

+ Reply to Thread
Disclaimer

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.