-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Peripherals #1
Comments
As I understand it, you pull them out from SDK? |
Попробую I2C набрать. |
DMAC has 64-bit registers. Is it normal? As I see, svd2rust doesn't support 64. |
@burrbull I'll try to figure out what to do with this, but if there is no way to declare 64-bit register, you can use two 32-bit registers with |
Are you sure that writing a half of register is safe? I'm not. |
I'm not sure either. I see at least one major problem: such half-accesses may be forbidden in hardware, but this behavior can be checked. |
Ran into this too for the KPU (#14).
My experience is that it isn't. I don't know about 32 versus 64 bit but I ran into a problem where the C compiler would optimize accesses to 8-bit subfields of the FPIOA as byte writes which the hardware simply ignored (sipeed/LicheeDan_K210_examples#3). Edit: also, I expect this to interact badly with FIFO-like registers such as the layer argument FIFO for the KPU. Writing both halves separately, if not ignored completely, would likely fill two slots in the FIFO. |
PRs exist for:
This leaves:
and (but this one is going to be problematic as (AFAIK) no public documentation exists for it):
|
I have some reverse-engineering results for OTP, but they are far from usable at the moment. Maybe some experiments with it can give more information. |
I tried that for a bit but stopped short where I was afraid of bricking my chip 😄 |
No problem, I have three of these 😄 |
295: Add support for 64-bit registers r=therealprof a=Disasm Some registers on K210 chip are 64-bit, so it's better to declare them as u64 in SVD for the reasons mentioned here: riscv-rust/k210-pac#1 (comment) At the moment, svd2rust forbids 64-bit register declarations. This PR fixes this. This change can cause silent bugs on platforms without 64-bit memory access operations due to the need for proper access sequence to 64-bit registers with two 32-bit accesses. Closes #289 Co-authored-by: Vadim Kaushan <[email protected]>
The text was updated successfully, but these errors were encountered: