Discussion to talk about software related topics only.
roland.ames
Post
by roland.ames » Thu Mar 05, 2015 5:57 pm
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
dciliske
Posts: 624 Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:
Post
by dciliske » Thu Mar 05, 2015 6:13 pm
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
pbreed
Posts: 1088 Joined: Thu Apr 24, 2008 3:58 pm
Post
by pbreed » Mon Mar 09, 2015 7:45 am
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.