RESET_AFTER_SPOTA_UPDATE error

⚠️
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.
2 posts / 0 new
Last post
ksrgopinath
Offline
Last seen:3 years 7 months ago
加入:2016-12-10 08:01
RESET_AFTER_SPOTA_UPDATE error

Dear Support,

I am working on DA14580 custom board. With your help we have progressed very much. Now we have a new problem, where our code execution is being constantly struck at
/**
****************************************************************************************
* @brief Wrapper of the platform reset. It will be invoked before a software reset
* is issued from the stack. Possible reasons will be included in the error field
* @param[in] error The reason for the reset. It will be one of:
*RESET_NO_ERROR,RESET_MEM_ALLOC_FAIL,RESET_TO_ROM,RESET_AND_LOAD_FW
* @return Returns nothing.
****************************************************************************************
*/
void wrap_platform_reset(uint32_t error)
{
ASSERT_WARNING(error==RESET_AFTER_SPOTA_UPDATE); //do not break in case of a SPOTA reset
platform_reset_func(error);
}
So far I have been tampering ble_app_perpheral project to trim to our needs.

Which are
1. Data collection from 3 temperature sensors where we are getting ADC data
2. Data collection from one sensor where we are using timer0 to record the pulse duration, using PWM code thats already existing.
3. Using a interval timer to get readings at an intervel, for this I am using "systemtick code" to setup a 15 minute timer. Which kick starts on application initialization (default_app_on_init).

Over all picture of what we are tying to achieve is to obtain a reading, 3 temperatures and 1 sensor (PWM) @ 15 min interval and pack them in to one data packet and store locally(buffer size 10). When an App requests for data, we send these one after other.

We were able to send 3 temperature data and dummy sensor data packed successfully. But when we enable timer0 and try using PWM, we were hitting this error = RESET_AFTER_SPOTA_UPDATE.

Any pointers here please. Also will you please provide us tips on how to enable blue tooth board casting at intervals to save current consumption/.
Best regards,
Sri

Note: like mentioned herehttps://support.dialog-semiconductor.com/how-notify-when-i-push-buttonI have tried fine tuning the delay but its of o use. any other suggestions please.

Device:
MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
Hi ksrgopinath,

Hi ksrgopinath,

As mentioned in the link that you have posted, in most cases this kind of reset happens when you are allocating too much messages and you are not consuming them, and eventually you run out of heap, so the wrap_platform reset occurs. I dont see any obvious relation between enabling the timer0 and the PWM functionallity with this kind of behaviour, since working with timers doesn't allocate any messages or doesn't involve any interaction with the stack. So please check if somewhere in your code your are allocating messages that they are not freed or perhaps you are sending notifications more often than your connection interval can support, for example you set up a kernel timer to produce notifications every 10ms and your connection interval is every 2 second that will force the messages to pile up and flood your heap.

Regarding your second question, i am not sure if i get the exact question, but there is no generic optimal configuration for the connection interval that your device should have. In general one can assume that as long as you stay in sleep mode the less power you consume, but when your connection intervals are quite large that will force the device to have the radio receiver active for longer periods (due to clock drift) on each connection intervals. Also the selected connection interval has to agree with the application's requirements. So as you understand the selected connection interval has to fulfill your application's requirements and even if the application doesn't require often data transfer there is a tradeoff between choosing a short or a large connection interval.

Thanks MT_dialog