mirror of
https://github.com/marqs85/ossc
synced 2026-11-01 20:57:10 +03:00
implement ndmreset via RV DM
This commit is contained in:
1 parent
3abd3d7ec0
commit
c572fb651a
7 files changed
+559
-76
No files matched your search
@@ -0,0 +1,29 @@
|
||||
#Select the master service type and check for available service paths.
|
||||
while 1 {
|
||||
set service_paths [get_service_paths master]
|
||||
if {[llength $service_paths] > 0} {
|
||||
break
|
||||
}
|
||||
puts "Refreshing connections..."
|
||||
refresh_connections
|
||||
after 100
|
||||
}
|
||||
|
||||
#Set the master service path.
|
||||
set master_service_path [lindex $service_paths 0]
|
||||
|
||||
#Open the master service.
|
||||
set claim_path [claim_service master $master_service_path mylib]
|
||||
|
||||
puts "Halting CPU"
|
||||
master_write_32 $claim_path 0x40 0x00000001
|
||||
master_write_32 $claim_path 0x40 0x80000001
|
||||
|
||||
puts "Resetting system"
|
||||
master_write_32 $claim_path 0x40 0x00000003
|
||||
after 1
|
||||
master_write_32 $claim_path 0x40 0x00000001
|
||||
master_write_32 $claim_path 0x40 0x00000000
|
||||
|
||||
close_service master $claim_path
|
||||
puts "Done"
|
||||
@@ -15,9 +15,8 @@ set master_service_path [lindex $service_paths 0]
|
||||
#Open the master service.
|
||||
set claim_path [claim_service master $master_service_path mylib]
|
||||
|
||||
puts "Halting CPU"
|
||||
master_write_32 $claim_path 0x40 0x00000001
|
||||
master_write_32 $claim_path 0x40 0x80000001
|
||||
puts "Halting CPU via sleep"
|
||||
master_write_32 $claim_path 0x200 0x00000002
|
||||
|
||||
close_service master $claim_path
|
||||
|
||||
|
||||
Reference in new issue
Block a user