Commit graph

361 commits

Author SHA1 Message Date
bunnie
7824874cc8 some tweaks to try and make stalls appear at the right time??? 2024-06-14 18:57:48 +08:00
bunnie
832d0205c2 expose append zero packet api and rename function to be generic 2024-06-14 16:11:38 +08:00
bunnie
d2c534a3c8 document the entropy compression method
compression helps us reduce the amount of data we have to
shuttle between the hardware interface and the rest of the world.
It takes more samples from the TRNG and represents them in a compressed
form that effectively increases the bits per byte of entropy. It
does not increase the *rate* of entropy generation -- while each
byte has more entropy, the bytes come proportionally slower. However,
this is a reasonable trade-off because kernel space calls to fetch
the entropy feed are expensive, and what this does is effectively
amortize the price of a syscall: the time per syscall is longer,
but you get more entropy out per syscall, thus effectively reducing
the needed overhead to get a certain amount of entropy.
2024-06-14 16:09:01 +08:00
bunnie
f6fe1143e2 compress sparse TRNG output data 2024-06-14 14:33:11 +08:00
bunnie
af4f096387 quiet down debug 2024-06-13 22:07:08 +08:00
bunnie
5a1c3ca6fe cleanup warnings on the USB driver 2024-06-13 16:08:18 +08:00
bunnie
a360f3ee52 bump xous pins for RawTrng API 2024-06-13 15:49:35 +08:00
bunnie
b24cf4fd8e add guardband code to driver 2024-06-13 15:42:58 +08:00
bunnie
34808beb8f remove unused dep 2024-06-13 15:32:34 +08:00
bunnie
3abb68cbdc adjust TRNG parameters to match hw reality 2024-06-13 15:32:06 +08:00
bunnie
61ed5aa145 reduce debugging so USB serial works 2024-06-13 00:35:17 +08:00
bunnie
1de497e3fe commit the todo 2024-06-12 14:16:49 +08:00
bunnie
bbc7158dc1 cleanups to debug output
works under linux, not windows
2024-06-12 14:11:16 +08:00
bunnie
f96ca0ee93 ok. finally, an end to end of HID: can send keys now to linux
windows still not working, it's fussier.
2024-06-11 23:18:13 +08:00
bunnie
7b2804eec5 endpoint enumeration now working
turns out that you *have* to enable the endpoints after your
address has been assigned. You can't do it before.

Very subtle one-liner in the docs that I missed until now. :-/
2024-06-11 22:30:55 +08:00
bunnie
f004c45f2a trying to debug ep activation problem
this commit hangs on a wait for ep to start running
2024-06-11 21:13:45 +08:00
bunnie
b08851b741 enumeration is now "mostly" working
- need to handle something with how stalls are handled
- need to handle responses to requests that don't exist
2024-06-11 16:38:34 +08:00
bunnie
cb12ee3769 first time we're seeing a handshake in xous. 2024-06-10 23:35:09 +08:00
bunnie
ac7b58b702 trying to back-trace to a working bootloader state 2024-06-10 18:45:44 +08:00
bunnie
3f75da8240 commits related to previous commit on demo 2024-06-09 23:53:55 +08:00
bunnie
31e03a9bc7 add routines to move packets; refactor tricky bits
we're able to receive the setup packet, but still nothing is
being sent out of the core.
2024-06-09 04:27:31 +08:00
bunnie
a32a2f2395 more debug progress
- 2nd bank of magic numbers seems more stable-ish
- can now get to the point of a setup packet being received
and flagged
2024-06-08 00:51:13 +08:00
bunnie
ca8fd21c44 interrupts are minimally responsive now 2024-06-07 13:54:37 +08:00
bunnie
41d0364cf4 more debug 2024-06-06 22:26:16 +08:00
bunnie
e9217b7eb6 convert HAL to be driver-friendly
rewrite so the driver obeys the type bounds necessary for
USB stack integration, in particular, Sync requires all raw pointers
to be AtomicPtr
2024-06-06 17:54:24 +08:00
bunnie
8ef46fd081 move usb driver to a common location 2024-06-06 03:58:35 +08:00
bunnie
907b0c543a move order of tests 2024-06-03 03:43:57 +08:00
bunnie
c4d787356b add aclk unit test 2024-06-02 20:20:06 +08:00
bunnie
5c9b91d22a integrate i2c driver and update test log 2024-06-02 19:17:27 +08:00
bunnie
cc7b1158f3 create a "proper" i2c driver for BIO
this is an actually usable driver for end applications.
maybe some massaging needs to be done on shared resources, but
from the i2c standpoint this can do SMB, I2C transactions with
a fairly "normal" API.
2024-06-02 19:16:27 +08:00
bunnie
3e263c1974 update docs to match small change to spec 2024-06-02 06:21:42 +08:00
bunnie
559be323b7 i2c demo about working 2024-06-02 06:21:29 +08:00
bunnie
935857a675 add basic i2c concept 2024-06-02 02:39:45 +08:00
bunnie
23f2b117ab dont use report_api inside the generation macro - just for debugging 2024-06-02 02:39:30 +08:00
bunnie
9fe1933611 minor cleanup 2024-06-02 02:39:06 +08:00
bunnie
41e636bb8c fix formatting 2024-06-01 22:00:30 +08:00
bunnie
c113c4e9bd incorporate i2c module, pretty prints 2024-06-01 22:00:07 +08:00
bunnie
24bd9da6ab pretty-print unit tests 2024-06-01 21:58:18 +08:00
bunnie
e0f3ee8e49 pretty-print spi 2024-06-01 21:58:05 +08:00
bunnie
ccc342d9f3 add debug pretty-printing to test 2024-06-01 21:53:54 +08:00
bunnie
ac95f9a6df
Merge branch 'main' into bio 2024-06-01 11:03:53 +05:30
bunnie
a8518f7fa1 create a serializable version of Spim
this works by blowing apart the structure and re-assembling
it on the other side. The reason we can't simply pass it
is because the hardware pointer to the core register violates
a Rust safety rule, but Rust doesn't know that this pointer
points to a hardware register that's immutable and static versus
a regular block of memory that can go away.
2024-05-31 20:39:39 +08:00
bunnie
cdf0289099 add rv deps to the cramium-hal
needed for manipulating irqs
2024-05-31 03:39:32 +08:00
bunnie
17a2330681 add an IRQ API for the UDMA
this API has the unfortunate problem that only one process
can manage all the IRQs for all the serial ports, due to the
concentration of all IRQs into a single register bank.

That being said, it does support registering multiple repsonders
in a somewhat ergonomic fashion.
2024-05-31 03:38:23 +08:00
bunnie
35e7cf3a5b bump xous dep revs 2024-05-29 02:07:06 +08:00
bunnie
34e7474b80 add work-around for DAR-620
UDMA Rx busy bit seems to get stuck occassionally. This seems
to be aggravated if we insert a dcache_flush in the poll loop.

The current time-out code seems to mitigate the problem, but
I have low confidencne that this is a 100% solution. I have a feeling
we'll be revisiting this again soon.
2024-05-22 18:08:50 +08:00
bunnie
9e66c1bee2 commit the version bump 2024-05-07 01:03:05 +08:00
bunnie
0f79056ac7 refactor spim divider equation to reflect reality 2024-05-06 03:32:41 +08:00
bunnie
6723b9d67c cleanup missing APIs
- need to be able to specify the mode that a SPIM could be in
that was set up by the bootloader
- make yield() optional - it could be useful if the API is used
in userland contexts, but in an interrupt context (e.g. swapper)
it should not be used.
2024-05-06 02:26:55 +08:00
bunnie
58308656a0 fix feature flags for xous deployment 2024-05-06 02:25:09 +08:00