Page 2 of 2

Re: NNDK 2.6.9 HTTP Trap

Posted: Thu Mar 05, 2015 5:57 pm
by roland.ames
I am not familiar with the Nano, but with other modules, the system/autoupdate.cpp function DoData() has

Code: Select all

      if ( ( ( pDr->dwThisAddr + pDr->dwThisLen ) >
             ( pCurRecord->dwUpdateBaseAddr + pCurRecord->dwDataLength ) ) ||
           ( pDr->dwThisLen > 492 ) )
      {
         pDr->bAction = UPDATE_RESULT_ERROR;
      }
      else
      {
         if(watchdog_service_function)
            watchdog_service_function();
         memcpy( pCurRecord->pData +
                 ( pCurRecord->dwLastRxAddr - pCurRecord->dwUpdateBaseAddr ),
                 pDr->bData,
                 pDr->dwThisLen );
         pCurRecord->dwLastRxAddr += pDr->dwThisLen;
         pDr->dwThisAddr = pCurRecord->dwLastRxAddr;
         pDr->bAction = UPDATE_RESULT_ACK;
      }
as long as you have a line somewhere like

Code: Select all

watchdog_service_function = MyServiceFunction;
you should not have watchdog reset during autoupdate

Re: NNDK 2.6.9 HTTP Trap

Posted: Thu Mar 05, 2015 6:13 pm
by dciliske
It's not Autoupdate that's failing it; it's the flash operations. They're inside a critical section and the bus is only running at 2MHz for all Nano's running monitor version 1.00 (shipped prior to Jan 2015). The nano doesn't have a watchdog service handler in the flash ops either, nor in the monitor. We've addressed the issue of missing handler in the flash ops, but the monitor is an interesting issue...

-Dan

Re: NNDK 2.6.9 HTTP Trap

Posted: Mon Mar 09, 2015 7:45 am
by pbreed
For the watchdo issue... the ocde that does the flash programming is in the source.
You should be able to add a watch dog "tickle" in that code.