XMC4300 EtherCat Firmware Update

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

cross mob
Bale
Level 4
Level 4
5 solutions authored 25 replies posted 5 questions asked

Hello everyone,

I found for example XMC4800 EtherCat Firmware Update, I tested it and it is fine.
But my project uses XMC4300, I searched but did not find an example of XMC4300 EtherCat Firmware Update.

I am trying to edit the XMC4800 source code to use it for the XMC4300.
Can anyone help me about "Architecture – Flash partitioning of XMC4300", the image below is XMC4800.
Can you guide me to modify the source code?

HoiHo_0-1697617637999.pngIt would be great if you have any suggestions for me.
Thanks everyone,

0 Likes
10 Replies
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @Bale ,

I assume you have taken this image from EtherCAT code example for XMC 4800. As far as the flash architecture is concerned, both XMC 4300 and XMC 4800 have PS4 available for EtherCAT EEPROM emulation. You can refer XMC 4300 reference manual for this here

I am sharing the below image, showing the comparison of XMC 4300 and XMC 4800 devices -

Aashita_Raj_1-1697782838411.png

 

I hope this answers your query. Please  let us know if this helps or in case of any further query.

Best Regards,

Aashita

 

0 Likes
Bale
Level 4
Level 4
5 solutions authored 25 replies posted 5 questions asked

Hi Aashita,

I still cannot deploy FW Update with XMC4300.
I know that there is a difference in Flash between the two ICs (256kb and 2048kb), So we should change the source code in both "SSC Application" and "EtherCAT FWupdate"
The image below is the Flash address of both.
Can you guide me to change the Flash address in the source code so that the XMC4300 can work?

Thanks,

HoiHo_0-1698417769891.png

 

0 Likes
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @Bale ,

You can refer our DAVE based code example project here : ETHCAT_SSC_XMC43 Example Project .

In this CE, you can find the ways to modify Flash to make EtherCAT work. Please refer this and let us know if this helps.

Best Regards,

Aashita

0 Likes
Bale
Level 4
Level 4
5 solutions authored 25 replies posted 5 questions asked

Hi Aashita,

Thank you for your link, but there are no instructions on FWupdate.
My Ethercat works fine, what I need is FWupdate with XMC4300.
I referred to the XMC4800's instructions to do the following:

I divided the 256kbytes of the XMC4300 as follows
- 64kb : Bootloader : 0C000000 - 0C010000
- 64kb : EEPROM : 0C010000 - 0C020000
- 64kb : Application : 0x0C020000 - 0x0C030000
- 64kb : Back up buffer : 0x0C030000 - 0x0C03FFFF

I created a new program "FWUPDATE_XMC4300" and modified the #define section as below:

HoiHo_0-1698658255581.png

And this is in "linker_script.ld"

HoiHo_1-1698658348420.png

HoiHo_2-1698658374665.png

For Application, in "firmwareupdate_SSC.c" I also modified "define" as follows

HoiHo_3-1698658536432.png

In the file "linker_script_IAP.ld"

HoiHo_4-1698658600824.png

After I did the above:
I went to Twincat and tried downloading the new Firmware (bin file).
After I entered the password as "BEEFBEEF" I saw the download process normal, no error messages.
If I continue to press "Init" to restart, my program won't work anymore. I have tried turning it off and restarting and the results are still the same.

Can you suggest me a solution?

0 Likes
Bale
Level 4
Level 4
5 solutions authored 25 replies posted 5 questions asked

I hope that there is a sample of FWUPDATE XMC4300 or in this thread we can solve it together and everyone in the forum can easily implement with XMC4300

0 Likes
Bale
Level 4
Level 4
5 solutions authored 25 replies posted 5 questions asked

After downloading from Twincat, I pressed Init and observed that my MCU was no longer working, all leds were OFF.
I also get error from DAVE as below.

HoiHo_0-1698738546864.png

 

I have added 2 variables to observe from Debug:
g_firmware_download_started = 1
g_firmware_download_finished = 1
It means the download has finished, but after INIT the MCU doesn't work. Can you suggest to find the problem?

 

0 Likes
Bale
Level 4
Level 4
5 solutions authored 25 replies posted 5 questions asked

Hi @Aashita_R 
Can you show me the problem? Thank you very much

0 Likes
sujatapatil
Moderator
Moderator
Moderator
50 solutions authored 10 likes received 100 sign-ins

Hi Bale,

I see this thread is open from long time and there is no activity from your last post on November 2 . Please let me know if you want us to address any issue you are facing in firmware update , i will make sure to work with you, 

Thanks

Sujata

0 Likes
Bale
Level 4
Level 4
5 solutions authored 25 replies posted 5 questions asked

@sujatapatil 
It would be nice to have an example for FoE with the XMC4300.

I know that I need to divide the address of the Flash register, can you help me with this? The XMC4300 has 256kbytes.

0 Likes
sujatapatil
Moderator
Moderator
Moderator
50 solutions authored 10 likes received 100 sign-ins

Hi @Bale,

What will be your maximum firmware size?

Do you need Backup Firmware ? Because XMC4300 has only 256KB , so if we partition them like 16KB- bootloader then maximum firmware size of firmware can be supported only upto 112kb , hope this is okay . 

We can also skip backup firmware and maintain versioning in bootloader , so if there is new version then erase flash and program new firmware . Here we have to make sure firmware is not bad file .

Please let me know , which option you would like to go , then accordingly i can suggest few input .

Thanks

Sujata

 

0 Likes