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.
Tool/software:
Hello, our bootloader program can read and write FLASH, using the F021 API version v2.01.01 Build(000830), but in use found that the program will occasionally stop in the following while loop:
The memory status is as follows:
Some background information:
Our bootloader writes data to this area (0x002E0000-0x00300000) every time it powers up. The device is powered on not more than 10 times a day.
We have used thousands of these MCUS, but in a year of operation we have only recently found this problem in this MCU.
At present, this MCU will steadily reappear once every 20 times or so.
What is the cause of this problem? And what can be done about it?
Hi Liu,
My apologies for the delay response. I was off for few days.
We have used thousands of these MCUS, but in a year of operation we have only recently found this problem in this MCU.
Among thousands of MCU's, is this issue happening for only one MCU?
Is it possible to provide any sample code to test it at my end?
Our bootloader writes data to this area (0x002E0000-0x00300000) every time it powers up
Also, i could see only one sector in between these addresses:
I don't understand why we are looping there for sector erase operations even though there is only single sector in this address range?
--
Thanks & regards,
Jagadish.
1、Yes,only one.
2、Can you give me your email address? I will send the code by email
3、There are two bootloader programs, the first bootloader program by reading the content of the address to determine the program to jump to the second bootloader program or APP program to run. The second bootloader program overwrites the contents of this address so that the first bootloader program runs in a different code segment. So the second bootloader program erases this every time it powers on.
Hi Liu,
Thanks for sharing your code, however i didn't get a chance to go through it.
Give me couple of days' time to go through them.
I will try to provide my update by Tuesday.
--
Thanks & regards,
Jagadish.
Hi Liu,
I saw similar issue in below thread:
And here i found couple of deviations in customer code after comparing with reference code:
And after recitation of these deviations the issue seems to be rectified at customer end.
And in our code also after verifying, i found that we are not copying. const section to the RAM, i am not sure this is the root cause. However, can you please try this modification and do the testing in the corresponding MCU which is not working in some occasional cases.
For more details go through the above given thread.
--
Thanks & regards,
Jagadish.
Hi liu,
But my guess is that this problem should not be caused by software, as it only occurs repeatedly on one MCU.
You are correct, i have this doubt too. If it is software issue, then it should happen for all the controllers not just for one controller in thousands of controllers. However, give a try on the above suggested modification once then we will see what's happen.
--
Thanks & regards,
Jagadish.