infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 8 of 8

Thread: CAN BSL Initialization frame payload

  1. #1
    zoompig will become famous soon enough zoompig's Avatar
    Join Date
    Mar 2013
    Location
    San Diego, CA USA
    Posts
    53
    Points
    63.75

    CAN BSL Initialization frame payload

    In the XMC4500 reference manual v1.3 the CAN BSL initialization frame is shown in Figure 26-13.
    In that diagram, the first two payload bytes of the frame are described as BTR-L and BTR-H.

    The body text in that section of the reference manual does not describe BTR-L and BTR-H.
    I am guessing they are related to the NBTR register of the CAN peripheral at node 0, but it is not clear.

    Questions:
    1) What is the interpretation of the BTR-L and BTR-H payload bytes in the CAN BSL Initialization frame?

    2) What value should be sent from the host in these payload bytes in the CAN BSL Initialization frame with 11 bit CAN-ID set to 0x555?

    Regards,
    -Kurt

  2. #2

    Infineon Employee
    Infineon Employee
    Expert
    Travis will become famous soon enough
    Join Date
    Feb 2013
    Location
    Singapore
    Posts
    749
    Quote Originally Posted by zoompig View Post
    In the XMC4500 reference manual v1.3 the CAN BSL initialization frame is shown in Figure 26-13.
    In that diagram, the first two payload bytes of the frame are described as BTR-L and BTR-H.

    The body text in that section of the reference manual does not describe BTR-L and BTR-H.
    I am guessing they are related to the NBTR register of the CAN peripheral at node 0, but it is not clear.

    Questions:
    1) What is the interpretation of the BTR-L and BTR-H payload bytes in the CAN BSL Initialization frame?

    2) What value should be sent from the host in these payload bytes in the CAN BSL Initialization frame with 11 bit CAN-ID set to 0x555?

    Regards,
    -Kurt

    Hi Kurt,

    1. BTR-L and BTR-H refers to the NBTR register
    2. See picture below.

    Click image for larger version

Name:	CAN BSL Init.jpg
Views:	0
Size:	51.4 KB
ID:	743


    Click image for larger version

Name:	CAN ACK.jpg
Views:	1
Size:	92.0 KB
ID:	742
    Last edited by Travis; Jun 11th, 2014 at 02:17 AM.
    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
    zoompig will become famous soon enough zoompig's Avatar
    Join Date
    Mar 2013
    Location
    San Diego, CA USA
    Posts
    53
    Points
    63.75
    Hi Travis,
    Thank you for your kind response.

    To clarify the action of the BTR fields as payload bytes 0 and 1 in the CAN frame: (Please correct me if I am wrong in this description)

    Presumably, the CAN-BSL Startup Software (SSW) can not know the CAN bit rate used by the host just after reset. So it must contain an automatic bit rate discovery algorithm that runs while trying to receive the CAN BSL initialization frame. The host is to retransmit this frame until this algorithm adjusts the NBTR register in the CAN peripheral until the XMC does successfully receive the one of these frames.

    So, what numeric value should be sent by the host in the BTR fields of the 0x555 CAN BSL initialization frame? Should the desired contents of the NBTR register in the CAN peripheral should be placed there? It would seem that the SSW would have arrived at this information by itself in the NBTR already during atomatic bit rate detection.

    Perhaps the NBTR settings automatically arrived at by the SSW are non-optimal, and it is looking for more optimal setting to use for further CAN communication.

    Are the contents of the BTR bytes in the initialization frame written to the NBTR register upon the first successful receive of the initialization frame by the SSW?


    Also, in the reference manual v1.3 under 26.1.10 CAN BSL Mode - Acknowledgement phase it is stated:
    After the dominant bit has been transmitted, an acknowledgement frame using the ACKID extracted from the initialization frame is sent to the host.
    The example above shows 0x55 - 0x05 in the ACKID fields of the Acknowledgement frame in response to 0x00 - 0x00 in the ACKID fields of the initialization frame.
    How is the ACKID reply in the acknowledgement frame extracted from the ACKID contents in the Initialization frame? Can the host use this relationship to check for errors?


    Thanks for considering my questions further.
    -Kurt

  4. #4

    Infineon Employee
    Infineon Employee
    Expert
    Travis will become famous soon enough
    Join Date
    Feb 2013
    Location
    Singapore
    Posts
    749
    Hi zoompig,

    There is very little information on the CAN BSL from the XMC4000 reference manual for me to answer your question. Let me check if I can find some documents regarding the SSW for CAN BSL.

    Are you building a host communication software to interact with the XMC?

    Best Regards
    Travis
    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
    zoompig will become famous soon enough zoompig's Avatar
    Join Date
    Mar 2013
    Location
    San Diego, CA USA
    Posts
    53
    Points
    63.75
    Hello Travis,

    Yes, we are looking to write some host software as well as a bootloader using CAN BSL. If you could find a little more detail on this protocol than is now available in the reference manual, it would be much appreciated.

    Thanks,
    -Kurt

  6. #6

    Infineon Employee
    Infineon Employee
    Expert
    Travis will become famous soon enough
    Join Date
    Feb 2013
    Location
    Singapore
    Posts
    749
    Hi zoompig,

    You can set your desire BTR in the initialization frame. Please check your message box

    Best Regards
    Travis
    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.

  7. #7
    Beginner Beginner mprt is on a distinguished road
    Join Date
    May 2018
    Posts
    6
    Points
    130
    Hi Travis,

    I'm also suffering with the CAN BSL (?p=18258).
    Do you have some documents that could assist me in debugging the invocation?

    Thanks!
    Matthias

  8. #8
    Beginner Beginner
    Infineon Employee
    Infineon Employee
    SunYajun is on a distinguished road
    Join Date
    Nov 2014
    Posts
    7
    Points
    108.125
    in the appnote you can find detailed info:
    https://www.infineon.com/dgdl/Infine...4936d188cd1659
    https://www.infineon.com/dgdl/Infine...4936f1b60c1697
    an example:
    #define CANLoader_16K 0x4000 //(C000-FFFF, 16Kbyte)
    #define DATA_MSG_ID 0x0556
    #define ACK_MSG_ID 0x0557

    CAN_MO1->MOAR = (0x4000 | (0x555<<2))<<16; // ID=0x555
    CAN_MO1->MODATAL = (0x4000 | ACK_MSG_ID)<<16 | 0x5555 ; // load MO1 data register low
    CAN_MO1->MODATAH = (0x4000 | DATA_MSG_ID)<<16 |(CANLoader_16K)/8; //load MO1 data register high

+ Reply to Thread

Tags for this 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.