Kernel Panic: NULL pointer dereference

Hello,

I do have a Problem booting my BeagleBone with a custom cape on. I already double checked my layout, i did not use any pins marked with mmc1 in the pintables of the system reference manual.

It will not boot if the cape is on. If I just plug in P9-Capeheader, it does boot. If I plug in the cape when the bone is up, it works.

For my PinOut I used http://exploringbeaglebone.com/wp-content/uploads/resources/BBBP8Header.pdf from Derek Molloy and I didn’t touch any of the marked pins but those “allocated for HDMI”. I suppose the Problem might be there, though I disable the HDMI in the uEnv.txt.

On P8 I use the following Pins:
11,14,15,16,17,19,31,32,33,34,35,37,38,45

Here’s the dump of a Startup with the cape on:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2016.05.27 14:28:54 =~=~=~=~=~=~=~=~=~=~=~=
@uiP#!…W%ZDŒXFPF©U

ü

U-Boot 2015.01-00001-gb2412df (Jan 29 2015 - 15:01:06), Build: jenkins-github_Bootloader-Builder-105

Watchdog enabled
I2C: ready
DRAM: 512 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

Net: not set. Validating first E-fuse MAC

cpsw
Hit any key to stop autoboot: 1 0
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
Card did not respond to voltage select!
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
switch to partitions #0, OK
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt …
Checking for: /boot.scr …
Checking for: /boot/boot.scr …
Checking for: /boot/uEnv.txt …
gpio: pin 55 (gpio 55) value is 1
829 bytes read in 15 ms (53.7 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt…
gpio: pin 56 (gpio 56) value is 1
Running uname_boot …
loading /boot/vmlinuz-3.8.13-xenomai-r72 …
5741824 bytes read in 336 ms (16.3 MiB/s)
loading /boot/dtbs/3.8.13-xenomai-r72/am335x-boneblack.dtb …
26098 bytes read in 33 ms (771.5 KiB/s)
loading /boot/initrd.img-3.8.13-xenomai-r72 …
2286742 bytes read in 148 ms (14.7 MiB/s)
debug: [console=ttyO0,115200n8 capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN root=UUID=cf28a3f6-fcae-4d49-9887-f565a8bfbfaf ro rootfstype=ext4 rootwait fixrtc quiet init=/lib/systemd/systemd] …
debug: [bootz 0x82000000 0x88080000:22e496 0x88000000] …
Kernel image @ 0x82000000 [ 0x000000 - 0x579d00 ]

Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Loading Ramdisk to 8fdd1000, end 8ffff496 … OK
Loading Device Tree to 8fdc7000, end 8fdd05f1 … OK

Starting kernel …

Uncompressing Linux… done, booting the kernel.
[ 0.359272] omap2_mbox_probe: platform not supported
[ 0.565509] tps65217-bl tps65217-bl: no platform data provided
[ 0.631529] bone-capemgr bone_capemgr.9: slot #0: No cape found
[ 0.666684] bone-capemgr bone_capemgr.9: slot #1: No cape found
[ 0.701838] bone-capemgr bone_capemgr.9: slot #2: No cape found
[ 0.736994] bone-capemgr bone_capemgr.9: slot #3: No cape found
[ 0.757699] omap_hsmmc mmc.5: of_parse_phandle_with_args of ‘reset’ failed
[ 0.821243] pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 44e10800.pinmux; cannot claim for gpio-leds.8
[ 0.835783] pinctrl-single 44e10800.pinmux: pin-21 (gpio-leds.8) status -22
[ 0.844867] pinctrl-single 44e10800.pinmux: could not request pin 21 on device pinctrl-single
[ 0.929572] Unable to handle kernel NULL pointer dereference at virtual address 0000006c
[ 0.940154] pgd = c0004000, hw pgd = de198000
[ 0.945818] [0000006c] *pgd=00000000
[ 0.950483] Internal error: Oops: 5 [#1] THUMB2
[ 0.956352] Modules linked in:
[ 0.960314] CPU: 0 Not tainted (3.8.13-xenomai-r72 #1)
[ 0.967446] PC is at inode_sb_list_add+0x14/0x34
[ 0.973431] LR is at inode_sb_list_add+0xd/0x34
[ 0.979305] pc : [] lr : [] psr: 60000033
[ 0.979305] sp : df06fec8 ip : c09c63c0 fp : 00000000
[ 0.994192] r10: c087f6dc r9 : 00000000 r8 : 00000000
[ 1.000964] r7 : de99ac68 r6 : 000041ed r5 : c08caf2c r4 : de99aad0
[ 1.009428] r3 : 00000000 r2 : 00000000 r1 : de99ab90 r0 : c08caf2c
[ 1.017892] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA Thumb Segment kernel
[ 1.027594] Control: 50c5387d Table: 9e198019 DAC: 00000015
[ 1.035042] Process swapper (pid: 1, stack limit = 0xdf06e238)
[ 1.042605] Stack: (0xdf06fec8 to 0xdf070000)
[ 1.048253] fec0: 00000000 de99aad0 de999e30 c0109f7b de999e30 c01d865b
[ 1.058861] fee0: ac677448 00000007 de996250 de999e30 000001ed de99ac68 00000000 00000105
[ 1.069470] ff00: c087f6dc c01d87d7 00000000 00000000 00000000 df06e000 c090bdc0 00000000
[ 1.080078] ff20: c0864531 c01d88a1 00000000 c09d38b0 c09d38b0 c0864549 c086c750 df06e000
[ 1.090685] ff40: c090bdc0 c0008737 00000007 00000007 c08bf700 c086c74c c086c750 00000007
[ 1.101294] ff60: c086c730 c090bdc0 c0847171 c087f6dc 00000000 c0847643 00000007 00000007
[ 1.111905] ff80: c0847171 df04e580 00000000 c0505565 00000000 00000000 00000000 00000000
[ 1.122512] ffa0: 00000000 c050556b 00000000 c000ca3b 00000000 00000000 00000000 00000000
[ 1.133120] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.143724] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 1.154353] [] (inode_sb_list_add+0x14/0x34) from [] (new_inode+0xf/0x14)
[ 1.165424] [] (new_inode+0xf/0x14) from [] (debugfs_mknod.part.12.constprop.14+0x17/0xd8)
[ 1.178405] [] (debugfs_mknod.part.12.constprop.14+0x17/0xd8) from [] (__create_file+0xbb/0x134)
[ 1.192060] [] (__create_file+0xbb/0x134) from [] (debugfs_create_dir+0x15/0x18)
[ 1.203925] [] (debugfs_create_dir+0x15/0x18) from [] (clk_debug_init+0x19/0x78)
[ 1.215779] [] (clk_debug_init+0x19/0x78) from [] (do_one_initcall+0x1f/0x100)
[ 1.227414] [] (do_one_initcall+0x1f/0x100) from [] (kernel_init_freeable+0xb7/0x148)
[ 1.239837] [] (kernel_init_freeable+0xb7/0x148) from [] (kernel_init+0x7/0x98)
[ 1.251585] [] (kernel_init+0x7/0x98) from [] (ret_from_fork+0x13/0x38)
[ 1.262421] Code: 69e2 f104 01c0 4613 (f853) 0f6c
[ 1.268682] —[ end trace 7cf44bf14a6ec482 ]—
[ 1.274742] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 1.274742]

How can i fix this issue?

Thank you very much in advance!

UPDATE: Once it is started, I can reboot without a problem, as long as power is not cut.

Can you provide a schematic for your cape?

Sorry I cannot supply the schematic.

But I can give you the function of the Pins.
As P9 is working fine, I’ll give you P8:

11: Input, theres a Button attached
14: Input, LM339 attached.
15: "
16: "
17: "
19: Output
31: Input, LM339 attached
32: Input, LM339 attached
33: Input, LM339 attached
34: Output
35: Input, LM339 attached
37: Serial Device attached
38: Serial Device attached
45: Output

PROBLEM SOLVED:

Using the Pins 31 to 46 on P8 with external Pullups causes the BBB to change it’s startupsequence! You can use them after boot is finished.