Commit graph

7875 commits

Author SHA1 Message Date
bunnie
b68abf1d2b change volume label 2024-11-20 20:43:39 +08:00
bunnie
fded456115 commit dependency impact of simple-fatfs 2024-11-20 20:41:26 +08:00
bunnie
6d3a58ccea cleanup warnings 2024-11-20 20:41:10 +08:00
bunnie
9a839e3fe6 add keypress handling and no_std Cursor implementation 2024-11-20 20:40:48 +08:00
bunnie
d9709997fb add template disk image
this is a pre-initialized, FAT12 image that is compatible with
Windows (which is the harder of the OSes to please)
2024-11-20 20:40:05 +08:00
bunnie
e181c0d460 use global allocator for simple-fatfs
also initialize the disk image with some default data
2024-11-20 20:39:27 +08:00
bunnie
8cc80741ac cleanup warning 2024-11-20 20:39:06 +08:00
bunnie
51717fd7d9 move to simple-fatfs 2024-11-20 20:38:31 +08:00
bunnie
2d322d852c cleanup warnin 2024-11-20 20:36:57 +08:00
bunnie
dfe5d50f41 start to lay in the APIs for the USB interface in userspace 2024-11-20 01:46:34 +08:00
bunnie
5d0cc45c43 update lockfile to reflect new dependencies 2024-11-20 01:46:22 +08:00
bunnie
6c79441ee1 add boot option to loader 2024-11-20 01:45:56 +08:00
bunnie
bb594a5c40 try to improve the pmic detection code
we can now recover from an I2C timeout and get the PMIC data
out, but mysteriously, when we leave the routine, the CPU hangs.

I think fundamentally the I2C instability is due to something
very wonky inside the chip itself, so the recovery only papers
over an issue that is only fixed with a reboot...
2024-11-20 01:44:58 +08:00
bunnie
f14cf1948c gfx is now used as part of the update routine 2024-11-20 01:44:28 +08:00
bunnie
d4f209c0b2 add ghostfat to dependencies
in anticipation of starting to emulate the FS
2024-11-20 01:43:46 +08:00
bunnie
391fb84f00 update api to inclued perclk_freq 2024-11-20 01:43:25 +08:00
bunnie
de12d0f73a add usb feature to loader 2024-11-20 01:43:05 +08:00
bunnie
5ec5bc29c9 add keyboard pins to board description 2024-11-20 01:42:47 +08:00
bunnie
6829eae73c add a reset method to the UDMA abstraction 2024-11-20 01:42:27 +08:00
bunnie
72685e2c1c improve i2c error recovery 2024-11-20 01:42:06 +08:00
bunnie
5279e50ace
Merge pull request #594 from betrusted-io/udma-debug
Udma debug
2024-11-19 22:33:08 +08:00
bunnie
e42b7195b0 add notes about performance improvement for the future 2024-11-19 22:21:48 +08:00
bunnie
d78899ca74 implement retry on SPIM failure
somehow, the retry still *fails* - to be looked into in the future
2024-11-19 22:17:19 +08:00
bunnie
265805ac94 cleanup warnings 2024-11-19 22:17:07 +08:00
bunnie
289d6879ca fix typo 2024-11-19 22:15:47 +08:00
bunnie
a40d78f3ea add backpressure setting to SPIM; also re-attempt interface clearing
...now that we have the right bit...
2024-11-19 00:00:50 +08:00
bunnie
e8e28702e2 fix position of clear bit; add backpressure feature for NTO 2024-11-19 00:00:18 +08:00
bunnie
53de9cc273
Merge pull request #593 from betrusted-io/mpw-dev
Mpw dev
2024-11-18 18:41:56 +08:00
bunnie
fe45f40cb7 increase verbosity of pl230 output for co-debugging 2024-11-18 18:38:41 +08:00
bunnie
64520cf5a3 add note about failing option for pl230 2024-11-18 18:38:15 +08:00
bunnie
626d997868 move pl230 test to an easier place for checking 2024-11-18 18:37:33 +08:00
bunnie
d0e638e020 enequeue data before command is issued
it becomes clear on a slower bus configuration that this is
the correct ordering for udma

also add code to debug timeout cases
2024-11-18 18:36:23 +08:00
bunnie
0c5fde7fc2 reformat busy statement for easier debug 2024-11-18 18:35:56 +08:00
bunnie
4a99341269 cleanup warnings 2024-11-14 22:19:40 +08:00
bunnie
fac7adca35 improve UX a little bit 2024-11-14 00:36:24 +08:00
bunnie
0bad04856b debug fixed point underflow issue 2024-11-14 00:34:02 +08:00
bunnie
fc95e8b7b3 update findings 2024-11-14 00:33:39 +08:00
bunnie
c2edfee2fd try to fix timeout issue on camera capture 2024-11-14 00:15:51 +08:00
bunnie
2e25ebff9f upgrade the linederivation to use std
this eliminates occasional storage overflow errors during searching
2024-11-14 00:03:49 +08:00
bunnie
3135407e8e live QR decoding now working!
Got up to version 8 to decode, although version 8 is a bit fussy.

Fairly sensitive to camera focal distance - hard to see focus
issues on B/W display. This needs to be improved in the HW.
2024-11-13 23:29:50 +08:00
bunnie
2b5aab23e0 add fractional iterator for conversion of pixels to modules 2024-11-13 23:29:26 +08:00
bunnie
8002d522b0 add support for neighborhood estimation and version guessing 2024-11-13 23:28:54 +08:00
bunnie
45b5dc1d95 flip image vertically as it comes from the camera fb
this orients it correctly for processing by the QR pipeline
2024-11-12 23:22:15 +08:00
bunnie
8beb9327bc
Merge pull request #592 from betrusted-io/mpwqrdev
Mpwqrdev
2024-11-08 00:25:33 +08:00
bunnie
4b9f1fce95 move bao-video back to the swap image
udma decongestion proves to prevent the hardware lockup, but the
solution is only so durable.
2024-11-08 00:18:03 +08:00
bunnie
21e59885e3 add some attempts to debug the SPIM lockup.
for now, filing a bug agaisnt the IP block
2024-11-08 00:17:42 +08:00
bunnie
9b01753ed3 add some code that attempts a read retry on the SPIM interface
it's not successful, unfortunately.
2024-11-08 00:16:47 +08:00
bunnie
dc0fd47ff4 add an option to decongest udma
There is a hardware bug that causes SPIM RX packets to fail when
the UDMA bus is busy (like when streaming video). This causes
swap memory to fail because it relies on the SPIM bus.

This patch causes the video to sample *after* any computation
happens, so that any swap memory that might be hit taken care of.

This reduces the efficiency of the loop somewhat, because without
the decongesting, we could kick off the camera read and do useful
computation while the camera streamed data. Now we have to keep
them separate to work around this bug.
2024-11-08 00:14:21 +08:00
bunnie
f0e573638d add packages pulled in my QR code reader
hope to trim this down a bit - using rqrr to do some back
end processing but after intiial evaulation the right path
is probably going to be fork and slim down the code, which
is fine by me.
2024-11-07 16:19:29 +08:00
bunnie
c6871d58b1 placeholder stub for the future USB stack on cramium targets
The USB hardware stack is different enough that I think it
doesn't make sense to wedge it into the existing USB driver.
Instead it will be a separate driver that has the same `lib` level
API calls, but a totally different implementation underneath.

This allows us to make better architectural decisions that will
make the USB stack more reliable because the hardware has some
pretty strict latency requirements on responding to packets that
can't be met with the previous abstraction.
2024-11-07 16:17:08 +08:00