Go to advanced search

by rudiratlos
Tue Apr 10, 2018 8:14 am
Forum: C/C++
Topic: api to firmware
Replies: 16
Views: 1864

Re: api to firmware

whould be really nice, if someone could supply a working c code.
I've spent days to get it working, with no luck. I'm the maintainer of rpi_hal (free pascal library) and want to include mailbox api to the library.
Looks like that I have problems in my memory mapping from ARM <-> core.
by rudiratlos
Mon Apr 09, 2018 2:46 pm
Forum: C/C++
Topic: api to firmware
Replies: 16
Views: 1864

Re: api to firmware

currently I'm already using vcgencmd and/or cat /sys/devices/virtual/thermal/thermal_zone0/temp
but these commands will access the OS level and this takes to long. I want to have direct mailbox access.
by rudiratlos
Sat Apr 07, 2018 4:59 pm
Forum: C/C++
Topic: api to firmware
Replies: 16
Views: 1864

Re: api to firmware

is there a good guy that can provide a working complete source code?
by rudiratlos
Fri Mar 23, 2018 2:54 pm
Forum: C/C++
Topic: api to firmware
Replies: 16
Views: 1864

Re: api to firmware

can someone so kind, to write a small c program (similar to LDB's), that retrieves the mailbox with SoC Temperature Tag. so I can run it on my rpi3 for further investigation.
by rudiratlos
Fri Mar 23, 2018 2:50 pm
Forum: C/C++
Topic: api to firmware
Replies: 16
Views: 1864

Re: api to firmware

Hi, I was successful in using rpi3-gpiovirtbuf. My new challange I don't get the API example from LdB to work. my ram mapping is: VCmem (size): 0x04C00000 79691776 Bytes @ 0x3B400000 ARMmem(size): 0x3B400000 994050048 Bytes @ 0x00000000 mailbox_read get a timeout. I think that I'm offering the wrong...
by rudiratlos
Fri Feb 16, 2018 12:59 pm
Forum: C/C++
Topic: api to firmware
Replies: 16
Views: 1864

Re: api to firmware

i can get the info for the actual temp and maxtemp value through the firmware api.
But I couldn't find to retrieve:
wlan signal strenth
gpu temperature
reset hw watchdog

how to get these infos?
by rudiratlos
Thu Feb 15, 2018 2:15 pm
Forum: C/C++
Topic: api to firmware
Replies: 16
Views: 1864

Re: api to firmware

thanks, https://github.com/6by9/rpi3-gpiovirtbuf thats exactly what I'm looking for. but I couldn't find a tag for mac addr of wlan adapter, gpu temperature ... from where can I get these missing infos? querying from the os like /opt/vc/bin/vcgencmd measure_temp|awk -F "=" '{print $2}' is to time co...
by rudiratlos
Tue Feb 13, 2018 8:06 pm
Forum: C/C++
Topic: api to firmware
Replies: 16
Views: 1864

api to firmware

can anyone supply an example which uses the firmware.
e.g. ask the firmware for revision info, cpu temerature...

thnx,
sf
by rudiratlos
Tue Feb 13, 2018 2:40 pm
Forum: Raspbian
Topic: base addr of hw watchdog ?
Replies: 1
Views: 207

Re: base addr of hw watchdog ?

I'm also interessted, to access the cpu and gpu temperature register directly and not via userspace e.g. /sys/class/thermal/thermal_zone0/temp
by rudiratlos
Tue Feb 13, 2018 12:34 am
Forum: Raspbian
Topic: base addr of hw watchdog ?
Replies: 1
Views: 207

base addr of hw watchdog ?

Hi,
there is a hw watchdog register, but I couldn't find the register address in the arm peripherals documention.

the hw watchdog can be accessed via the userspace device ( /dev/watchdog ), but I want to have direct access to the hw watchog register in my program.

sf
by rudiratlos
Fri Nov 17, 2017 2:58 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: spi test doesn't work anymore
Replies: 1
Views: 326

spi test doesn't work anymore

Hi, wanted to test spiloopback (MISO shorted with MOSI). but it's not working anymore. couldn't remember which raspian version changed it. https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md output: # ./spidev_test -D /dev/spidev0.0 spi mode: 0 bits per word: 8 max speed: 50...
by rudiratlos
Wed Nov 15, 2017 4:19 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: rpi3 I2C baudrate is only 250kHz, but should 400kHz???
Replies: 1
Views: 835

Re: rpi3 I2C baudrate is only 250kHz, but should 400kHz???

setting dtparam=i2c_baudrate=640000 on a RPI3B will result in a 400kHz I2C ClockFreq. Also found a more detailed german article, which describes this problem also. We have different dtparam setting for different RPI boards (Pi3/PI3/PiZeroW): http://forum.weihenstephan.org/forum/phpBB3/viewtopic.php?...
by rudiratlos
Tue Nov 14, 2017 5:54 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: rpi3 I2C baudrate is only 250kHz, but should 400kHz???
Replies: 1
Views: 835

rpi3 I2C baudrate is only 250kHz, but should 400kHz???

Hi, I just wanted to test my new logic analyzer on my rpi3 model B V1.2. raspian 4.9.57-v7+ #1045 SMP Fri Oct 20 11:44:49 BST 2017 armv7l GNU/Linux Connected SDA1 and SCL1 and ground (Pins 3,5,6). in /boot/config.txt I have dtparam=i2c_baudrate=400000 just did a i2cdetect -y 1 and get some clock dat...
by rudiratlos
Sun Nov 12, 2017 12:01 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: how do I do multiple I2C IOs in one transfer?
Replies: 5
Views: 701

Re: how do I do multiple I2C IOs in one transfer?

can no on answer?
Is this not possible (multiple reads on different i2c-addrs in one IO)?
by rudiratlos
Fri Nov 10, 2017 6:12 pm
Forum: Device Tree
Topic: OS command to ReRead/refresh HAT Info
Replies: 1
Views: 649

OS command to ReRead/refresh HAT Info

Hi,
I'm overwriting the HAT EEprom on I2C-Addr 0x50 with new infos.
but in the HAT tree ( /proc/device-tree/hat/ ) are the old infos.

Is there a OS command, to reload this info to the tree?

If I reboot, the new info is available. I try to avoid a reboot.
by rudiratlos
Thu Nov 09, 2017 11:55 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: how do I do multiple I2C IOs in one transfer?
Replies: 5
Views: 701

Re: how do I do multiple I2C IOs in one transfer?

using:
pigpiod
pigs i2co 1 0x70 0
pigs i2co 1 0x71 0

pigs i2cz 0 4 0x70 6 2 0
-> 2 6 105 (works)

error with two sensors:
pigs i2cz 0 4 0x70 6 2 4 0x71 6 2 0
ERROR: an I2C transaction segment failed
-106
by rudiratlos
Wed Nov 08, 2017 7:52 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: how do I do multiple I2C IOs in one transfer?
Replies: 5
Views: 701

Re: how do I do multiple I2C IOs in one transfer?

thanks for the hints, i've implemented i2csegments, and tried it with 2 sensors, where I want to read 2 bytes each. But it faild with the errno (95) Operation not supported on transport endpoint. if i try it with one sensor, it's ok. 1. addr:0x70 ptr:0x00125E15 len: 2 flags:0x0001 2. addr:0x71 ptr:0...
by rudiratlos
Tue Nov 07, 2017 9:13 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: how do I do multiple I2C IOs in one transfer?
Replies: 5
Views: 701

how do I do multiple I2C IOs in one transfer?

Hi, I have 4 sensors which deliver pressuredata in 2Bytes each. Each sensor has a unique i2cadr like: 0x71 0x72 0x73 and 0x74. in a sequential order, I read each sensor in a single IO. With a protocol analzer, I can see that each IO (3Bytes: ADR data1 data2) takes around 120mikrosecs. Before the nex...
by rudiratlos
Tue Mar 21, 2017 1:41 pm
Forum: Raspbian
Topic: change SPI Speed
Replies: 5
Views: 2098

Re: change SPI Speed

thank you. Just sent some bytes over SPI-Bus and measured transfertime. It's exactly what you've described. SPI_IOC_WR_MAX_SPEED_HZ sets the speed device specific, regardless whats defined in spi-max-frequency. There is no need to set the divider value in SPI0_CLK. It's done by the SPI routine itsel...
by rudiratlos
Tue Mar 21, 2017 9:43 am
Forum: Raspbian
Topic: change SPI Speed
Replies: 5
Views: 2098

Re: change SPI Speed

not clear to me until now. xxd -pd /sys/class/spidev/spidev0.0/device/of_node/spi-max-frequency shows 0x0007a120 -> 500kHz If I set the speed for a device with ioctl(spi_fd,SPI_IOC_WR_MAX_SPEED_HZ,<newspeed e.g. 10Mhz>); and if I read the speed back with SPI_IOC_RD_MAX_SPEED_HZ ,I can see that the s...
by rudiratlos
Mon Mar 20, 2017 1:00 pm
Forum: Raspbian
Topic: change SPI Speed
Replies: 5
Views: 2098

change SPI Speed

Hello, what's the supported method for kernel 4.9, to change spi speed? Simply write a Hex value into: /sys/class/spidev/spidev0.0/device/of_node/spi-max-frequency ? I read that a clock divider has to be used (see https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md ). Is the...
by rudiratlos
Sun Mar 19, 2017 3:42 pm
Forum: Raspbian
Topic: i2c speed
Replies: 6
Views: 1604

Re: i2c speed

is that xxd /sys/class/spidev/spidev0.0/device/of_node/spi-max-frequency ?
by rudiratlos
Sun Mar 19, 2017 3:38 pm
Forum: Raspbian
Topic: i2c speed
Replies: 6
Views: 1604

Re: i2c speed

is there also a command to get the spi bus speed for newer kernel?
by rudiratlos
Wed Mar 08, 2017 10:58 pm
Forum: Raspbian
Topic: i2c speed
Replies: 6
Views: 1604

Re: i2c speed

Thanks for this hint. Is it possible that you post an example, to get via xxd a readable value.
by rudiratlos
Tue Mar 07, 2017 4:24 pm
Forum: Other programming languages
Topic: rpi-hal for Free Pascal
Replies: 8
Views: 3448

Re: rpi-hal for Free Pascal

Hi,
just uploaded a new Version (V4.4) of rpi_hal to github: https://github.com/rudiratlos/rpi-hal
rpi-hal supports new kernel V 4.9

Go to advanced search