KW30Z ResetMCU after OTAP upload

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KW30Z ResetMCU after OTAP upload

621 Views
lucianfiran
Contributor V

KW40Z_Connectivity_Software_1.0.1 (KSDK_1.3.0); IAR 7.50

Sometimes reset mcu fails after OTAP 100% upload, sometimes in debug mode.

What could be the reason ?

SWD pins set-up or reset pin set-up ?

KW40Z_Connectivity_Software_1.0.1\ConnSw\framework\Reset\Reset.c

void ResetMCU(void)
{
  NVIC_SystemReset();
  while(1);
}

C:\Freescale\KW40Z_Connectivity_Software_1.0.1\KSDK_1.3.0\platform\CMSIS\Include\core_cm0plus.h

/** \brief  System Reset

    The function initiates a system reset request to reset the MCU.
 */
__STATIC_INLINE void NVIC_SystemReset(void)
{
  __DSB();                                                     /* Ensure all outstanding memory accesses included
                                                                  buffered write are completed before reset */
  SCB->AIRCR  = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
                 SCB_AIRCR_SYSRESETREQ_Msk);
  __DSB();                                                     /* Ensure completion of memory access */
  while(1) { __NOP(); }                                        /* wait until reset */
}

/*@} end of CMSIS_Core_NVICFunctions */

0 Kudos
2 Replies

387 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Lucian

This question is related to the thread KW40Z OTAP safety for no battery devices ?

Could you clarify what do you mean with "Sometimes reset mcu fails" so there are sometimes that your application works and your MCU reset correctly? How are you seeing this? You cannot debug your otap and the application in the same debug session, because it doesn't include the symbols from your application.

SWD pins set-up or reset pin set-up shouldn't affect to the programming by OTAP, so, this is not the problem. Maybe the problem is your application, could you verify with one of our demo applications?


Hope this information helps you
Have a great day,
Jorge Alcala

0 Kudos

387 Views
lucianfiran
Contributor V

Hi Jorge,

(MW30Z device, AC/DC powered, no batteries)

I use for testing the OTAP app

Kinetis BLE Toolbox – Aplicații Android pe Google Play 

(version 5.0.0)

Where I can tune the time from wheel icon - default 100ms.

For values like 50 - 100ms the OTAP process goes well no issues.

For values from 1ms to 10ms to 20ms the OTAP download:

- sometime works perfect (even for 1ms where the total time is less than 3 minutes)

- sometimes get stuck at xx% but the device is responsive after disconnect and connect to other gatt calls.

(I need to restart the device to work a new OTAP download)

-sometimes it reaches 100% and then goes to 0% 1% again ..... - this is also very weird.

Best Regards,

Lucian

0 Kudos