Go to advanced search

by PhilE
Fri Mar 04, 2016 9:23 pm
Forum: Device Tree
Topic: Overlay to remap Pi 3 UART
Replies: 126
Views: 123441

Re: Overlay to remap Pi 3 UART

Yes, setting core_freq=250 should eliminate any UART glitching. It will also limit the VPU compute resource, which will mainly affect the new high quality analogue audio output, and could slightly increase the lifetime of the Pi (if there is any change at all).
by PhilE
Fri Mar 04, 2016 6:02 pm
Forum: Device Tree
Topic: Overlay to remap Pi 3 UART
Replies: 126
Views: 123441

Re: Overlay to remap Pi 3 UART

@abelectronicsuk The next firmware release, due tonight, will included improved serial port alias handling: 1) It will search for any existing "serial0" in the DT, allowing the pi3-disable-bt alias to also disable the remapping. 2) It now searches for "=serial0", "=ttyAMA0" etc. instead of "config=....
by PhilE
Thu Mar 03, 2016 9:55 pm
Forum: Device Tree
Topic: device tree overlays and U-Boot
Replies: 32
Views: 15946

Re: device tree overlays and U-Boot

That would be true on a system with a 1/3 kernel/user split, but we use a 2/2 split so it's all low mem.
by PhilE
Thu Mar 03, 2016 5:56 pm
Forum: Device Tree
Topic: Overlay to remap Pi 3 UART
Replies: 126
Views: 123441

Re: Overlay to remap Pi 3 UART

I have seen corruption on ttyS0 on my Pi3, but then I noticed that the red LED was flickering due to under-voltage. This triggers a clock speed reduction. Upgrading to a better supply (2.5A) has solved that problem for me.
by PhilE
Thu Mar 03, 2016 1:58 pm
Forum: Device Tree
Topic: device tree overlays and U-Boot
Replies: 32
Views: 15946

Re: device tree overlays and U-Boot

The DTB start address is size dependent. The aim is to copy the DTB as high as possible. Once the kernel starts it will "unflatten" the DTB into allocated memory and then re-use the space. 1 ARM memory starts at 0 in the VPU physical address space. The GPU memory sits at the top. This is how it work...
by PhilE
Thu Mar 03, 2016 11:24 am
Forum: Device Tree
Topic: device tree overlays and U-Boot
Replies: 32
Views: 15946

Re: device tree overlays and U-Boot

The code to load the DTB high is not conditional on its size. Making it so is possible, but it would mean that some problems would only be detected when the DTB reaches the threshold, and I much prefer systems to fail consistently.
by PhilE
Thu Mar 03, 2016 10:48 am
Forum: Device Tree
Topic: Why is start.elf loading my device tree to 0x17fed200?
Replies: 1
Views: 823

Re: Why is start.elf loading my device tree to 0x17fed200?

The slot at 0x100 is limited to just under 16KB (0x3f00), and there have been situations where the fully resolved DTB exceeds that. I modified the loader to remove that limit by putting the DTB at the end of memory, in the same way that the initramfs followkernel option does.
by PhilE
Thu Mar 03, 2016 10:45 am
Forum: Device Tree
Topic: device tree overlays and U-Boot
Replies: 32
Views: 15946

Re: device tree overlays and U-Boot

The slot at 0x100 is limited to just under 16KB (0x3f00), and there have been situations where the fully resolved DTB exceeds that. I modified the loader to remove that limit by putting the DTB at the end of memory, in the same way that the initramfs followkernel option does. You can force a specifi...
by PhilE
Thu Mar 03, 2016 10:13 am
Forum: Device Tree
Topic: DT overlay for I2C pin selection
Replies: 4
Views: 6602

Re: DT overlay for I2C pin selection

@6by9 submitted a pull request against rpi-4.4.y (https://github.com/raspberrypi/linux/pull/1316) and I merged it.
by PhilE
Thu Mar 03, 2016 10:12 am
Forum: Device Tree
Topic: Overlay for on/off push-button controller.
Replies: 40
Views: 22239

Re: Overlay for on/off push-button controller.

You're welcome. I expect the question will get back to me eventually.
by PhilE
Wed Mar 02, 2016 9:33 pm
Forum: Device Tree
Topic: Overlay to remap Pi 3 UART
Replies: 126
Views: 123441

Re: Overlay to remap Pi 3 UART

Try using console=serial1 in cmdline.txt. It will get mapped back to ttyAMA0. I'm working on a firmware update that will restore the original behaviour when the overlay is used, but for now this one weird trick is necessary.
by PhilE
Wed Mar 02, 2016 1:45 pm
Forum: Device Tree
Topic: Overlay to remap Pi 3 UART
Replies: 126
Views: 123441

Re: Overlay to remap Pi 3 UART

It works for me. Which distribution are you using, and how did you get to this point - clean install, upgrade etc.?
by PhilE
Wed Mar 02, 2016 12:19 pm
Forum: Device Tree
Topic: Overlay for on/off push-button controller.
Replies: 40
Views: 22239

Re: Overlay for on/off push-button controller.

That log looks perfectly normal. I was curious so I dug out an OpenElec card, tried the overlay and got the same result, i.e. no visible change in the requested pin. The driver appears to be loaded - /sys/devices/platform/power_ctrl exists, and doesn't if you don't use the overlay. The same configur...
by PhilE
Wed Mar 02, 2016 12:08 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: Optional interfaces (I2C, I2S, SPI) and Device Tree
Replies: 132
Views: 179550

Re: Optional interfaces (I2C, I2S, SPI) and Device Tree

The fact that /dev/i2c-1 is present shows that your software configuration is correct. You can confirm using raspi-gpio: sudo apt-get install raspi-gpio (if you don't have it already) raspi-gpio get You should see output that includes: GPIO 02: level=1 fsel=4 alt=0 func=SDA1 GPIO 03: level=1 fsel=4 ...
by PhilE
Wed Mar 02, 2016 11:05 am
Forum: Device Tree
Topic: Overlay to remap Pi 3 UART
Replies: 126
Views: 123441

Re: Overlay to remap Pi 3 UART

I've pushed the new overlay (pi3-disable-bt) to the rpi-4.1.y source tree. You can download a pre-built version here.
by PhilE
Wed Mar 02, 2016 9:56 am
Forum: Device Tree
Topic: Overlay to remap Pi 3 UART
Replies: 126
Views: 123441

Re: Overlay to remap Pi 3 UART

You are thinking about adding this into your HAT EEPROM to force the use of uart0 on pins 14 & 15, regardless of whether this is a Pi2 or Pi3? Technically it should work - the overlay will: 1) Disable uart1. 2) Enable uart0 and make it use pins 14 and 15. These should be a no-op on a Pi 2. What the ...
by PhilE
Wed Mar 02, 2016 9:23 am
Forum: Device Tree
Topic: Overlay to remap Pi 3 UART
Replies: 126
Views: 123441

Re: Overlay to remap Pi 3 UART

I'll put together an overlay that disables Bluetooth and UART1 and maps UART0/ttyAMA0 to GPIOs 14 & 15.
by PhilE
Mon Feb 29, 2016 8:35 pm
Forum: Device Tree
Topic: Overlay for on/off push-button controller.
Replies: 40
Views: 22239

Re: Overlay for on/off push-button controller.

Run this after a reboot:

Code: Select all

sudo vcdbg log msg |& grep -v -E "(HDMI|gpioman)"
and let me know what it says. It may be that the overlay is absent.
by PhilE
Mon Feb 29, 2016 10:18 am
Forum: Device Tree
Topic: Overlay for on/off push-button controller.
Replies: 40
Views: 22239

Re: Overlay for on/off push-button controller.

Here - have a birthday present from Raspberry Pi - raspi-gpio.

If you copy it into the boot partition you can run it from /flash/raspi-gpio.
by PhilE
Sun Feb 28, 2016 3:33 pm
Forum: Device Tree
Topic: Overlay for on/off push-button controller.
Replies: 40
Views: 22239

Re: Overlay for on/off push-button controller.

"raspi-gpio get" will show that the pin (the default is 26) is set to an output. Be careful with pin numbers - the kernel uses the Broadcom GPIO numbering, not the number of the pin on the 40-pin header. So pin 26 is actually GPIO 26 which is on header pin 37.
by PhilE
Fri Feb 26, 2016 5:25 pm
Forum: Device Tree
Topic: DiscoHAT compatibility for devices
Replies: 18
Views: 4683

Re: DiscoHAT compatibility for devices

I'm glad to hear you got there in the end.
by PhilE
Thu Feb 18, 2016 3:35 pm
Forum: Advanced users
Topic: Analogue audio testing
Replies: 265
Views: 153389

Re: Analogue audio testing

That sounds like false modesty - I'm sure you're just waiting for the chance to pick holes in jdb's work.

(I am winking heavily as I write this (no, read it again James)).
by PhilE
Thu Feb 18, 2016 3:26 pm
Forum: Advanced users
Topic: RX / TX UART
Replies: 9
Views: 2111

Re: RX / TX UART

You probably want to stop sampling the input (or at least suppress the output) once the first button has been pressed, and send an "arm" signal back from the controller when you are ready for the next question.
by PhilE
Thu Feb 18, 2016 2:27 pm
Forum: Advanced users
Topic: RX / TX UART
Replies: 9
Views: 2111

Re: RX / TX UART

You might find this RaspiTV article on RPi.GPIO interrupts interesting - it would make your game fairer, because it is effectively checks the buttons much more often.
by PhilE
Thu Feb 18, 2016 2:13 pm
Forum: Advanced users
Topic: RX / TX UART
Replies: 9
Views: 2111

Re: RX / TX UART

I would guess that the reason you are running out of file handles is that the sender loop opens ser twice and closes it once. First, remove the second ser.open(). Then think about why you are opening and closing within the loop - it could be for a good reason like power management, but it might not ...

Go to advanced search