Go to advanced search

by cleverca22
Sun Sep 26, 2021 7:22 am
Forum: Troubleshooting
Topic: Pi 4 - Boot to USB requires SD card
Replies: 1
Views: 34

Re: Pi 4 - Boot to USB requires SD card

what does "vcgencmd bootloader_config" say the BOOT_ORDER is?
by cleverca22
Sun Sep 26, 2021 6:14 am
Forum: Advanced users
Topic: /proc/device-tree/soc/ranges documentation
Replies: 1
Views: 64

Re: /proc/device-tree/soc/ranges documentation

https://www.devicetree.org/specifications/ and from my own comments on a dts file: / { #address-cells = <0x01>; #size-cells = <0x01>; soc { compatible = "simple-bus"; #address-cells = <0x01>; #size-cells = <0x01>; // child parent length ranges = <0x7e000000 0x3f000000 0x1000000 /* map the ...
by cleverca22
Sun Sep 26, 2021 5:37 am
Forum: Troubleshooting
Topic: I2C works only once
Replies: 1
Views: 31

Re: I2C works only once

what does "ls -l /sys/bus/i2c/devices/" return on your system?

i suspect it may be confusion from the i2c mux
by cleverca22
Sun Sep 26, 2021 5:26 am
Forum: Automation, sensing and robotics
Topic: Hardware suggestions for battery monitoring
Replies: 24
Views: 504

Re: Hardware suggestions for battery monitoring

what I really need is a means to measure the potential difference between 2 points, rather than an input and ground. I've yet to find an affordable ADC that does that. ive seen teardowns of electric car battery packs on youtube before, and those need to solve basically the same problem, with 300v b...
by cleverca22
Sat Sep 25, 2021 8:25 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: unicam driver null pointer dereference
Replies: 14
Views: 208

Re: unicam driver null pointer dereference

[root@nixos:~]# yavta --capture=10 /dev/video0 Device /dev/video0 opened. Device `unicam' on `platform:3f801000.csi' (driver 'unicam') supports video, capture, without mplanes. Video format: SBGGR10P (41414270) 640x480 (stride 800) field none buffer size 384000 8 buffers requested. length: 384000 o...
by cleverca22
Sat Sep 25, 2021 7:57 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: unicam driver null pointer dereference
Replies: 14
Views: 208

Re: unicam driver null pointer dereference

CAMCTL bit 2 is the peripheral reset CAMCTL Bit 0 is the master enable for the block. based on that, i dug around a bit in the linux driver, and found that unicam_disable() both does a full reset, and disables the peripheral it is already called from unicam_stop_streaming(), which implies that the ...
by cleverca22
Sat Sep 25, 2021 7:51 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: unicam driver null pointer dereference
Replies: 14
Views: 208

Re: unicam driver null pointer dereference

[ 441.947976] R 0x100 -> 0x1 UNICAM_ICTL [ 441.950713] initial ICTL: 0x1 [ 441.953690] R 0x200 -> 0x104 UNICAM_DCS [ 441.956594] R 0x300 -> 0x0 UNICAM_DBCTL [ 441.959400] R 0x2c -> 0x0 UNICAM_CMP0 [ 441.962040] R 0x30 -> 0x100 UNICAM_CMP1 [ 441.964861] W 0x100 <- 0x0 UNICAM_ICTL [ 441.967617] W 0x2...
by cleverca22
Sat Sep 25, 2021 7:43 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: unicam driver null pointer dereference
Replies: 14
Views: 208

Re: unicam driver null pointer dereference

[ 395.848310] R 0x100 -> 0x1 [ 395.851044] initial ICTL: 0x1 [ 395.854028] W 0x100 <- 0x0 [ 395.856757] R 0x100 -> 0x0 [ 395.859564] post-zero ICTL: 0x0 [ 395.867850] R 0x4 -> 0x2ac000 [ 395.870848] W 0x4 <- 0x2ac000 [ 395.873819] R 0x104 -> 0x7 [ 395.876529] W 0x104 <- 0x7 [ 395.879238] ISR: ISTA:...
by cleverca22
Sat Sep 25, 2021 7:25 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: unicam driver null pointer dereference
Replies: 14
Views: 208

Re: unicam driver null pointer dereference

nixos login: [ 70.602878] initial ICTL: 0x1 [ 70.605930] ISR: ISTA: 0x7, STA: 0x12AC000, sequence 0, lines done 0 [ 70.612296] not initialized yet!? [ 70.615628] ISR: ISTA: 0x5, STA: 0x12A4000, sequence 0, lines done 0 [ 70.621989] not initialized yet!? nope, pre-zeroing ICTL (after its print) does...
by cleverca22
Sat Sep 25, 2021 7:17 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: unicam driver null pointer dereference
Replies: 14
Views: 208

Re: unicam driver null pointer dereference

[ 1770.690275] initial ICTL: 0x1 from: 2850 /* set the driver data in platform device */ 2851 platform_set_drvdata(pdev, unicam); 2852 2853 ret = of_unicam_connect_subdevs(unicam); 2854 if (ret) { 2855 dev_err(&pdev->dev, "Failed to connect subdevs\n"); 2856 goto err_media_unregister;...
by cleverca22
Sat Sep 25, 2021 6:50 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: unicam driver null pointer dereference
Replies: 14
Views: 208

Re: unicam driver null pointer dereference

[ 197.572562] ISR: ISTA: 0x5, STA: 0x2A4000, sequence 0, lines done 0 [ 197.578836] not initialized yet!? [ 197.582173] ISR: ISTA: 0x5, STA: 0x2A4000, sequence 0, lines done 0 [ 197.588447] not initialized yet!? i added a bool to the main "struct unicam_device" to stop it from doing too m...
by cleverca22
Sat Sep 25, 2021 5:16 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: unicam driver null pointer dereference
Replies: 14
Views: 208

Re: unicam driver null pointer dereference

ah, found an openocd command to read by physical addr, bypassing the MMU (gdb) monitor mdw phys 0x3f801000 0x3f801000: 00001210 UNICAM_CTRL 0x3f801004: 002a4000 UNICAM_STA 0x3f801008: 00000406 UNICAM_ANA 0x3f80100c: 00000010 UNICAM_PRI 0x3f801104: 00000005 UNICAM_ISTA and then cross-referencing the ...
by cleverca22
Sat Sep 25, 2021 3:15 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: unicam driver null pointer dereference
Replies: 14
Views: 208

Re: unicam driver null pointer dereference

(gdb) set $pc=0x28 (gdb) break unicam_isr Breakpoint 1 at 0xc0640d78: file ../drivers/media/platform/bcm2835/bcm2835-unicam.c, line 800. (gdb) c Continuing. ^Crpi2.a7.0 rev 5, partnum c07, arch f, variant 0, implementor 41 Program received signal SIGINT, Interrupt. __arch_counter_get_cntvct () at ....
by cleverca22
Sat Sep 25, 2021 12:42 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: unicam driver null pointer dereference
Replies: 14
Views: 208

Re: unicam driver null pointer dereference

i did try booting with "bcm2835-unicam.debug=3" but that didnt produce any useful logs i suspect the reason is that it used request_threaded_irq(), so the unicam_isr() is ran in a thread but the backtrace says otherwise... i'll see if i can get mode details out of things, either jtag or pr...
by cleverca22
Sat Sep 25, 2021 4:59 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: unicam driver null pointer dereference
Replies: 14
Views: 208

unicam driver null pointer dereference

i tried spinning up the unicam driver on my pi2 today, with the open firmware, only to discover it has a null-pointer deference in it [ 1.232720] 8<--- cut here --- [ 1.235911] Unable to handle kernel NULL pointer dereference at virtual address 00000028 [ 1.244275] pgd = (ptrval) [ 1.247081] [000000...
by cleverca22
Sat Sep 25, 2021 3:56 am
Forum: Troubleshooting
Topic: Pi goes bust when I connect camera on DSI
Replies: 5
Views: 170

Re: Pi goes bust when I connect camera on DSI

also, the camera goes on the CSI port

DSI is for displays
by cleverca22
Sat Sep 25, 2021 3:53 am
Forum: General discussion
Topic: Missing RAM?
Replies: 9
Views: 252

Re: Missing RAM?

Peripheral address space thats about 32mb i think, and with the pi4's 64bit addr space, it should be far easier to not loose ram to that let me repeat the math on a 2nd machine, where i know the context far far better... // add mmio mapBusToArm(0x7e000000, 0x20000000); mapBusToArm(0x7e000000, 0x3f0...
by cleverca22
Sat Sep 25, 2021 3:41 am
Forum: General discussion
Topic: Missing RAM?
Replies: 9
Views: 252

Re: Missing RAM?

[root@netboot-1:~]# dmesg | grep Memory [ 0.000000] Memory: 3762552K/4050944K available (12928K kernel code, 2296K rwdata, 4944K rodata, 4480K init, 1356K bss, 222856K reserved, 65536K cma-reserved) > 4050944/1024 3956 > 3956 + 76 4032 according to that, linux has 3956mb of ram, plus the 76mb from ...
by cleverca22
Sat Sep 25, 2021 3:33 am
Forum: General discussion
Topic: Missing RAM?
Replies: 9
Views: 252

Re: Missing RAM?

[root@netboot-1:~]# vcgencmd get_mem arm arm=948M [root@netboot-1:~]# vcgencmd get_mem gpu gpu=76M this says that within the lower 1gig of ram, 948mb goes to linux, and 76mb goes to the gpu firmware everything beyond that lower 1gig, is dedicated entirely to linux [root@netboot-1:~]# free -m total ...
by cleverca22
Fri Sep 24, 2021 7:07 am
Forum: Troubleshooting
Topic: Raspberry pi 4 won't boot after a immediate restart/shutdown
Replies: 28
Views: 497

Re: Raspberry pi 4 won't boot after a immediate restart/shutdown

ive seen very similar errors when the card is not even in the pi

i'm thinking its an issue with the sd card, and power-cycling JUST the card would fix it
hence removing it, and re-inserting it, while its looping
by cleverca22
Fri Sep 24, 2021 6:04 am
Forum: Troubleshooting
Topic: Raspberry pi 4 won't boot after a immediate restart/shutdown
Replies: 28
Views: 497

Re: Raspberry pi 4 won't boot after a immediate restart/shutdown

its failing to detect the SD card

while its looping like that, try taking the SD card out, and then put it back in?
by cleverca22
Fri Sep 24, 2021 5:59 am
Forum: General discussion
Topic: html to image on a Pi Zero W
Replies: 10
Views: 253

Re: html to image on a Pi Zero W

I'm using scrot all the time for taking screenshots. Also works with no display attached and even if the physical display doesn't work but a 'framebuffer' has been created correctly (i.e. When trying to bring-up DSI displays). i also recently discovered that i can just `cat /dev/fb0 > raw.bin` and ...
by cleverca22
Fri Sep 24, 2021 5:23 am
Forum: C/C++
Topic: SPI initialization of Raspberry pi 4
Replies: 1
Views: 70

Re: SPI initialization of Raspberry pi 4

its recommended to use the proper SPI api in linux now, enable it with a dtoverlay, and then use an SPI library that just opens a node like /dev/spi0.0

direct hw access can cause stability issues
by cleverca22
Thu Sep 23, 2021 2:25 pm
Forum: Raspberry Pi 400
Topic: Pi400 HDMI connection issues
Replies: 6
Views: 208

Re: Pi400 HDMI connection issues

Joop99 wrote:
Thu Sep 23, 2021 2:18 pm
As you have a pi4 you should know how to insert the micro sd card. You have to push it into the slot all the way until you here it click.
of note, only the pi2 and pi400 click like that

the pi4 does not make a click when fully inserted
by cleverca22
Thu Sep 23, 2021 4:25 am
Forum: General programming discussion
Topic: Divide instruction missing on Pi4 aarch32?
Replies: 8
Views: 303

Re: Divide instruction missing on Pi4 aarch32?

using a compiler flag fixes 32-bit division but not 64-bit division. For 64-bit division a library call always needs to be made when running in 32-bit mode. However, on Raspberry Pi OS that library call is made to the same ARMv6 compatible 64-bit division routine no matter what compiler options are...

Go to advanced search