Hallo
Am Ende jedes Blockes wird die Checksumme zum RP6 gesendet:
Write 256b @0 ; CRC16: 0xDDAA
>>170| >>221| >>170| <<B:66|
^ 0xAA ^ 0xDD
Write 256b @256 ; CRC16: 0x195D
>>93| >>25| >>170| <<B:66|
^ 0x5D ^ 0x19
Write 256b @512 ; CRC16: 0xE915
>>21| >>233| >>170| <<B:66| ^ 0xAA ^ 0xDD
^ 0x15 ^ 0xE9
Hintergrund der Hundegeschichte: Ein durch fehlerhaften Flashinhalt abgestürzter AVR könnte den Watchdog einschalten indem er irgendwie das entsprechende Bit im Kontrollregister setzt. Das würde möglicherweise die Ausführung des Bootladers stören oder gar verhindern. Blöderweise steht das aber nur im Datenblatt des Tiny13 (Seite 37/38):
https://www.roboternetz.de/phpBB2/ze...=336549#336549
Abhilfe würde das möglichst frühe Ausschalten des WDT bringen, darauf weist Atmel sogar in einem anderen Zusammenhang hin:
(Aus Mega32-Datenblatt Seite 35)Watchdog Timer
If the Watchdog Timer is not needed in the application, this module should be turned off.
If the Watchdog Timer is enabled, it will be enabled in all sleep modes, and hence,
always consume power. In the deeper sleep modes, this will contribute significantly to
the total current consumption. Refer to “Watchdog Timer” on page 41 for details on how
to configure the Watchdog Timer.
Allerdings bringt das reichlich wenig, wenn es vorne im Anwenderprogramm eingebaut wird und der Block mit dem entsprechenden Startcode nicht richtig gespeichert wurde. Das Ausschalten sollte eigentlich schon im Bootlader geschehen.
Gruß
mic
Lesezeichen