mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
intermediate checkin figuring out ticktimer issue
seems to be a hardware problem with the loading routine
This commit is contained in:
parent
087bb39ea7
commit
b28dff273f
7 changed files with 43 additions and 61 deletions
|
|
@ -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-04-30 23:37:05]]></description>
|
||||
<description><![CDATA[Litex SoC 2021-05-01 18:46:16]]></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
|
||||
``79550678``, so this value is 2035615352, which should be enough to check out
|
||||
``933d6807``, so this value is 2470275079, which should be enough to check out
|
||||
the exact git version used to build this firmware.]]></description>
|
||||
<addressOffset>0x0014</addressOffset>
|
||||
<resetValue>0x79550678</resetValue>
|
||||
<resetValue>0x933d6807</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>0x03</resetValue>
|
||||
<resetValue>0x04</resetValue>
|
||||
<size>32</size>
|
||||
<fields>
|
||||
<field>
|
||||
|
|
@ -2155,26 +2155,18 @@ register to disable individual events.]]></description>
|
|||
<size>32</size>
|
||||
<fields>
|
||||
<field>
|
||||
<name>reset</name>
|
||||
<name>pause</name>
|
||||
<msb>0</msb>
|
||||
<bitRange>[0:0]</bitRange>
|
||||
<lsb>0</lsb>
|
||||
<description><![CDATA[Write a `1` to this bit to reset the count to 0. This bit has priority over all
|
||||
other requests.]]></description>
|
||||
</field>
|
||||
<field>
|
||||
<name>pause</name>
|
||||
<msb>1</msb>
|
||||
<bitRange>[1:1]</bitRange>
|
||||
<lsb>1</lsb>
|
||||
<description><![CDATA[Write a `1` to this field to request a pause to counting, 0 for free-run. Count
|
||||
pauses on the next tick quanta.]]></description>
|
||||
</field>
|
||||
<field>
|
||||
<name>load</name>
|
||||
<msb>2</msb>
|
||||
<bitRange>[2:2]</bitRange>
|
||||
<lsb>2</lsb>
|
||||
<msb>1</msb>
|
||||
<bitRange>[1:1]</bitRange>
|
||||
<lsb>1</lsb>
|
||||
<description><![CDATA[If paused, write a `1` to this bit to load a resume value to the timer. If not
|
||||
paused, this bit is ignored.]]></description>
|
||||
</field>
|
||||
|
|
@ -2183,7 +2175,7 @@ paused, this bit is ignored.]]></description>
|
|||
<register>
|
||||
<name>RESUME_TIME1</name>
|
||||
<description><![CDATA[Bits 32-63 of `SUSRES_RESUME_TIME`. Elapsed time to load. Loaded upon writing
|
||||
`1` to the load bit in the control regsiter. This will immediately affect the
|
||||
`1` to the load bit in the control register. This will immediately affect the
|
||||
msleep extension.]]></description>
|
||||
<addressOffset>0x0004</addressOffset>
|
||||
<resetValue>0x00</resetValue>
|
||||
|
|
@ -3109,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>0x1cbd6891</resetValue>
|
||||
<resetValue>0xd1ce410</resetValue>
|
||||
<size>32</size>
|
||||
<fields>
|
||||
<field>
|
||||
|
|
@ -3124,7 +3116,7 @@ inject too fast.]]></description>
|
|||
<name>SEED0</name>
|
||||
<description><![CDATA[Bits 0-31 of `SEED_SEED`.]]></description>
|
||||
<addressOffset>0x0004</addressOffset>
|
||||
<resetValue>0x3d2e31ed</resetValue>
|
||||
<resetValue>0x23175a86</resetValue>
|
||||
<size>32</size>
|
||||
<fields>
|
||||
<field>
|
||||
|
|
|
|||
|
|
@ -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-04-30 23:37:05]]></description>
|
||||
<description><![CDATA[Litex SoC 2021-05-01 18:46:16]]></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
|
||||
``79550678``, so this value is 2035615352, which should be enough to check out
|
||||
``933d6807``, so this value is 2470275079, which should be enough to check out
|
||||
the exact git version used to build this firmware.]]></description>
|
||||
<addressOffset>0x0014</addressOffset>
|
||||
<resetValue>0x79550678</resetValue>
|
||||
<resetValue>0x933d6807</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>0x03</resetValue>
|
||||
<resetValue>0x04</resetValue>
|
||||
<size>32</size>
|
||||
<fields>
|
||||
<field>
|
||||
|
|
@ -2155,26 +2155,18 @@ register to disable individual events.]]></description>
|
|||
<size>32</size>
|
||||
<fields>
|
||||
<field>
|
||||
<name>reset</name>
|
||||
<name>pause</name>
|
||||
<msb>0</msb>
|
||||
<bitRange>[0:0]</bitRange>
|
||||
<lsb>0</lsb>
|
||||
<description><![CDATA[Write a `1` to this bit to reset the count to 0. This bit has priority over all
|
||||
other requests.]]></description>
|
||||
</field>
|
||||
<field>
|
||||
<name>pause</name>
|
||||
<msb>1</msb>
|
||||
<bitRange>[1:1]</bitRange>
|
||||
<lsb>1</lsb>
|
||||
<description><![CDATA[Write a `1` to this field to request a pause to counting, 0 for free-run. Count
|
||||
pauses on the next tick quanta.]]></description>
|
||||
</field>
|
||||
<field>
|
||||
<name>load</name>
|
||||
<msb>2</msb>
|
||||
<bitRange>[2:2]</bitRange>
|
||||
<lsb>2</lsb>
|
||||
<msb>1</msb>
|
||||
<bitRange>[1:1]</bitRange>
|
||||
<lsb>1</lsb>
|
||||
<description><![CDATA[If paused, write a `1` to this bit to load a resume value to the timer. If not
|
||||
paused, this bit is ignored.]]></description>
|
||||
</field>
|
||||
|
|
@ -2183,7 +2175,7 @@ paused, this bit is ignored.]]></description>
|
|||
<register>
|
||||
<name>RESUME_TIME1</name>
|
||||
<description><![CDATA[Bits 32-63 of `SUSRES_RESUME_TIME`. Elapsed time to load. Loaded upon writing
|
||||
`1` to the load bit in the control regsiter. This will immediately affect the
|
||||
`1` to the load bit in the control register. This will immediately affect the
|
||||
msleep extension.]]></description>
|
||||
<addressOffset>0x0004</addressOffset>
|
||||
<resetValue>0x00</resetValue>
|
||||
|
|
@ -3109,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>0x1cbd6891</resetValue>
|
||||
<resetValue>0xd1ce410</resetValue>
|
||||
<size>32</size>
|
||||
<fields>
|
||||
<field>
|
||||
|
|
@ -3124,7 +3116,7 @@ inject too fast.]]></description>
|
|||
<name>SEED0</name>
|
||||
<description><![CDATA[Bits 0-31 of `SEED_SEED`.]]></description>
|
||||
<addressOffset>0x0004</addressOffset>
|
||||
<resetValue>0x3d2e31ed</resetValue>
|
||||
<resetValue>0x23175a86</resetValue>
|
||||
<size>32</size>
|
||||
<fields>
|
||||
<field>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -78,7 +78,7 @@ fn rkyv_test_client() -> ! {
|
|||
}
|
||||
|
||||
// let the loop run a bit, then try a suspend
|
||||
if idx == 3 {
|
||||
if idx == 1 {
|
||||
// TODO: add a self-wakeup RTC alarm once we're beyond the touch-and-go phase
|
||||
susres.initiate_suspend().unwrap();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ mod implementation {
|
|||
self.csr.ms(utra::susres::CONTROL_PAUSE, 1) |
|
||||
self.csr.ms(utra::susres::CONTROL_LOAD, 1)
|
||||
);
|
||||
println!("Ticktimer loaded");
|
||||
println!("Ticktimer loaded with {}", time);
|
||||
|
||||
// set up pre-emption timer
|
||||
let ms = SYSTEM_TICK_INTERVAL_MS;
|
||||
|
|
@ -343,6 +343,12 @@ mod implementation {
|
|||
self.os_timer.wfo(utra::timer0::EN_EN, 0b1);
|
||||
|
||||
// start the tickttimer running
|
||||
self.csr.wo(utra::susres::CONTROL,
|
||||
self.csr.ms(utra::susres::CONTROL_PAUSE, 1) |
|
||||
self.csr.ms(utra::susres::CONTROL_LOAD, 1)
|
||||
);
|
||||
log::info!("Resume {} / control {}", self.csr.r(utra::susres::RESUME_TIME0), self.csr.r(utra::susres::CONTROL));
|
||||
log::info!("Ticktimer loaded with {} / {}", time, self.csr.r(utra::susres::TIME0));
|
||||
self.csr.wo(utra::susres::CONTROL, 0);
|
||||
println!("Ticktimer and OS timer now running");
|
||||
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ mod implementation {
|
|||
}
|
||||
|
||||
log::trace!("ticktimer enable: {}", self.csr.r(utra::ticktimer::EV_ENABLE));
|
||||
log::trace!("ticktimer target: {}", self.csr.r(utra::ticktimer::MSLEEP_TARGET0));
|
||||
log::info!("ticktimer time/target: {}/{}", self.csr.r(utra::ticktimer::TIME0), self.csr.r(utra::ticktimer::MSLEEP_TARGET0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -493,7 +493,7 @@ fn xmain() -> ! {
|
|||
let mut sleep_heap: BinaryHeap<SleepRequest, U32, Min> = BinaryHeap::new();
|
||||
|
||||
log_server::init_wait().unwrap();
|
||||
log::set_max_level(log::LevelFilter::Trace);
|
||||
log::set_max_level(log::LevelFilter::Info);
|
||||
info!("my PID is {}", xous::process::id());
|
||||
|
||||
let ticktimer_server = xous::create_server_with_address(b"ticktimer-server")
|
||||
|
|
|
|||
|
|
@ -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-04-30 23:37:05]]></description>
|
||||
<description><![CDATA[Litex SoC 2021-05-01 18:46:16]]></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
|
||||
``79550678``, so this value is 2035615352, which should be enough to check out
|
||||
``933d6807``, so this value is 2470275079, which should be enough to check out
|
||||
the exact git version used to build this firmware.]]></description>
|
||||
<addressOffset>0x0014</addressOffset>
|
||||
<resetValue>0x79550678</resetValue>
|
||||
<resetValue>0x933d6807</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>0x03</resetValue>
|
||||
<resetValue>0x04</resetValue>
|
||||
<size>32</size>
|
||||
<fields>
|
||||
<field>
|
||||
|
|
@ -2155,26 +2155,18 @@ register to disable individual events.]]></description>
|
|||
<size>32</size>
|
||||
<fields>
|
||||
<field>
|
||||
<name>reset</name>
|
||||
<name>pause</name>
|
||||
<msb>0</msb>
|
||||
<bitRange>[0:0]</bitRange>
|
||||
<lsb>0</lsb>
|
||||
<description><![CDATA[Write a `1` to this bit to reset the count to 0. This bit has priority over all
|
||||
other requests.]]></description>
|
||||
</field>
|
||||
<field>
|
||||
<name>pause</name>
|
||||
<msb>1</msb>
|
||||
<bitRange>[1:1]</bitRange>
|
||||
<lsb>1</lsb>
|
||||
<description><![CDATA[Write a `1` to this field to request a pause to counting, 0 for free-run. Count
|
||||
pauses on the next tick quanta.]]></description>
|
||||
</field>
|
||||
<field>
|
||||
<name>load</name>
|
||||
<msb>2</msb>
|
||||
<bitRange>[2:2]</bitRange>
|
||||
<lsb>2</lsb>
|
||||
<msb>1</msb>
|
||||
<bitRange>[1:1]</bitRange>
|
||||
<lsb>1</lsb>
|
||||
<description><![CDATA[If paused, write a `1` to this bit to load a resume value to the timer. If not
|
||||
paused, this bit is ignored.]]></description>
|
||||
</field>
|
||||
|
|
@ -2183,7 +2175,7 @@ paused, this bit is ignored.]]></description>
|
|||
<register>
|
||||
<name>RESUME_TIME1</name>
|
||||
<description><![CDATA[Bits 32-63 of `SUSRES_RESUME_TIME`. Elapsed time to load. Loaded upon writing
|
||||
`1` to the load bit in the control regsiter. This will immediately affect the
|
||||
`1` to the load bit in the control register. This will immediately affect the
|
||||
msleep extension.]]></description>
|
||||
<addressOffset>0x0004</addressOffset>
|
||||
<resetValue>0x00</resetValue>
|
||||
|
|
@ -3109,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>0x1cbd6891</resetValue>
|
||||
<resetValue>0xd1ce410</resetValue>
|
||||
<size>32</size>
|
||||
<fields>
|
||||
<field>
|
||||
|
|
@ -3124,7 +3116,7 @@ inject too fast.]]></description>
|
|||
<name>SEED0</name>
|
||||
<description><![CDATA[Bits 0-31 of `SEED_SEED`.]]></description>
|
||||
<addressOffset>0x0004</addressOffset>
|
||||
<resetValue>0x3d2e31ed</resetValue>
|
||||
<resetValue>0x23175a86</resetValue>
|
||||
<size>32</size>
|
||||
<fields>
|
||||
<field>
|
||||
|
|
|
|||
Loading…
Reference in a new issue