Skip to content

Commit 2acc31b

Browse files
committed
Typos
1 parent 4d1dbdb commit 2acc31b

File tree

3 files changed

+31
-34
lines changed

3 files changed

+31
-34
lines changed

content/blog/2025/20250811-Pi5-PWM-not-working--NoSuchFileException

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: "RPi5 PWM Fails with NoSuchFileException"
3+
date: 2025-08-11
4+
tags: ["PWM", "LinuxFS"]
5+
---
6+
7+
2025-08-11, by Tom Aarts
8+
9+
On the Pi5, Pi kernel updates may result in failing PWM. The
10+
exception details will state `/sys/class/pwm/pwmchip2/npwm was not found`.
11+
12+
A kernel code update (6.12) resulted in the objects within `/sys/class/pwm` being numbered differently. It is most likely the PWM is using `/sys/class/pwm/pwmchip0`.
13+
14+
Until a proper fix is available, the following change to your application should resolve this error:
15+
16+
```java
17+
// Add imports
18+
import com.pi4j.plugin.linuxfs.provider.pwm.LinuxFsPwmProvider;
19+
import com.pi4j.plugin.linuxfs.provider.pwm.LinuxFsPwmProviderImpl;
20+
21+
// Replace newAutoContext
22+
23+
// Instead of:
24+
// Context pi4j = Pi4J.newAutoContext();
25+
26+
// Use:
27+
Context pi4j = Pi4J.newContextBuilder()
28+
.add(new LinuxFsPwmProviderImpl("/sys/class/pwm/", 0) )
29+
.build();
30+
```

content/documentation/io-examples/i2c/_index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,12 @@ i2c-11 i2c 107d508200.i2c I2C adapter
4343
i2c-12 i2c 107d508280.i2c I2C adapter
4444
```
4545

46-
If you are not seeinging i2c-1, then you might have missed a few steps in [The First Boot](../../../prepare/first-boot.md).
46+
If you are not seeinging `i2c-1, then you might have missed a few steps in [The First Boot](https://www.pi4j.com/prepare/first-boot/).
4747
The specific line needed to enable i2c is:
4848
```shell
4949
root@rp5:~# raspi-config nonint do_i2c 0
5050
```
5151

52-
5352
Command line tool to immediately scan the standard addresses on I2C bus 1 (i2c-1)
5453
```
5554
root@rp5:~# i2cdetect -y 1

0 commit comments

Comments
 (0)