add a note to indicate if we're in cold sleep

it's not terribly aesthetic right now, but we can fix that later.
This commit is contained in:
bunnie 2021-05-02 03:36:54 +08:00
parent b17753ce8b
commit 0ca2f58c6e
14 changed files with 282 additions and 34 deletions

View file

@ -3,7 +3,7 @@
<device schemaVersion="1.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="CMSIS-SVD.xsd" >
<vendor>litex</vendor>
<name>SOC</name>
<description><![CDATA[Litex SoC 2021-05-01 18:46:16]]></description>
<description><![CDATA[Litex SoC 2021-05-02 02:18:31]]></description>
<addressUnitBits>8</addressUnitBits>
<width>32</width>
@ -1070,10 +1070,10 @@ register to disable individual events.]]></description>
<register>
<name>GIT_GITREV</name>
<description><![CDATA[First 32-bits of the git revision. This documentation was built from git rev
``933d6807``, so this value is 2470275079, which should be enough to check out
``64fe00d9``, so this value is 1694367961, which should be enough to check out
the exact git version used to build this firmware.]]></description>
<addressOffset>0x0014</addressOffset>
<resetValue>0x933d6807</resetValue>
<resetValue>0x64fe00d9</resetValue>
<size>32</size>
<fields>
<field>
@ -1090,7 +1090,7 @@ the exact git version used to build this firmware.]]></description>
is ``1``, then the repository this was built from has one additional commit
beyond the tag indicated in `MAJOR`, `MINOR`, and `REVISION`.]]></description>
<addressOffset>0x0018</addressOffset>
<resetValue>0x04</resetValue>
<resetValue>0x05</resetValue>
<size>32</size>
<fields>
<field>
@ -3101,7 +3101,7 @@ inject too fast.]]></description>
<name>SEED1</name>
<description><![CDATA[Bits 32-63 of `SEED_SEED`. Seed used for the build]]></description>
<addressOffset>0x0000</addressOffset>
<resetValue>0xd1ce410</resetValue>
<resetValue>0x6ec50873</resetValue>
<size>32</size>
<fields>
<field>
@ -3116,7 +3116,7 @@ inject too fast.]]></description>
<name>SEED0</name>
<description><![CDATA[Bits 0-31 of `SEED_SEED`.]]></description>
<addressOffset>0x0004</addressOffset>
<resetValue>0x23175a86</resetValue>
<resetValue>0x7ff788bf</resetValue>
<size>32</size>
<fields>
<field>

View file

@ -3,7 +3,7 @@
<device schemaVersion="1.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="CMSIS-SVD.xsd" >
<vendor>litex</vendor>
<name>SOC</name>
<description><![CDATA[Litex SoC 2021-05-01 18:46:16]]></description>
<description><![CDATA[Litex SoC 2021-05-02 02:18:31]]></description>
<addressUnitBits>8</addressUnitBits>
<width>32</width>
@ -1070,10 +1070,10 @@ register to disable individual events.]]></description>
<register>
<name>GIT_GITREV</name>
<description><![CDATA[First 32-bits of the git revision. This documentation was built from git rev
``933d6807``, so this value is 2470275079, which should be enough to check out
``64fe00d9``, so this value is 1694367961, which should be enough to check out
the exact git version used to build this firmware.]]></description>
<addressOffset>0x0014</addressOffset>
<resetValue>0x933d6807</resetValue>
<resetValue>0x64fe00d9</resetValue>
<size>32</size>
<fields>
<field>
@ -1090,7 +1090,7 @@ the exact git version used to build this firmware.]]></description>
is ``1``, then the repository this was built from has one additional commit
beyond the tag indicated in `MAJOR`, `MINOR`, and `REVISION`.]]></description>
<addressOffset>0x0018</addressOffset>
<resetValue>0x04</resetValue>
<resetValue>0x05</resetValue>
<size>32</size>
<fields>
<field>
@ -3101,7 +3101,7 @@ inject too fast.]]></description>
<name>SEED1</name>
<description><![CDATA[Bits 32-63 of `SEED_SEED`. Seed used for the build]]></description>
<addressOffset>0x0000</addressOffset>
<resetValue>0xd1ce410</resetValue>
<resetValue>0x6ec50873</resetValue>
<size>32</size>
<fields>
<field>
@ -3116,7 +3116,7 @@ inject too fast.]]></description>
<name>SEED0</name>
<description><![CDATA[Bits 0-31 of `SEED_SEED`.]]></description>
<addressOffset>0x0004</addressOffset>
<resetValue>0x23175a86</resetValue>
<resetValue>0x7ff788bf</resetValue>
<size>32</size>
<fields>
<field>

Binary file not shown.

View file

@ -81,6 +81,9 @@ pub(crate) enum Opcode {
/// draws the sleep screen; assumes requests are vetted by GAM/xous-names
DrawSleepScreen,
/// sets whether a sleep note should be rendered or not on suspend
SetSleepNote,
/// SuspendResume callback
SuspendResume,
}

View file

@ -73,17 +73,56 @@ impl XousDisplay {
display
}
pub fn suspend(&mut self) {
pub fn suspend(&mut self, draw_note: bool) {
while self.busy() {
// just wait until any pending FB operations are done
}
self.srfb.suspend();
self.susres.suspend();
if draw_note {
let note = crate::sleep_note::LOGO_MAP;
let note_lines = note.len() / FB_WIDTH_WORDS;
let start_line = (FB_LINES - note_lines) / 2;
let hwfb: *mut [u32; FB_SIZE] = self.hwfb.as_mut_ptr() as *mut [u32; FB_SIZE];
for words in 0..note.len() {
unsafe {
(*hwfb)[words + start_line * FB_WIDTH_WORDS] = note[words];
}
}
for lines in start_line..start_line + note_lines {
// set the dirty bits
unsafe {
(*hwfb)[lines * FB_WIDTH_WORDS + (FB_WIDTH_WORDS - 1)] |= 0x1_0000;
}
}
self.update_dirty();
while self.busy() {
// busy wait, blocking suspend until this has happened
}
}
}
pub fn resume(&mut self) {
pub fn resume(&mut self, drew_note: bool) {
self.susres.resume();
self.srfb.resume();
if drew_note {
let note = crate::sleep_note::LOGO_MAP;
let note_lines = note.len() / FB_WIDTH_WORDS;
let start_line = (FB_LINES - note_lines) / 2;
let hwfb: *mut [u32; FB_SIZE] = self.hwfb.as_mut_ptr() as *mut [u32; FB_SIZE];
for lines in start_line..start_line + note_lines {
// set the dirty bits to force a redraw of the restored data
unsafe {
(*hwfb)[lines * FB_WIDTH_WORDS + (FB_WIDTH_WORDS - 1)] |= 0x1_0000;
}
}
self.update_dirty();
while self.busy() {
// busy wait, blocking resume until this has happened
}
}
}
pub fn screen_size(&self) -> Point { Point::new(FB_WIDTH_PIXELS as i16, FB_LINES as i16) }

View file

@ -65,8 +65,8 @@ impl XousDisplay {
emulated_buffer: [0u32; FB_SIZE],
}
}
pub fn suspend(&self) {}
pub fn resume(&self) {}
pub fn suspend(&self, flag: bool) {}
pub fn resume(&self, flag: bool) {}
pub fn screen_size(&self) -> Point {
Point::new(WIDTH as i16, HEIGHT as i16)

View file

@ -25,11 +25,14 @@ def convert(ifile, ofile):
offset = image[0xa] # skip header
length = len(image)
rows = (length - 64) // 44
if ((length - 64) % 44) != 0:
print("warning: file length is not an integer multiple of rows. output will be malformed. length: {}, rows: {}".format(length, rows))
with open(ofile, "w") as output:
output.write("pub const LOGO_MAP: [u32; 11 * 536] = [\n")
output.write("pub const LOGO_MAP: [u32; 11 * {}] = [\n".format(rows))
line = 536
line = rows
while line > 0:
horiz = 0
while horiz < 11:

View file

@ -133,6 +133,13 @@ impl Gfx {
let buf = Buffer::into_buf(co).or(Err(xous::Error::InternalError))?;
buf.lend(self.conn, Opcode::DrawClipObject.to_u32().unwrap()).map(|_| ())
}
pub fn draw_sleep_note(&self, flag: bool) -> Result<(), xous::Error> {
let arg = if flag {1} else {0};
send_message(self.conn,
Message::new_scalar(Opcode::SetSleepNote.to_usize().unwrap(), arg, 0, 0, 0,
)).map(|_|())
}
}
impl Drop for Gfx {

View file

@ -10,6 +10,7 @@ mod op;
mod logo;
mod poweron;
mod sleep_note;
use api::{DrawStyle, PixelColor, Rectangle, TextBounds, RoundedRectangle, Point, TextView, Line, Circle};
use api::{Opcode, ClipObject, ClipObjectType};
@ -72,6 +73,7 @@ fn xmain() -> ! {
map_fonts();
let mut use_sleep_note = true;
if false {
// leave this test case around
// for some reason, the top right quadrant draws an extra pixel inside the fill area
@ -101,9 +103,16 @@ fn xmain() -> ! {
log::trace!("Message: {:?}", msg);
match FromPrimitive::from_usize(msg.body.id()) {
Some(Opcode::SuspendResume) => xous::msg_scalar_unpack!(msg, token, _, _, _, {
display.suspend();
display.suspend(use_sleep_note);
susres.suspend_until_resume(token).expect("couldn't execute suspend/resume");
display.resume();
display.resume(use_sleep_note);
}),
Some(Opcode::SetSleepNote) => xous::msg_scalar_unpack!(msg, set_use, _, _, _, {
if set_use == 0 {
use_sleep_note = false;
} else {
use_sleep_note = true;
}
}),
Some(Opcode::DrawClipObject) => {
let buffer = unsafe { Buffer::from_memory_message(msg.body.memory_message().unwrap()) };

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View file

@ -0,0 +1,162 @@
pub const LOGO_MAP: [u32; 11 * 160] = [
0xffffffff, 0xffffffff, 0x003fffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xff87ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xf87fffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xfff1ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xe3ffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xfffcffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xcfffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xfffe7fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x9fffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffff7fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xbfffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffff3fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x3fffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffbfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x7fffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffbfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x7fffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffff9fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x7fffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x03ffffff, 0xffffff3f, 0xff3fffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x00ffffff, 0xffffff3c, 0xff3fffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x7c7fffff, 0xffffff3c, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfe7fffff, 0xffffff3c, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfe7fffff, 0xffffff3f, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfe7fffff, 0x1ff07f3f, 0xcf3f0cfc, 0xffe60ff0, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfcffffff, 0x07e01f3f, 0x4f3e04f8, 0xffe407e0, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xf0ffffff, 0xe3c78f3f, 0x0f3c70f1, 0xffe1e3c7, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xc3ffffff, 0xf3cfcf3f, 0x8f38f8f3, 0xffe3f3cf, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x0fffffff, 0xf99fe73e, 0xcf39fce7, 0xffe7f9cf, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x7fffffff, 0x0180073c, 0xcf39fce0, 0xffe7f9cf, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0x01800738, 0xcf39fce0, 0xffe7f9cf, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xf9ffe739, 0xcf39fcff, 0xffe7f9cf, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfe3fffff, 0xf9ffe739, 0xcf39fcff, 0xffe7f9cf, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfe7fffff, 0xf38fcf39, 0xcf38f8e3, 0xffe3f3cf, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x7c7fffff, 0xe3cf8f3c, 0xcf3c70f3, 0xf1e1e3cf, 0xfffffc78, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x00ffffff, 0x07c01f3c, 0xcf3e04f0, 0xf1e407cf, 0xfffffc78, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x01ffffff, 0x1ff07f3f, 0xcf3f0cfc, 0xf1e60fcf, 0xfffffc78, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xfffffcff, 0xffe7ffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xfffffcff, 0xffe3f1ff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xfffffcff, 0xfff1f1ff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xfffffcff, 0xfff803ff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xfffffcff, 0xfffc0fff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xff807fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xff007fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xfe7e7fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0x267e7fff, 0xf0f87e1f, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0x067e7fff, 0xc0603c07, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xc67e7fff, 0xef379ce7, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xe7007fff, 0xff3f99f3, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xe7807fff, 0xfc3e19f3, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xe7fe7fff, 0xe0703803, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xe7fe7fff, 0xc3e1fff3, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xe7fe7fff, 0xcfe7fff3, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xe7fe7fff, 0xcf2799e7, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xe7fe7fff, 0xe0301c07, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xe7fe7fff, 0xf0783e0f, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x0000000f, 0xf8000000, 0x007fffff, 0x00000000, 0xffffe000, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffe07, 0xf07fffff, 0xfc3fffff, 0xffffffff, 0xffffc0ff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffe3, 0xf3ffffff, 0xff3fffff, 0xffffffff, 0xffff8fff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffff1, 0xe3ffffff, 0xff1fffff, 0xffffffff, 0xffff1fff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffff9, 0xe7ffffff, 0xff9fffff, 0xffffffff, 0xfffe3fff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffc, 0xe7ffffff, 0xff9fffff, 0xffffffff, 0xfffe7fff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffc, 0xe7ffffff, 0xff9fffff, 0xffffffff, 0xfffe7fff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfff3e0fc, 0xe7ffffff, 0xff9fffff, 0xc3ffffff, 0xfffeff7f, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfff3f9fc, 0xe7ffffff, 0xff9fffff, 0xcbffffff, 0xfffeff7e, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffc219fe, 0xe7ffffff, 0xff9fffff, 0x79ffffff, 0xfffeff44, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffd279fe, 0xe7ffffff, 0xff9fffff, 0x79ffffff, 0xfffeff66, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xff9219fe, 0xe7ffffff, 0xff9fffff, 0xf9ffffff, 0xfffeff76, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xff9259fe, 0xe7ffffff, 0xff9fffff, 0xd9ffffff, 0xfffefe76, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffc219fe, 0xe7ffffff, 0xff9fffff, 0xc3ffffff, 0xfffefe74, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffe, 0xe7ffffff, 0xff9fffff, 0xffffffff, 0xfffeffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffe, 0xe7ffffff, 0xff9fffff, 0xffffffff, 0xfffeffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffe, 0xe7ffffff, 0xff9fffff, 0xffffffff, 0xfffeffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffe, 0xe7ffffff, 0xff9fffff, 0xffffffff, 0xfffeffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffe, 0xe7ffffff, 0xff9ffcff, 0xffffffff, 0xfffeffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffe, 0xe7ffffff, 0xff9ffcff, 0xffffffff, 0xfffeffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffe, 0xe7ffffff, 0xff9ffcff, 0xffffffff, 0xfffeffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffe, 0xe7ffffff, 0xff9ffcff, 0xffffffff, 0xfffeffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffe, 0xe7ffffff, 0xff9fc00f, 0xffffffff, 0xfffeffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffe, 0xe7ffffff, 0xff9fc00f, 0xffffffff, 0xfffeffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffe, 0xe7ffffff, 0xff9ffcff, 0xffffffff, 0xfffeffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffe7fe, 0xe7ffffff, 0xff9ffcff, 0xffffffff, 0xfffeffcf, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffe7fe, 0xe7ffffff, 0xff9ffcff, 0xffffffff, 0xfffeffcf, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffe7fe, 0xe7fcc1ff, 0x3f9ffcff, 0xffffff38, 0xfffeffcf, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffff24fe, 0xe7fc41ff, 0x3f9fffff, 0xffffff18, 0xfffefe49, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffe667e, 0xe7fcf9ff, 0x3f9fffff, 0xffffff9f, 0xfffefccc, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffe667e, 0xe7fce1ff, 0x3f9fffff, 0xffffffcc, 0xfffefccc, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffe667e, 0xe7fce1ff, 0x3f9fffff, 0xffffff4c, 0xfffefccc, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffe7e7e, 0xe7fcf9ff, 0x3f9fffff, 0xfffffe0f, 0xfffefcfc, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffe7e7e, 0xe7fcf9ff, 0x3f9fffff, 0xfffffe0f, 0xfffefcfc, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffff3cfe, 0xe7fcf9ff, 0x3f9fffff, 0xffffff3f, 0xfffefe79, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffff81fe, 0xe3ffffff, 0xff1fffff, 0xffffffff, 0xfffeff03, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffe7fe, 0xf3ffffff, 0xff3fffff, 0xffffffff, 0xfffeffcf, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffe, 0xf3ffffff, 0xff3fffff, 0xffffffff, 0xfffeffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffe, 0xf3ffffff, 0xff3fffff, 0xffffffff, 0xfffeffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffc, 0xf9ffffff, 0xfe3fffff, 0xffffffff, 0xfffe7fff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffc, 0xf8ffffff, 0xfc7fffff, 0xffffffff, 0xfffe7fff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfffffffc, 0xfc7fffff, 0xf8ffffff, 0xffffffff, 0xfffe7fff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x00000000, 0xfe000000, 0x01ffffff, 0x00000000, 0xfffe0000, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x00000001, 0xff000000, 0x03ffffff, 0x00000000, 0xffff0000, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xfffffcff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfcffffff, 0xffffffff, 0xfffffcff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfcffffff, 0xffffffff, 0xfffffcff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xfcffffff, 0xffffffff, 0xfffffcff, 0xffffffff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xf03fffff, 0x79e3cfe0, 0xfe1e3cf8, 0xffe139e7, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x703fffff, 0x39e38fc0, 0xfc079cf0, 0xffc039e7, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x7cffffff, 0x9ce39fce, 0xfce7cce7, 0xffcf39e7, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x3cffffff, 0xfceb9f9f, 0xf9f3c4e7, 0xff9f39e7, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x3cffffff, 0xfcc99f9f, 0xf9f3e0e7, 0xff9f39e7, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x3cffffff, 0x7cc99f9f, 0xf803c0e0, 0xff9f39e7, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x3cffffff, 0x3e493f9f, 0xfff3c8e0, 0xff9f39e7, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x3cffffff, 0x9e1d3f9f, 0xfff38ce7, 0xff9f39e7, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x7cffffff, 0x9e1c3fce, 0xf9e79ce7, 0xffcf39e7, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0x70ffffff, 0x1e1c7fc0, 0xfc073cc0, 0xffc0380f, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xf1ffffff, 0x3f3e7fe0, 0xfe0e3ccc, 0xffe1390f, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffff3fff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffff3fff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffdfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffff3fff, 0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffff9fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffff3fff, 0x7fffffff, 0xfffffffe, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffbfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x7fffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffbfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x7fffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffff3fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x3fffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffff7fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xbfffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xfffe7fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x9fffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xfffcffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xcfffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xfff1ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xe3ffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xff87ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xf87fffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0x003fffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff,
];

View file

@ -40,6 +40,27 @@ fn kill_thread(bounce: usize) {
}
}
fn susres_loop() {
log::info!("suspend/resume stress test active");
let xns = xous_names::XousNames::new().unwrap();
let mut susres = susres::Susres::new_without_hook(&xns).unwrap();
let rtc = rtc::Rtc::new(&xns).unwrap();
let ticktimer = ticktimer_server::Ticktimer::new().unwrap();
ticktimer.sleep_ms(1500).unwrap();
let mut iters = 0;
loop {
log::info!("suspend/resume cycle: {}", iters);
rtc.set_wakeup_alarm(4).unwrap();
susres.initiate_suspend().unwrap();
ticktimer.sleep_ms(8000).unwrap();
iters += 1;
}
}
impl<'a> ShellCmdApi<'a> for Sleep {
cmd_api!(sleep); // inserts boilerplate for command API
@ -47,7 +68,7 @@ impl<'a> ShellCmdApi<'a> for Sleep {
use core::fmt::Write;
let mut ret = String::<1024>::new();
let helpstring = "sleep [now] [current] [ship] [kill] [coldboot] [killbounce] [sus]";
let helpstring = "sleep [now] [current] [ship] [kill] [coldboot] [killbounce] [sus] [stress]";
let mut tokens = args.as_str().unwrap().split(' ');
@ -65,6 +86,10 @@ impl<'a> ShellCmdApi<'a> for Sleep {
// the message below is sent after we wake up
write!(ret, "Resumed from sleep!").unwrap();
}
"stress" => {
xous::create_thread_0(susres_loop).unwrap();
write!(ret, "Starting suspend/resume stress test. Hard reboot required to exit.").unwrap();
}
"now" => {
if ((env.llio.adc_vbus().unwrap() as f64) * 0.005033) > 1.5 {
// if power is plugged in, deny powerdown request

View file

@ -261,7 +261,7 @@ mod implementation {
pub fn check_wdt(&mut self) {
let state = self.wdt.r(utra::wdt::STATE);
if state & self.wdt.ms(utra::wdt::STATE_DISARMED, 1) == 0 {
log::trace!("{} WDT is not disarmed, state: 0x{:x}", self.elapsed_ms(), state);
log::info!("{} WDT is not disarmed, state: 0x{:x}", self.elapsed_ms(), state);
}
}
@ -279,7 +279,11 @@ mod implementation {
// this is a write-once bit that's later erased, so it can't be managed automatically
// thus we have to restore in manually on a resume
#[cfg(feature = "watchdog")]
self.wdt.wfo(utra::wdt::WATCHDOG_ENABLE, 1);
{
self.wdt.wfo(utra::wdt::EV_PENDING_SOFT_INT, 1);
self.wdt.wfo(utra::wdt::EV_ENABLE_SOFT_INT, 1);
self.wdt.wfo(utra::wdt::WATCHDOG_ENABLE, 1);
}
// manually clear any pending ticktimer events. This is mainly releveant for a "touch-and-go" simulated suspend.
self.csr.wfo(utra::ticktimer::EV_PENDING_ALARM, 1);
@ -288,11 +292,7 @@ mod implementation {
self.ticktimer_sr_manager.resume();
#[cfg(feature = "watchdog")]
{ // do a watchdog reset right away
self.wdt.wfo(utra::wdt::EV_PENDING_SOFT_INT, 1);
self.wdt.wfo(utra::wdt::EV_ENABLE_SOFT_INT, 1);
self.wdt.wfo(utra::wdt::INTERRUPT_INTERRUPT, 1);
}
self.wdt.wfo(utra::wdt::INTERRUPT_INTERRUPT, 1);
log::trace!("ticktimer enable: {}", self.csr.r(utra::ticktimer::EV_ENABLE));
log::trace!("ticktimer time/target: {}/{}", self.csr.r(utra::ticktimer::TIME0), self.csr.r(utra::ticktimer::MSLEEP_TARGET0));

View file

@ -3,7 +3,7 @@
<device schemaVersion="1.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="CMSIS-SVD.xsd" >
<vendor>litex</vendor>
<name>SOC</name>
<description><![CDATA[Litex SoC 2021-05-01 18:46:16]]></description>
<description><![CDATA[Litex SoC 2021-05-02 02:18:31]]></description>
<addressUnitBits>8</addressUnitBits>
<width>32</width>
@ -1070,10 +1070,10 @@ register to disable individual events.]]></description>
<register>
<name>GIT_GITREV</name>
<description><![CDATA[First 32-bits of the git revision. This documentation was built from git rev
``933d6807``, so this value is 2470275079, which should be enough to check out
``64fe00d9``, so this value is 1694367961, which should be enough to check out
the exact git version used to build this firmware.]]></description>
<addressOffset>0x0014</addressOffset>
<resetValue>0x933d6807</resetValue>
<resetValue>0x64fe00d9</resetValue>
<size>32</size>
<fields>
<field>
@ -1090,7 +1090,7 @@ the exact git version used to build this firmware.]]></description>
is ``1``, then the repository this was built from has one additional commit
beyond the tag indicated in `MAJOR`, `MINOR`, and `REVISION`.]]></description>
<addressOffset>0x0018</addressOffset>
<resetValue>0x04</resetValue>
<resetValue>0x05</resetValue>
<size>32</size>
<fields>
<field>
@ -3101,7 +3101,7 @@ inject too fast.]]></description>
<name>SEED1</name>
<description><![CDATA[Bits 32-63 of `SEED_SEED`. Seed used for the build]]></description>
<addressOffset>0x0000</addressOffset>
<resetValue>0xd1ce410</resetValue>
<resetValue>0x6ec50873</resetValue>
<size>32</size>
<fields>
<field>
@ -3116,7 +3116,7 @@ inject too fast.]]></description>
<name>SEED0</name>
<description><![CDATA[Bits 0-31 of `SEED_SEED`.]]></description>
<addressOffset>0x0004</addressOffset>
<resetValue>0x23175a86</resetValue>
<resetValue>0x7ff788bf</resetValue>
<size>32</size>
<fields>
<field>