NNDK 2.6.9 HTTP Trap

Discussion to talk about software related topics only.
roland.ames

Re: NNDK 2.6.9 HTTP Trap

Post 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
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: NNDK 2.6.9 HTTP Trap

Post 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
Dan Ciliske
Project Engineer
Netburner, Inc
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: NNDK 2.6.9 HTTP Trap

Post 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.
Post Reply