infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 5 of 5

Thread: CAN BSL - Relax Kit

  1. #1
    Beginner Beginner mprt is on a distinguished road
    Join Date
    May 2018
    Posts
    6
    Points
    130

    CAN BSL - Relax Kit

    Hi,

    I'm trying for days now to invoke the CAN BSL on my XMC4700 Relax Kit.
    I have tried a lot, but I can't figure out, what I'm missing...

    As for the Code on the XMC, I've tried several versions and their permutations.
    You can see the snippet below.
    Currently I'm using the three uncommented lines in the middle. I found them here in the forum and they should work according to at least 2 persons.
    I've also routed TCK and TMS to Low/High just to be on the safe side.

    The tricky part is probably the invocation message.
    I'm using two usb-can-dongles (one is in listen-only mode) and a scope, so I'm pretty sure I've taken care of not sending any ACKs during invocation phase.
    Instead, one dongle is constantly sending the invocation packet and I'm waiting for the XMC BSL to ACK it...

    I've tried several different 8-byte CAN packets and baudrates, but nothing works.
    I've also read the example code for the XMC CAN BSL and used that invocation message, but without luck.



    I would be very, very grateful for a minimal example on how to invoke the BSL on a XMC4700 Relax Kit.



    Thanks!
    Matthias



    Code:
    //		SCU_RESET->RSTCLR |= SCU_RESET_RSTCLR_RSCLR_Msk;
    //		XMC_SCU_SetBootMode(XMC_SCU_BOOTMODE_CAN_BSL);
    //		SCU_GENERAL->STCON &= !SCU_GENERAL_STCON_SWCON_Msk;
    //		SCU_GENERAL->STCON |= 3 << SCU_GENERAL_STCON_SWCON_Pos;
    //		PPB->AIRCR = ( PPB->AIRCR & !( PPB_AIRCR_VECTKEY_Msk | PPB_AIRCR_SYSRESETREQ_Msk ) ) \
    //				+ ( 0x5FA << PPB_AIRCR_VECTKEY_Pos ) + PPB_AIRCR_SYSRESETREQ_Msk;
    //		NVIC_SystemReset();
    
    		SCU_GENERAL -> STCON = 0x300; /*Enable CAN BSL*/
    		SCU_RESET -> RSTCLR |= 0x1; /* Clear reset status */
    		PPB -> AIRCR |= 0x4; /* Trigger System reset */
    
    //		SCU_RESET->RSTCLR = 1<<SCU_RESET_RSTCLR_RSCLR_Pos;
    //		XMC_SCU_SetBootMode(XMC_SCU_BOOTMODE_CAN_BSL);
    //		PPB->AIRCR = 1 << PPB_AIRCR_SYSRESETREQ_Pos |
    //				0x5FA<<PPB_AIRCR_VECTKEY_Pos | 0x1 << PPB_AIRCR_PRIGROUP_Pos;

  2. #2
    Beginner Beginner mprt is on a distinguished road
    Join Date
    May 2018
    Posts
    6
    Points
    130
    Ah...
    The BSL only listens on P1.4 and P1.5.

    For some weird reason I thought that if you have a CAN Transciever on the Board and explicitly mention the CAN BLS in the Boards Documentation, maybe you could've made the only logical decision and design the board so people can actually use the CAN BSL...

    But no, instead you decided to not route those Pins at all and leave them completely unconnected, so no one can use neither the CAN BSL, nor the ASC BSL!!

    Seriously... why??

  3. #3
    Intermediate Intermediate ErnieT is on a distinguished road
    Join Date
    Feb 2018
    Location
    Germany
    Posts
    16
    Points
    305
    The CAN BSL is an inbuilt function in ROM section, which is read-only. There's no way to provide additional parameters to the BSL. The only way is to set parameters in flash. See ABM 0 and ABM 1 for much better way to write your own bootloader.

  4. #4
    Beginner Beginner mprt is on a distinguished road
    Join Date
    May 2018
    Posts
    6
    Points
    130
    Yes, I understood that part.

    I just thought that If I were to design an Development Board like the Relax Kit, I'd certainly make those pins accessible...

  5. #5

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    441
    Hi,

    Regarding ASC BSL, the P1.4/P1.5 are connected to the on board debugger USB VCOM. So you can use ASC BSL. Actually using JLink commander you can force TCK and TMS driven by the on board debugger appropiately to enter the ASC BSL mode after a reset.
    Regarding CAN BSL, you are right, the XMC4700 relax kit is not the best choice, please consider the XMC4500 application kit plus the Ethernet/CAN/RS485 Interface Kit.

    Regards,
    Jesus
    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.

+ 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.