This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Team,
Here are some issues from the customer may need your help:
I want to implement jumps between the two projects of CM and the two projects of CPU1 respectively. Some problems occurred during the implementation process:
The two projects of CM are CM_APP and CM_Bootloader, and the two projects of CPU1 are CPU1_APP and CPU1_Bootloader.
The configurations of CM and CPU1 APP are:
The bootloader's configurations is:
Question 1: In debug mode, CPU1 can jump between APP and bootloader normally, but CM will enter faultISR or defaultISR when jumping from one project to another (CM's APP has transplanted the lwip_udp protocol to realize network port communication).
Question 2: exit function does not work:
Question 3: If the ECAT clock function is set in the APP project of CPU1 (because the app program needs to implement ECAT communication), IPC_sync(IPC_CM_L_CPU1_R, IPC_SYNC) in the APP project of CPU1 will become invalid after powering on again.
The project is attached below, which can be directly programmed and run on the 28388 demo board.
--
Thanks & Regards
Hi Yale,
I may need an additional day to test this project, will update you on the latest.
Thanks and regards,
Charles
Hi Yale,
First, what peripheral are you using to do the firmware update? The kernels given do not seem to be related to SCI.
Second, does the CM bootloader only jump to the CM app loaded into the device previously? I do not see the CM bootloader programming the CM App within it's main file. For question 2, does it work if you try the following lines:
__asm(" mov r0, #0x00210000");
__asm(" mov pc, r0");
For question 3, I am unsure of the EtherCat usage in this scenario, but will get more feedback on its usage with my team.
Thanks and regards,
Charles
Hi Charles,
Thanks for your reply.
1. The customer intends to use cm's Ethernet communication to transmit program data for upgrade, so the Ethernet function must be added to cm_bootloader and cm_app. The attached project only adds Ethernet to cm_app because he has tested that if ethernet is added to both of bootloader and app, after the cm program jumps from app to bootloader, the ethernet function of bootloader cannot be used normally. So first test whether the two projects can jump normally. The current problem is that even if only the app adds ethernet communication, problems will still be encountered when the two projects jump.
2. Yes, there is no programming program added to the bootloader project yet, it just test project jump.
It is possible to jump normally using the above instructions, but the customer wants to know why the jump cannot be made using the exit function.
3. OK thanks, looking forward to your reply.
--
Thanks & Regards
Yale,
After comparing the CM project's bootloader to the CM Flash kernel bootloader, I noticed that the exit() function is being placed in flash as .text. Does this have the same effect if the function is placed in S0RAM or S1RAM in the linker cmd file?
The map file for the CM Bootloader also shows four far trampoline calls for some flash initialization functions.
Thanks and regards,
Charles
Hi Charles,
The second question the customer will go and try again. Can you follow up on the first and third questions?
--
Thanks & Regards
Hi Yale,
I am having a difficult time understanding question 3. The customer is having an issue with IPC_sync() function?
Best Regards,
Ben Collier
Hi Ben,
About question3, It is because the following part of the code is used in the CPU1_APP project, which causes the function IPC_sync() to fail during the jump process.
In order to better illustrate this question, the customer re-uploaded a compressed file: ⇒ 0334.appTest.zip ⇐
This compressed file contains 4 projects: CPU1_APP, CM_APP, CPU1_BOOTLOADER, CM_BOOTLOADER
Programming range:
CPU1_BOOTLOADER, CM_BOOTLOADER: sector0~sector2
CPU1_APP, CM_APP: sector3~sector13
This file can be directly programmed to controlCARD to run.
Here is a brief explanation:
After controlCARD is powered on and reset, it first runs CPU1_BOOTLOADER and CM_BOOTLOADER. When running, CPU1_BOOTLOADER makes the LED light D1 of the controlCARD flash slowly 3 times and then jumps to CPU1_APP, makes the LED light D1 flash 4 times quickly and then continues to jump to CPU1_BOOTLOADER. The CM core works similarly to the CPU1 core, causing the LED light D2 to perform a similar flashing action.
question:
1. In CPU1_APP, if define ETHERCAT, program cannot jump from CM_BOOTLOADER to CM_APP normally.
2. Even if not define ETHERCAT, program cannot jump from CM_BOOTLOADER to CM_APP normally, or trap in dafaultISR.
--
Thanks & Regards
Yale,
Thank you for the additional information. I will need another day or so to get back to you about this.
Best Regards,
Ben Collier
Yale,
This is a very difficult issue to debug.
2. Even if not define ETHERCAT, program cannot jump from CM_BOOTLOADER to CM_APP normally, or trap in dafaultISR.
Can the customer try editing their program until they can jump correctly? I think the only way to find out what is going wrong here would be to remove code until it works as expected. This way we can find the problem code, and think of how to work around it.
Best Regards,
Ben Collier
Hi Ben,
There are the following two parts of code involving ETHERCAT, both in the CPU1_APP project:
The first picture is if ETHERCAT is not used, set the auxiliary clock to 125M and the CM clock to divide by 1.
The second picture shows that if ETHERCAT is used, the auxiliary clock of the first picture is set to 500M, and the CM clock is divided by 4.
Customers have already used the method you mentioned, and here are a few situations they encountered:
1. If ETHERCAT is not used in the CPU1_APP project, that is, the auxiliary clock is set to 125M, and the CM clock is divided by 1. The CM jump situation is that the bootloader project can jump to the APP project, but the APP will enter when it jumps to the bootloader. faultISR interrupt.
2. If ETHERCAT is used, that is, set the auxiliary clock to 500M, and the CM clock frequency is divided by 4.
In this case, the CM jump situation is: when jumping from the bootloader to the APP, the following situation will occur:
Therefore, the customer has tried the above two situations, but neither of them can jump normally.
--
Thanks & Regards
Hi Yale,
This expert is currently on leave. Please expect a delay in response until he returns March 18.
Thanks & Regards,
Allison