This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5708: AM5708 CAL Register Operation

Part Number: AM5708


HI

 board:Custom board AM5708

RDK:ti-processor-sdk-linux-am57xx-evm-04.03.00.05-Linux-x86-Install.bin

1、hardware design

2、Camera adaptation layer (CAL) mapping


.Set CAL_CSI2_COMPLEXIO_CFG_l[10:8] DATA2_POSITION.
 Set CAL_CSI2_COMPLEXIO_CFG_l[6:4] DATA1_POSITION.
 Set CAL_CSI2_COMPLEXIO_CFG_l[2:0] CLOCK_POSITION.
3、Use the "devmem2" command to manipulate registers
Print the following erro:

root@am57xx-evm:~# devmem2 0x4845b384
/dev/mem opened.[ 2438.403969] ------------[ cut here ]------------
[ 2438.409917] WARNING: CPU: 0 PID: 1073 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x254/0x370
[ 2438.419351] 44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER2_P3 (Read): Data Access in User mode durins
[ 2438.430961] Modules linked in: ti_cal sha512_generic sha512_arm sha256_generic sha1_generic sha1_arm_neon sha)
[ 2438.488490] CPU: 0 PID: 1073 Comm: devmem2 Tainted: G W O 4.9.69-g9ce43c71ae #2
[ 2438.496790] Hardware name: Generic DRA72X (Flattened Device Tree)
[ 2438.502906] Backtrace:
[ 2438.505376] [<c020b1b8>] (dump_backtrace) from [<c020b494>] (show_stack+0x18/0x1c)
[ 2438.512979] r7:00000009 r6:600e0193 r5:00000000 r4:c10226a8
[ 2438.518666] [<c020b47c>] (show_stack) from [<c04ce080>] (dump_stack+0x90/0xa4)
[ 2438.525922] [<c04cdff0>] (dump_stack) from [<c022e070>] (__warn+0xec/0x104)
[ 2438.532912] r7:00000009 r6:c0bc311c r5:00000000 r4:ef201dd0
[ 2438.538596] [<c022df84>] (__warn) from [<c022e0c8>] (warn_slowpath_fmt+0x40/0x48)
[ 2438.546110] r9:0000001a r8:ef1c4450 r7:c0bc2f88 r6:00000002 r5:c0bc3048 r4:c0bc30ec
[ 2438.553887] [<c022e08c>] (warn_slowpath_fmt) from [<c04fd81c>] (l3_interrupt_handler+0x254/0x370)
[ 2438.562795] r3:ef1c42c0 r2:c0bc30ec
[ 2438.566381] r4:80080003
[ 2438.568927] [<c04fd5c8>] (l3_interrupt_handler) from [<c027f8d4>] (__handle_irq_event_percpu+0x6c/0x134)
[ 2438.578447] r10:c104dfef r9:ef1bf200 r8:00000017 r7:ef201ef4 r6:00000000 r5:ef1bf200
[ 2438.586306] r4:ef1c47c0
[ 2438.588851] [<c027f868>] (__handle_irq_event_percpu) from [<c027f9c0>] (handle_irq_event_percpu+0x24/0x60)
[ 2438.598545] r10:bef5daa8 r9:b6fd0384 r8:ef006000 r7:00000000 r6:c1008bf4 r5:ef1bf200
[ 2438.606405] r4:ef1bf200
[ 2438.608949] [<c027f99c>] (handle_irq_event_percpu) from [<c027fa3c>] (handle_irq_event+0x40/0x64)
[ 2438.617857] r5:ef1bf260 r4:ef1bf200
[ 2438.621449] [<c027f9fc>] (handle_irq_event) from [<c0283090>] (handle_fasteoi_irq+0xc4/0x194)
[ 2438.630009] r7:00000000 r6:c1008bf4 r5:ef1bf260 r4:ef1bf200
[ 2438.635694] [<c0282fcc>] (handle_fasteoi_irq) from [<c027eb4c>] (generic_handle_irq+0x2c/0x3c)
[ 2438.644339] r7:00000000 r6:00000000 r5:00000017 r4:c0e5dddc
[ 2438.650023] [<c027eb20>] (generic_handle_irq) from [<c027f0c0>] (__handle_domain_irq+0x64/0xbc)
[ 2438.658758] [<c027f05c>] (__handle_domain_irq) from [<c0201474>] (gic_handle_irq+0x40/0x7c)
[ 2438.667144] r9:b6fd0384 r8:fa213000 r7:fa212000 r6:ef201fb0 r5:fa21200c r4:c1003424
[ 2438.674921] [<c0201434>] (gic_handle_irq) from [<c020c2a8>] (__irq_usr+0x48/0x60)
[ 2438.682432] Exception stack(0xef201fb0 to 0xef201ff8)
[ 2438.687505] 1fa0: b6fd4958 00000070 00000008 00020d50
[ 2438.695717] 1fc0: 00020e1c b6fd0000 4845b384 00000002 00000003 b6fd0384 bef5daa8 bef5dca4
[ 2438.703928] 1fe0: 00020dfc bef5da48 b6fbb99c b6fb6e0c 600e0030 ffffffff
[ 2438.710570] r9:b6fd0384 r8:30c5387d r7:30c5387d r6:ffffffff r5:600e0030 r4:b6fb6e0c
[ 2438.718344] ---[ end trace e99ee3bf1614ae42 ]---

Memory mapped at address 0xb6fd0000.
[ 2438.723138] Unhandled fault: asynchronous external abort (0x1211) at 0x00000000
[ 2438.733872] pgd = edf178c0
[ 2438.736588] [00000000] *pgd=ade18003, *pmd=00000000
Read at address 0x4845B384 (0xb6fd0384): 0x00000000
[ 2438.754672] systemd[1]: systemd-journald.service: Failed with result 'core-dump'.
root@am57xx-evm:~# [ 2438.781148] systemd[1]: systemd-journald.service: Service has no hold-off time, scheduling.
[ 2438.810199] systemd[1]: Stopped Flush Journal to Persistent Storage.
[ 2438.831125] systemd[1]: Stopping Flush Journal to Persistent Storage...
[ 2438.837816] systemd[1]: Stopped Journal Service.
[ 2438.854696] systemd[1]: Starting Journal Service...
[ 2438.879401] systemd-journald[1076]: File /run/log/journal/cb127692502e4409a9c6df5312633e9e/system.journal cor.
[ 2438.940136] systemd[1]: Started Journal Service.
[ 2439.240013] systemd-coredump[1074]: Detected coredump of the journal daemon itself, diverted to /var/lib/syst

  • Hi,

    H/W module can only be accessed when its functional and is running.

    Most of TI driver follow runtime power management. CAL is one of those driver. Its register can only be access while the
    hardware is active, otherwise the functional is turned off and the register are not-accessible.

    To use devmem2 on CAL for instance, you would need to start a capture using your favorite application and while it is
    running and then you could access the registers using devmem2.