About Infineon TC234 CAN bootloader

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User21797
Level 2
Level 2
10 likes given First comment on blog First solution authored

Hi there,

We are looking into CAN bootloader feature. More specifically our ultimate goal is to load program(.elf) from computer to MCU via CAN. 

But there is not much info. All I can find is ch.5.2.2 form user manual

Here is what I understand:

  1. Need to config BMI.HWCFG for CAN boot strap loader
  2. MCU will wait for CAN frame from external host to transfer the program
  3. The received program will be stored on MCU's scratch-pad RAM. After transfer complete CPU will start from address 0xC000 000

But my questions are:

  1. BMI.HWCFG has no option for CAN boot strap loader

User21797_0-1649916482710.png

  1. How to transfer program from computer to MCU? We are using UAD2Pro but I can only find documentation for debugging over CAN, nothing for loading program from CAN
  2. After program is loaded on scratch pad RAM, how do I move it into PFLASH? I saw on this forum some users mentioned need to manually write a program to do this. But how? Just copy everything from scratch-pad RAM to PFLASH then restart with the flash boot strap loader?
  3. From manual scratch-pad RAM address is 0x7000 0000 right? How come later the manual said it will start from 0xC000 0000, which on manual is said to be reserved?
  4. Is there any example, application note to follow?

We are using Hightec IDE, UAD2Pro debugger and KIT_AURIX_TC234_TFT

Thanks for reading, any reply is appreciated.

0 Likes
1 Solution
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

dw_0-1649920682922.png

1)To select the correct start up mode, need to configure the BMI.PINDIS and pin HWCFG[3], additional BMI.HWCFG[6:4] or HWCFG[5:4] pins.

BMI.HWCFG[6:4] is loaded from a valid BMHD. BMHD is located at the fixed address inside PFLASH. There are 4 BMHDs inside AURIX. User need to configure and program the BMHDs. (BMHD0: A000 0000H, BMHD1: A002 0000H, BMHD2: A000 FFE0H, BMHD3: A001 FFE0H).

HWCFG[5:4] pins are only evaluated if a valid BMHD found by SSW with BMI.PINDIS = 0 and pin HWCFG[3] = 0 (Boot from Pins HWCFG[5:4]).

After reset, AURIX SSW (Startup SW, internal firmware) will evaluate the BMI (Boot Mode Index) inside BMHDs (Boot Mode Header) to select the correct start up mode. If no valid BMHD found the Start-up Mode Generic Bootstrap Loader is used (independent of pin HWCFG3).

2) If you using CAN bus loading code, you can use seperate CAN bus device which is transfering Code from PC to your Triboard(if you use) UAD2Pro is a debugger which is used for debuggging, I am not sure if it can support CAN BSL directly, you can consult by link: https://www.hitex.com/tools-components/development-tools/pls-development-environment/universal-acces...

3) To write Flash there is demo code from ADS and git.  but needs do modifications accordingly . https://github.com/Infineon/AURIX_code_examples/tree/master/code_examples

4) For memory map, you can refer to chapter 4 memory maps - tc23x-tc22x_um_v1.1.pdf

 and see also chapter ´CPU, ´Local and Global Adressing´ for CPU local views to segment ´C´ and segment ´D´.

5)Is there any example? 

Please contact local FAE or disiti for consult

 

dw

View solution in original post

3 Replies
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked

Hi,

please refer to tc23x_tc22x_um*.pdf .

 

In 5.2.3 Summary of Bootstrap Loader Mode you can find Table 5-4 which indicates Generic Bootstrap Loader Mode for CAN. For everything else please consult your PDH service partner.

Best regards,

TBencher

Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

dw_0-1649920682922.png

1)To select the correct start up mode, need to configure the BMI.PINDIS and pin HWCFG[3], additional BMI.HWCFG[6:4] or HWCFG[5:4] pins.

BMI.HWCFG[6:4] is loaded from a valid BMHD. BMHD is located at the fixed address inside PFLASH. There are 4 BMHDs inside AURIX. User need to configure and program the BMHDs. (BMHD0: A000 0000H, BMHD1: A002 0000H, BMHD2: A000 FFE0H, BMHD3: A001 FFE0H).

HWCFG[5:4] pins are only evaluated if a valid BMHD found by SSW with BMI.PINDIS = 0 and pin HWCFG[3] = 0 (Boot from Pins HWCFG[5:4]).

After reset, AURIX SSW (Startup SW, internal firmware) will evaluate the BMI (Boot Mode Index) inside BMHDs (Boot Mode Header) to select the correct start up mode. If no valid BMHD found the Start-up Mode Generic Bootstrap Loader is used (independent of pin HWCFG3).

2) If you using CAN bus loading code, you can use seperate CAN bus device which is transfering Code from PC to your Triboard(if you use) UAD2Pro is a debugger which is used for debuggging, I am not sure if it can support CAN BSL directly, you can consult by link: https://www.hitex.com/tools-components/development-tools/pls-development-environment/universal-acces...

3) To write Flash there is demo code from ADS and git.  but needs do modifications accordingly . https://github.com/Infineon/AURIX_code_examples/tree/master/code_examples

4) For memory map, you can refer to chapter 4 memory maps - tc23x-tc22x_um_v1.1.pdf

 and see also chapter ´CPU, ´Local and Global Adressing´ for CPU local views to segment ´C´ and segment ´D´.

5)Is there any example? 

Please contact local FAE or disiti for consult

 

dw

User21797
Level 2
Level 2
10 likes given First comment on blog First solution authored

Thank you for all your replies 🙏. Still not sure how it works but turn out UAD already have these functionalities 😁. I will dig deeper once I have time. 

0 Likes