Commit graph

5381 commits

Author SHA1 Message Date
eupn
90df83f885
kernel: revamp IRQ handling 2023-04-05 16:35:01 +04:00
bunnie
1ac31cf930 undo local test patch 2023-04-04 02:24:16 +08:00
bunnie
384f04fc9a fix svd2utra main.rs 2023-04-04 02:17:04 +08:00
bunnie
e469eba167 bump version for utralib patch 2023-04-04 02:13:02 +08:00
bunnie
3ca8f669a3 breaking change in svd2utra: fix deprecation of quick-xml
quick-xml 0.19.0, a dependency of svd2utra, uses features
that Rust will deprecate.

Unfortunately, the only versions of quick-xml that do not
use the deprecated language features also break a portion
of the API. In particular, quick-xml will no longer take
a `File` as an input: it will only take a `Path`.

This means that the API for svd2utra is also broken, because
originally it was designed to take a `File`

This patch refactors svd2utra to work with the latest quick-xml,
but also breaks any code that calls svd2utra's generate
APIs.

Fortunately this is fairly easy to fix, the calling code
will typically already have the Path somewhere in it, so
instead of opening the Path and passing it into the function,
one may simply pass in the Path.
2023-04-04 02:03:35 +08:00
bunnie
be3ac71b34 bump release notes 2023-04-04 00:07:59 +08:00
bunnie
51fe53bc83 fix #354
verified to address the issue at least in a simple test case

1) drop repeated keys instead of panic-unwrapping
2) reduce key repeat rate to something more sane
2023-04-04 00:06:59 +08:00
bunnie
18f6c7fcb0
Merge pull request #352 from plaurent/shellchat-pddbcmd-writeovertrunc
shellchat pddb write now replaces/creates; rename write to writeover
2023-04-03 22:54:30 +09:00
bunnie
c8169dcdb3 absorb new crates for atsam implementation 2023-04-03 21:20:38 +08:00
bunnie
a0f7b71642 fix hosted mode 2023-04-03 21:20:20 +08:00
bunnie
58bc5a4b3b
Merge pull request #351 from Foundation-Devices/ticktimer-arm-sama5d2
xous-ticktimer: split platform-dependent code and add SAMA5D2 impl
2023-04-03 16:43:36 +09:00
bunnie
b50cbe0cdf
Merge pull request #344 from Foundation-Devices/xous-log-sama5d2
xous-log: add support for sama5d27
2023-04-03 16:42:06 +09:00
Patryk Laurent
19f18ef59e shellchat pddb write now replaces/creates; rename write to writeover 2023-03-31 10:02:53 -07:00
eupn
495f81ef33
xous-ticktimer: fix default log level 2023-03-30 00:28:36 +04:00
eupn
2a52359065
xous-ticktimer: add SAMA5D2 implementation 2023-03-30 00:22:33 +04:00
eupn
1bbf5621fd
xous-ticktimer: split platform impls 2023-03-30 00:21:53 +04:00
eupn
c27bc6e088
xous-log: fix precursor build 2023-03-29 22:44:19 +04:00
eupn
b059170e8d
xtask: add xous-log to arm-tiny image 2023-03-27 19:55:36 +04:00
eupn
775136e915
xous-log: add atsama5d27 implementation 2023-03-27 19:54:39 +04:00
eupn
ff09a784fb
xous-log: split platform-dependent code 2023-03-27 19:50:13 +04:00
bunnie
f2e1a89f13
Merge pull request #343 from eupn/patch-1
elf.rs: fix alignment edge case (take 2)
2023-03-27 22:48:52 +08:00
eupn
8694eaa004
elf.rs: fix alignment edge case (take 2) 2023-03-27 18:41:45 +04:00
bunnie
ea90f3a312
Merge pull request #342 from Foundation-Devices/elf-alignment
elf: fix a section alignment edge case
2023-03-27 22:06:10 +08:00
eupn
199ab0a73c
elf: fix a section alignment edge case 2023-03-27 16:29:07 +04:00
bunnie
ceeb2d94cd bump release notes 2023-03-24 23:10:55 +08:00
bunnie
e5c3060cd8 bump release notes 2023-03-24 23:10:12 +08:00
bunnie
991f5560a8 prep for transition to XIP for app-images 2023-03-24 23:09:53 +08:00
bunnie
cd0269036d WIP: #334
I don't have a way to test this, but maybe you can give it a try
and see if it fixes as described in the issue.
2023-03-24 23:08:50 +08:00
bunnie
f4fabc3f8e fix #337
Adds MAC display to preference dialog box

also offer both hex and decimal formatting outputs on wlan status
2023-03-24 23:07:29 +08:00
bunnie
2bb58bb63f fix #337 2023-03-24 22:53:19 +08:00
bunnie
d96361e1cf factory requests: longer oqc tune time, revert vcc_int threshold
changes to be applied for next production run
2023-03-24 20:07:54 +08:00
bunnie
aaaacabc35 bump release notes 2023-03-24 01:45:43 +08:00
bunnie
106cf5dfe6 fix RTC corruption issue on shutdown
Alright, this one was very tricky.

The problem here turns out that if the very last operation
on the RTC was a write before powering off, any spurious
clock/data noise is interpreted as a valid write to the RTC!

Thus, if the last thing you do to the RTC before a suspend is
a write of some sort, the RTC is going to be corrupted. During
shutdown, the RTC lines slam up and down a couple of times:

- they drop low as vcore discharges
- they then pop high once vcore is dead
- they then slowly drop low as vddio drops

in both of these cases, they drop with a very slow (>10ms)
fall time, which gives ample time for the RTC to get excited
and think maybe some data is being written to it! Also on boot,
there is a brief glitch of SDA/SCL at the same time, which looks
very much like a start condition.

Anyways, this patch does two things:

1. Performs a dummy read to a register that is "far from" any
critical data resisters. This puts the I2C state machine
of the RTC in "read" mode, so any future clock cycles just
keep wheeling through the RTC bank as a read, instead of clocking
in data as a write. There is a non-zero chance that the noise
"could" emulate a valid I2C transaction (it'd have to create
the bit pattern that addresses the RTC, with the right timing),
but in practice this hasn't been seen.

2. Disables the RTC block on suspend, prior to suspend. This
will prevent the RTC engine from issuing any new commands as
the core starts to shut down. It's conceivable that e.g. the
"start" bit could randomly flip high as the power goes down
and since the I2C engine is now in the always-on domain it'll
dutifully start clocking out bits as the power goes away.

This patch seems to have stabilized the RTC corruption problem
that was previously witnessed.
2023-03-24 01:31:25 +08:00
bunnie
19b3014f4b have the RTC recover more gracefully from a "line noise" shutdown
simply throwing errors over and over again in a loop doesn't help anyone.
2023-03-24 01:30:41 +08:00
bunnie
4800cca65e add helper function to extract bcd time values 2023-03-24 01:30:15 +08:00
bunnie
e479de4e02 make time errors print the full RTC value set
this is necessary to debug more I2C weirdnesses.
2023-03-24 01:29:24 +08:00
bunnie
6a1d8f66f8 give a little more margin in sleep stress test to recover/setup/shudown 2023-03-24 01:28:56 +08:00
bunnie
e1881fa4a2 fix a missing feature flag 2023-03-24 01:28:39 +08:00
bunnie
6f80923609 fix hosted mode...again... 2023-03-23 21:38:17 +08:00
bunnie
80bbdd10a5 fix double-free error (take 2) 2023-03-23 21:34:29 +08:00
bunnie
cb5bd20739 match latest soc_csr candidate 2023-03-23 21:23:05 +08:00
bunnie
e26df60599 disable WFI during I2C transactions
CPU is sleeping during I2C transactions, leaving the bus in a state
where the I2C transaction is continuously being fired over and over
again because the way LiteX creates CSRStorage, it gives the
CPU precedence over the block's update.

Basically what happens is that the CPU writes something to the
I2C, goes to sleep, and leaves the I2C block selected. This causes
the I2C block unable to clear its own I2C transaction initiation
register, subsequently leading to the I2C transaction being repeated
over and over again until the CPU wakes up and stops jamming the
bus in that state.

By forcing WFI on during I2C transactions, the CPU is more responsive
during I2C and also we prevent the I2C transactions from being restarted.

This was verified using an oscilloscope.
2023-03-23 21:20:33 +08:00
bunnie
16c48b4f5b minor tweak on debug levels 2023-03-23 21:20:17 +08:00
bunnie
33960277c1 fix hosted mode 2023-03-23 17:52:59 +08:00
bunnie
78e9824950 log if an unexpected interrupt happens on I2C 2023-03-23 16:01:13 +08:00
bunnie
673a3f1364 Merge branch 'main' of github.com:betrusted-io/xous-core into main 2023-03-23 15:31:10 +08:00
bunnie
4af7699f0d remove double-free path in I2C driver 2023-03-23 15:30:55 +08:00
bunnie
3e0b2e173d
Merge pull request #332 from markhuge/docs-hosted-dpad
Document dpad keymapping in hosted mode
2023-03-23 14:23:12 +08:00
Mark Wilkerson
2e56716a7a add dpad hosted mode mapping 2023-03-22 19:28:44 -07:00
bunnie
e32a22655b add a sanity check on the reported EC version 2023-03-23 03:17:05 +08:00