mirror of
https://github.com/lupyuen/nuttx-star64.git
synced 2025-01-12 20:58:32 +08:00
I2C is alive yay!
This commit is contained in:
parent
9e323652b9
commit
46af7af383
1 changed files with 56 additions and 3 deletions
59
README.md
59
README.md
|
@ -7740,9 +7740,56 @@ $ md 0x13020300 1
|
|||
13020300: ffe5efcc ....
|
||||
```
|
||||
|
||||
TODO
|
||||
Which says that...
|
||||
|
||||
From [SYS SYSCON](https://doc-en.rvspace.org/JH7110/TRM/JH7110_TRM/sys_syscon.html):
|
||||
- All I2C Clocks are Disabled
|
||||
|
||||
- All I2C Resets are Asserted (except U0 and U5)
|
||||
|
||||
Let's enable all the I2C Clocks and deassert all the I2C Resets...
|
||||
|
||||
```bash
|
||||
## Enable the I2C Clocks
|
||||
$ mw 0x13020228 0x80000000 7
|
||||
$ md 0x13020228 7
|
||||
13020228: 80000000 80000000 80000000 80000000 ................
|
||||
13020238: 80000000 80000000 80000000 ............
|
||||
|
||||
## Deassert the I2C Resets
|
||||
|
||||
$ mw 0x13020300 0xffe00fcc 1
|
||||
$ md 0x13020300 1
|
||||
13020300: ffe00fcc ....
|
||||
|
||||
## Check the System SYSCON for I2C
|
||||
$ md 0x13030014 1
|
||||
13030014: 00d54d54 TM..
|
||||
$ md 0x1303009c 1
|
||||
1303009c: 00042600 .&..
|
||||
|
||||
## Dump the I2C Registers
|
||||
$ md 0x10030000 0x40
|
||||
10030000: 0000007f 00000055 00000055 00000001 ....U...U.......
|
||||
10030010: 00000000 00000190 000001d6 0000003c ............<...
|
||||
10030020: 00000082 00000006 00000010 00000000 ................
|
||||
10030030: 000008ff 00000000 00000000 00000000 ................
|
||||
10030040: 00000000 00000000 00000000 00000000 ................
|
||||
10030050: 00000000 00000000 00000000 00000000 ................
|
||||
10030060: 00000000 00000000 00000000 00000004 ................
|
||||
10030070: 00000006 00000000 00000000 00000001 ................
|
||||
10030080: 00000000 00000000 00000000 00000000 ................
|
||||
10030090: 00000000 00000064 00000001 00000000 ....d...........
|
||||
100300a0: 00000005 00000001 00000000 00000000 ................
|
||||
100300b0: 00000000 00000000 00000000 00000000 ................
|
||||
100300c0: 00000000 00000000 00000000 00000000 ................
|
||||
100300d0: 00000000 00000000 00000000 00000000 ................
|
||||
100300e0: 00000000 00000000 00000000 00000000 ................
|
||||
100300f0: 00000000 001f1fee 3230302a 44570140 ........*002@.WD
|
||||
```
|
||||
|
||||
Yep I2C is alive yay!
|
||||
|
||||
TODO: What about [SYS SYSCON](https://doc-en.rvspace.org/JH7110/TRM/JH7110_TRM/sys_syscon.html):
|
||||
|
||||
- Base Address of System SYSCON: 0x00_1303_0000
|
||||
|
||||
|
@ -7767,7 +7814,13 @@ $ md 0x1303009c 1
|
|||
1303009c: 00042600
|
||||
```
|
||||
|
||||
TODO
|
||||
Which says that...
|
||||
|
||||
- I2C Port U5 is enabled
|
||||
|
||||
- Other I2C Ports U0 to U6 are disabled
|
||||
|
||||
TODO: Let's check again after enabling I2C
|
||||
|
||||
I2C Devices: https://doc-en.rvspace.org/VisionFive2/DG_I2C/JH7110_SDK/i2c_source_code.html
|
||||
|
||||
|
|
Loading…
Reference in a new issue