Es wuerde mich interessieren ob jemand schon das gleiche Problem hatte wie ich hier und Erfahrungen hat. Ich bin dabei einen Bootloader fuer den dsPIC33J256MC710 zu entwickeln. Es funktioniert auch alles, ausser dass das NVMCON WRITE Bit nicht die zig 25 ms aktiv bleibt, die das Datenblatt eigentlich vorschreibt. Sobald das Schreib Kommando Bit an NVMCON gesetzt wird und das NVMCON register bit 15 in einer poll loop abgefragt wird, wird es sofort als "Fertig" zurueck gegeben. Geradeso, als ob der CPU auf die Vollendung des Schreibvorgangs warten wuerde. Vielleicht sollte ich einen Oszi anschliessen um die Zeitdauer des Vorgangs zu ueberpruefen. Als Anhaltspunkt fuer die Entwicklung diente das Dokument: dsPIC33F/PIC24H Flash Programming Specification (DS70152F) Im Anhang die Source. Wie gesagt, der '64 Instructions Row Write' Vorgang funktioniert einwandfrei. In den ERRATA Dokumenten ist darueber auch nichts zu finden. Auch die Knowledge base von Microchip hat nichts. Vielen Dank. mfg, Gerhard
Hier die Antwort von Microchip: Once you set the WR bit, the CPU stalls, no code is executed until the WR bit is cleared by the hardware. While the internal self write cycle is in progress it is using the FLASH array internal address/data bus, the CPU therefore cannot access the FLASH without contention so it's forced into a stall executing an internal NOP while the FLASH instruction bus is unavailable. There is no need to poll the WR bit except out of good programming practice. mfg, gerhard
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.