Dec 03, 2018
02:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 03, 2018
02:59 PM
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
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
// 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<// XMC_SCU_SetBootMode(XMC_SCU_BOOTMODE_CAN_BSL);
// PPB->AIRCR = 1 << PPB_AIRCR_SYSRESETREQ_Pos |
// 0x5FA<
- Tags:
- IFX
4 Replies
Dec 06, 2018
01:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 06, 2018
01:46 PM
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??
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??
Dec 06, 2018
11:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 06, 2018
11:15 PM
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.
Dec 08, 2018
01:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 08, 2018
01:46 AM
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...
I just thought that If I were to design an Development Board like the Relax Kit, I'd certainly make those pins accessible...
Dec 11, 2018
12:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 11, 2018
12:26 AM
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
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