PIC32 Reset & RCON register

Başlatan vale9, 02 Mart 2017, 17:12:39

vale9

Merhaba arkadaşlar,

PIC32MX370F512L kullanıyorum. Cihaz çoğunlukla sleepte bekliyor, external interrupt ile uyanıyor.

Bazen tam external interrupt oluştuğunda PIC RESET oluyor. RCON registerini yedekleyip restart anında ekrana yazdırıyorum, sonra da bitleri sıfırlıyorum:

* Enerjiyi kendim kesip verdiğimde bir kaç çeşit sonuç geliyor, hepsinde normal çalışıyor:

E0 00 00 01
E0 00 00 03
E0 00 00 83
C0 00 00 01
C0 00 00 81
C0 00 00 83
60 00 00 03

* Fakat her reset olduğunda:

00 00 00 0E geliyor (wake up from sleep, wake up from idle ve bor bitleri 1 geliyor)

Sorun BOR desem normal açılışlarda da set gelebiliyor. Ama bana garip gelen Wake From Sleep ve Wake Up From Idle'ın aynı anda 1 gelmesi.

Yardımlarınızı rica ediyorum...


Datasheetteki RCON şöyle:

bit 31-30 Unimplemented: Read as '0'
bit 29 HVDR: High Voltage Detect Reset Flag bit
1 = High Voltage Detect (HVD) Reset has occurred
0 = HVD Reset has not occurred
bit 28-10 Unimplemented: Read as '0'
bit 9 CMR: Configuration Mismatch Reset Flag bit
1 = Configuration mismatch Reset has occurred
0 = Configuration mismatch Reset has not occurred
bit 8 VREGS: Voltage Regulator Standby Enable bit
1 = Regulator is enabled and is on during Sleep mode
0 = Regulator is disabled and is off during Sleep mode
bit 7 EXTR: External Reset (MCLR) Pin Flag bit
1 = Master Clear (pin) Reset has occurred
0 = Master Clear (pin) Reset has not occurred
bit 6 SWR: Software Reset Flag bit
1 = Software Reset was executed
0 = Software Reset as not executed
bit 5 Unimplemented: Read as '0'
bit 4 WDTO: Watchdog Timer Time-out Flag bit
1 = WDT Time-out has occurred
0 = WDT Time-out has not occurred
bit 3 SLEEP: Wake From Sleep Flag bit
1 = Device was in Sleep mode
0 = Device was not in Sleep mode
bit 2 IDLE: Wake From Idle Flag bit
1 = Device was in Idle mode
0 = Device was not in Idle mode
bit 1 BOR: Brown-out Reset Flag bit(1)
1 = Brown-out Reset has occurred
0 = Brown-out Reset has not occurred
bit 0 POR: Power-on Reset Flag bit(1)
1 = Power-on Reset has occurred
0 = Power-on Reset has not occurred
Hayat 1'ler ve 0'lardan ibarettir.

vale9

Yok mu yorum yapacak RCON ve Reset konusunda?
Hayat 1'ler ve 0'lardan ibarettir.