Commit graph

63 commits

Author SHA1 Message Date
bunnie
0ca2f58c6e add a note to indicate if we're in cold sleep
it's not terribly aesthetic right now, but we can fix that later.
2021-05-02 03:36:54 +08:00
bunnie
c7f1fe0817 cleanup after debugging ticktimer
the problem was that the load signal was not being respected
by the hardware, small patch to FPGA required but now all is OK.
2021-05-01 20:56:12 +08:00
bunnie
b28dff273f intermediate checkin figuring out ticktimer issue
seems to be a hardware problem with the loading routine
2021-05-01 19:13:22 +08:00
bunnie
087bb39ea7 chase down some bugs
noted there is a heisenbug on the ticktimer, it only manifests
when the log level is at info. go figure!
2021-05-01 02:26:28 +08:00
bunnie
46fe3885dc cleanup more turds left over during the bringup of suspend/resume 2021-05-01 00:35:32 +08:00
bunnie
640ddb48e8 suspend/resume now works to hardware 2021-04-30 19:29:36 +08:00
bunnie
a55735fb1f add llio to suspend/resume set 2021-04-29 23:15:47 +08:00
bunnie
6e1e74ed84 a minimal but successful touch-and-go suspend/resume cycle 2021-04-29 16:37:43 +08:00
bunnie
bbcf698ff3 flesh out a simple touch-and-go suspend/resume demo loop
now the debuggening begins. lord help us.
2021-04-29 02:56:53 +08:00
bunnie
3043769170 move the os_timer into the susres server, so we can suspend it
also clean up various syntax errors
2021-04-28 15:38:56 +08:00
bunnie
d62f936454 start fleshing out the susres server 2021-04-27 02:53:22 +08:00
bunnie
655c92a36c clean up ticktimer susres prototype code 2021-04-27 00:40:50 +08:00
bunnie
061284ec5f debugging BOOST mode glitch issue
Here's an arcane bug for you:

When powering down, the Spartan 7 3.3V I/O drivers will
output a roughly 800us wide glitch as 3.3V falls below around
1.7V, if the 0.95V core voltage comes down first (which it does
because we have an active discharge on 0.95V, but not on 3.3V).

In this case, it's just wide and high enough to cause the
BOOST mode line to engage, which takes the BOOST output
and ties it to VBUS, which is just enough for the system to
think you're powering it back on again. Which is not what
you want when powering down.

The ultimate fix was to put a heftier pull-down on the BOOST
line so that it can't trip the BOOST output into the VBUS.
Another option could be more active discharge FETs, but that
would require a full board spin and we are already at certification,
so we'll stick with the stronger pull-down on BOOST. It seems to
be a robust fix in the worst corner cases we can find.

The downside is that when powering an external USB device,
you are burning an extra 30mW of power overcoming the pull-down,
but typically, any external USB devices plugged into Precursor
will burn far in excess of that, so the delta should be negligible.
2021-04-23 15:33:14 +08:00
bunnie
1378203427 clean up warning 2021-04-16 01:13:56 +08:00
bunnie
024a072a7c absorb WDT fix to eliminate a race condition 2021-04-15 18:40:00 +08:00
bunnie
93400df67c an initial cut at fcc test commands 2021-04-15 04:10:47 +08:00
bunnie
45c90659e5 rtc first draft 2021-04-08 02:30:57 +08:00
bunnie
ca349ec1b0 clean up minor bugs and other issues 2021-04-06 22:38:11 +08:00
bunnie
8c12dbe2af found a bug. 2021-04-06 01:52:26 +08:00
bunnie
9ba2fb134c refactor most major modules, but Xous now crashes 2021-04-05 23:50:00 +08:00
bunnie
25dc27f2f7 add drop implementation to servers 2021-04-02 22:01:40 +08:00
bunnie
da255cc1ab use macro expansion for argument extraction of scalars 2021-04-02 15:38:38 +08:00
bunnie
5a6ce66d7e clean up log messages now that we can identify the logging source 2021-04-02 03:10:13 +08:00
bunnie
68b9addd45 redo ticktimer/trng to use the new convenience functions 2021-04-02 02:45:00 +08:00
bunnie
2407f17267 fix typos 2021-04-01 17:20:28 +08:00
bunnie
dc2519c5ef trying out new API names 2021-04-01 03:47:10 +08:00
bunnie
f35d478cf0 attempt to refactor xous_names 2021-03-29 04:35:11 +08:00
bunnie
e889765caf refactor the Ticktimer API. 2021-03-28 18:14:41 +08:00
bunnie
bb3d96de27 Merge branch 'master' of https://github.com/betrusted-io/xous-core into HEAD 2021-03-25 02:37:58 +08:00
Sean Cross
d16d0c9bd8 ticktimer-server: set quantum to 10ms
This is an experiment to see if this shorter time improves things.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 21:43:35 +08:00
Sean Cross
e624c184cd ticktimer-server: rewrite sleep server as deadline
Use deadlines for sleep, rather than calculating the amount of remaining
time.

This keeps time consistent, because it means we don't have to
recalculate all sleeps whenever one expires.

It also allows us to take advantage of the hardware which will fire an
interrupt if we schedule a wakeup in the past.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 21:41:30 +08:00
Sean Cross
89cf0c1ab1 ticktimer-server: run rustfmt on Cargo.toml
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 21:37:52 +08:00
bunnie
184a284da5 sleep_ms() bug exhibitition 2021-03-18 17:34:48 +08:00
bunnie
93a7567618 ticktimer prints its PID now 2021-03-01 13:46:02 +08:00
bunnie
ea78de8014 convert all services to use xous-names server 2021-01-09 02:12:01 +08:00
bunnie
bdbe8f8288 intermediate checkin 2021-01-05 04:40:34 +08:00
bunnie
b7263f7ef0 Merge remote-tracking branch 'origin/master' into hardware 2021-01-04 03:19:23 +08:00
Sean Cross
7b50d00eb8 repo: run cargo fmt
This reformats line endings to be consistent, and reinforces the
contents of `.gitattributes`.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-01-03 18:31:51 +08:00
bunnie
b9a31f7d99 try to layer in the fcc agent 2020-12-31 19:31:12 +08:00
bunnie
957c065f41 push mods for modnoise eval etc. 2020-12-18 04:35:39 +08:00
bunnie
7488018e22 get wdt mods compiling into xtask run 2020-12-13 02:03:15 +08:00
bunnie
e1c4b702a9 add WDT support to xous-core 2020-12-13 01:54:25 +08:00
Sean Cross
25e4d16de3 xous-os: rename CreateServer to CreateServerWithAddress
Servers will, by default, get randomly-assigned SIDs. Certain servers
will want to have well-known SIDs, such as the log server or the
nameserver. These will use a separate call in order to perform this
priveledged operation.

A subsequent patch will add `CreateServer`.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-04 20:33:33 +08:00
Sean Cross
684ba69a31 os_timer: move preemption from shell to ticktimer server
This is responsible for preemption in the system. Move it to the timer
server since it seems to make more sense to have there.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-27 14:13:21 +08:00
Sean Cross
513b99f916 ticktimer-server: remove debug module
This was leftover from before a time when we had the log server. It no
longer serves a need.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-27 14:00:19 +08:00
bunnie
b568d86153 get non-blocking gas gauge checking working 2020-11-25 23:06:57 +08:00
bunnie
bc832b3a50 fix interrupt pending clear issue in debug module
during conversion to documented interrupts from Litex a case was
missed.
2020-11-24 22:44:19 +08:00
bunnie
1aa01fdf5d confirm sleep works, some minor fixup to UTRA style usage 2020-11-23 19:02:02 +08:00
Sean Cross
72a466bc61 ticktimer: use interrupt from UTRA
Previously UTRA didn't have an interrupt, so we just made one up. Use
the correct interrupt to get things working on hardware.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:34:18 +08:00
Sean Cross
78a47ab4ba services: ticktimer: fix debug warnings on hardware
These appeared in Rust 1.48.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 16:13:19 +08:00