platform_reset_func caller

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
8 posts / 0 new
Last post
gbmej
Offline
Last seen:2 years 5 months ago
Joined:2017-09-13 15:16
platform_reset_func caller

Hello,
我'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);
}

哟u said in the forum this function is called when the functionplatform_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:
PM_Dialog
Offline
Last seen:2 hours 16 min ago
Staff
Joined:2018-02-08 11:03
Hi gbmej,

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.

Thanks, PM_Dialog

gbmej
Offline
Last seen:2 years 5 months ago
Joined:2017-09-13 15:16
谢谢你的回答。我

谢谢你的回答。

我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.

Thanks, gbmej

PM_Dialog
Offline
Last seen:2 hours 16 min ago
Staff
Joined:2018-02-08 11:03
Hi 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.

Thanks, PM_Dialog

gbmej
Offline
Last seen:2 years 5 months ago
Joined:2017-09-13 15:16
Hi,

Hi,

我'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
我will check the power line as you said.
Thanks for your help

gbmej

PM_Dialog
Offline
Last seen:2 hours 16 min ago
Staff
Joined:2018-02-08 11:03
Hi 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.

Thanks, PM_Dialog

gbmej
Offline
Last seen:2 years 5 months ago
Joined:2017-09-13 15:16
Hello,

Hello,
The assert error code isRESET_MEM_ALLOC_FAIL. Which peace of code can throw this error? Which heap/stack/range I have to grow ?
Thanks,
gbmej

note: in my project,mallocis 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_FAILerror code...

PM_Dialog
Offline
Last seen:2 hours 16 min ago
Staff
Joined:2018-02-08 11:03
Hi gbmej,

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.

Thanks, PM_Dialog