Hello,
I've got the assert in the functionplatform_reset_func()
:
#ifdef ram_build.
void platform_reset_func(uint32_t error)
{
reset_reason = error;
ASSERT_ERROR(0);
}
你在论坛中说这个函数在函数时被调用platform_reset()
is called by SW. However, I never call this function and I see no caller in SDK. Can you explain me how this function is called? I have not read the error code but even with the error code value, I don't know what I can do because I don't know the caller...
Thanks a lot.
gbmej
Device:
Hi gbmej,
Τhe platform_reset_func(), which is invoked from the platform_reset(), is a function that is implemented by the ROM code. The most possible reason why you get this assertion is due to insufficient memory, or something triggers the reset pin on the 680 itself. Could you please clarify what you are trying to accomplish because your description is quite generic. It would be very helpful in order to provide you the correct guidelines.
谢谢,PM_Dialog
Thanks for your answer.
I have got another CPU which drives 680 and which can reset it using 680's reset pin. But in most of cases, the function platform_reset_func() is never called and no assert is thrown. The 680 just reboots.
680 can reboot too itself on error (hard fault, freertos error like stack overflow etc). But before rebooting in such case, I log the reboot status before let 680 reseting itself (calling hw_cpm_reboot_system() or using a watchdog) and I never see my log.
As you said, I have something which reboots 680 but I am not able to know what...
As I said before, I have not read the error code (the 680 is put in a black box) but even if I can read it, I don't know which are the available error codes and where I can play to prevent this rebooting.
谢谢,gbmej
Hi gbmej,
After the reset, the data from the log will not be retained if you are not using the __RETAINED_UNINIT attribute. This attribute will keep your data into the retention RAM uninitialized after the 680 reboots and the system initialization starts again. Can you please run your code in debugging mode and check where the code crashes? Did you have the watchdog enabled or disabled? Please try to run your firmware with enabled and disabled watchdog and let me know where your code gets stuck. Also, can you please clarify which example of the SDK and which board are you using? Have you developed a custom board with the DA14680 chip or run your firmware in our development kit? In case you have a custom board, please check the power line and a possible reason ii why you are getting a BOD reset.
谢谢,PM_Dialog
Hi,
I've got a custom board, in a black box (no jtag, no serial). I have logged this assert before rebooting. I am not able to reproduce on a dev board or on a board with a jtag. The only thing I can see is that this assert has been thrown and I don't know why. Furthermore this assert is very rare so it is very difficult for me to investigate on it.
- Watchdog is disabled.
- SDK 1.0.8
I will check the power line as you said.
Thanks for your help
gbmej
Hi gbmej,
Please run your firmware with watchdog enabled. Also, please check the power lines of your custom board and let me know with the results.
谢谢,PM_Dialog
Hello,
The assert error code is
RESET_MEM_ALLOC_FAIL
. Which peace of code can throw this error? Which heap/stack/range I have to grow ?谢谢,
gbmej
note: in my project,
malloc
is connected to FreeRTOS malloc; and I have enabled FreeRTOS allocation errors. I have no error on FreeRTOS (callback not called) but I have the platform resetRESET_MEM_ALLOC_FAIL
error code...Hi gbmej,
Could you please try to increase the total heap size, by changing theconfigTOTAL_HEAP_SIZEmacro in custom custom_config_qspi.h header file. The most obvious reason is due to memory allocation failure, that means that there is a memory leakage in your software, you allocate data somewhere and you never release them.
谢谢,PM_Dialog