Hi @sahil.tx, @ToradexAI
Thanks for your response
First, I’d like to focus on getting the ADC value printed. After that, I’ll proceed with implementing RPMsg to transfer the data to the A7 core.
So far, I have created the DTS file.
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2020-2021 Toradex
*/
// Disable UART2, aka UART_B on the Colibri iMX7
/dts-v1/;
/plugin/;
/ {
compatible = "toradex,colibri-imx7d",
"toradex,colibri-imx7d-emmc",
"toradex,colibri-imx7s";
};
&uart2 {
status = "disabled";
};
/* Colibri AD0 to AD3 */
&adc1 {
status = "disabled";
};
got this dtbo using dtc compiler then copied to /boot/overlays directory
and then i added this overlays.txt
Then, I ran the following commands:
ext4ls mmc 0:2 /root
setenv load_cmd "ext4load mmc 0:2"
setenv m4image "/root/adc_imx7d.elf"
setenv loadm4image "${load_cmd} ${loadaddr} ${m4image}"
setenv m4boot "${loadm4image}; dcache flush; bootaux ${loadaddr}"
run m4boot
and to run automatically on every boot
setenv bootcmd "run m4boot; $bootcmd}"
saveenv
reset
After this, in UART_A, I see a kernel panic log and the machine stops booting.
[ 1.403209] 5dc0: 00000000 00000000 00000 000 00000000
[ 1.411419] 5de0: 00000000 fffffffa 00000000 c228bec0 00000000 00000000 00000 000 1ce50d41
[ 1.419630] 5e00: 00000000 00000000 c2134810 c0f8ea78 00000000 c26529b8 c0e4d 834 c0e62da8
[ 1.427840] 5e20: 00000000 c06fd344 c2134810 00000000 c0f8ea78 00000000 c2652 9b8 c06fa78c
[ 1.436050] 5e40: c2134894 c070934c c2134810 c2134810 c0f8ea78 c2134810 00000 000 c06fab10
[ 1.444261] 5e60: 60000013 c0e4d834 c1004568 c0f8ea78 c2134810 00000000 c2652 9b8 c06fac98
[ 1.452471] 5e80: c2134810 c0f8ea78 c2134854 c223d000 c26529b8 c06faf0c 00000 000 c0f8ea78
[ 1.460681] 5ea0: c06fae34 c06f86c4 c0fc4000 c223d058 c228f234 1ce50d41 00000 000 c0f8ea78
[ 1.468892] 5ec0: c2652980 00000000 c223d000 c06f99d0 c0ccf324 00000006 c0f8e a78 c20d8000
[ 1.477102] 5ee0: 00000006 00000000 c0fc4000 c06fbe00 00000000 c20d8000 00000 006 c0e2f720
[ 1.485313] 5f00: c0e2f6fc c01014fc 000000ec c204ac26 c204ac2e 00000000 00000 000 00000000
[ 1.493522] 5f20: 00000000 00000000 00000000 00000000 00000000 00000000 00000 000 00000000
[ 1.501732] 5f40: 00000000 00000000 00000000 00000000 00000000 1ce50d41 c204a c00 000000ec
[ 1.509942] 5f60: c204ac00 00000006 c0d3e988 c0e4d854 c0e4d834 c0e012c0 00000 006 00000006
[ 1.518152] 5f80: 00000000 c0e004d0 c0f04d00 c0abd5dc 00000000 00000000 00000 000 00000000
[ 1.526362] 5fa0: 00000000 c0abd5f4 00000000 c010014c 00000000 00000000 00000 000 00000000
[ 1.534572] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000 000 00000000
[ 1.542781] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000 000 00000000
[ 1.550995] imx_uart_probe from platform_probe+0x5c/0xb0
[ 1.556438] platform_probe from really_probe+0xd0/0x3c8
[ 1.561792] really_probe from __driver_probe_device+0x8c/0x1e4
[ 1.567757] __driver_probe_device from driver_probe_device+0x30/0xc0
[ 1.574243] driver_probe_device from __driver_attach+0xd8/0x1b0
[ 1.580295] __driver_attach from bus_for_each_dev+0x7c/0xcc
[ 1.585999] bus_for_each_dev from bus_add_driver+0xf0/0x214
[ 1.591700] bus_add_driver from driver_register+0x7c/0x114
[ 1.597317] driver_register from imx_uart_init+0x24/0x40
[ 1.602766] imx_uart_init from do_one_initcall+0x58/0x23c
[ 1.608296] do_one_initcall from kernel_init_freeable+0x1f0/0x24c
[ 1.614518] kernel_init_freeable from kernel_init+0x18/0x130
[ 1.620305] kernel_init from ret_from_fork+0x14/0x28
[ 1.625390] Exception stack(0xf0825fb0 to 0xf0825ff8)
[ 1.630465] 5fa0: 00000000 00000000 00000 000 00000000
[ 1.638675] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000 000 00000000
[ 1.646883] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 1.653527] Code: ebea8db5 e5943008 e5838080 e5938084 (f57ff04f)
[ 1.659648] ---[ end trace 0000000000000000 ]---
[ 1.664284] note: swapper/0[1] exited with irqs disabled
[ 1.669744] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00 00000b
[ 1.677444] CPU1: stopping
[ 1.677455] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 6.6.95 -7.3.0 #1
[ 1.677469] Hardware name: Freescale i.MX7 Dual (Device Tree)
[ 1.677482] unwind_backtrace from show_stack+0x10/0x14
[ 1.677522] show_stack from dump_stack_lvl+0x40/0x4c
[ 1.677550] dump_stack_lvl from do_handle_IPI+0xe8/0x110
[ 1.677570] do_handle_IPI from ipi_handler+0x18/0x20
[ 1.677588] ipi_handler from handle_percpu_devid_irq+0x78/0x134
[ 1.677615] handle_percpu_devid_irq from handle_irq_desc+0x50/0x80
[ 1.677646] handle_irq_desc from gic_handle_irq+0x64/0x78
[ 1.677668] gic_handle_irq from generic_handle_arch_irq+0x34/0x44
[ 1.677689] generic_handle_arch_irq from call_with_stack+0x18/0x20
[ 1.677719] call_with_stack from __irq_svc+0x98/0xc8
[ 1.677739] Exception stack(0xf08edf58 to 0xf08edfa0)
[ 1.677749] df40: 00000 003 00000001
[ 1.677762] df60: 00001c8c 40000000 c20e1b00 00000001 c0f04d54 c0f04d9c 00000 000 00000000
[ 1.677775] df80: 00000000 00000000 0000b50e f08edfa8 c0abc8c4 c0abd300 60000 013 ffffffff
[ 1.677783] __irq_svc from default_idle_call+0x2c/0x30
[ 1.677804] default_idle_call from do_idle+0x208/0x290
[ 1.677836] do_idle from cpu_startup_entry+0x28/0x2c
[ 1.677866] cpu_startup_entry from secondary_start_kernel+0x11c/0x140
[ 1.677891] secondary_start_kernel from 0x80101320
[ 1.807023] ---[ end Kernel panic - not syncing: Attempted to kill init! exit code=0x0000000b ]---
machine not booting after this
and
In UART_B, I see repeated output:
Current analog value: fv
Current analog value: fv
Current analog value: fv
Current analog value: fv
Current analog value: fv
Current analog value: fv
Current analog value: fv
Current analog value: fv
Current analog value: fv
Current analog value: fv
Current analog value: fv
I assumed this is ok
now i connected potentiometer now also i ma getting the same value connected to sodimm pin 2
My question is: why is the machine failing to boot after these changes?
and why i am not reading any value
Thanks & regards,
Uday