-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIGBUS fault panic on rpi4 using PWM #52
Comments
I should probably disable the PWM there because it's unstable. Sorry about that. |
Could you elaborate? As I mentioned |
I'm also experiencing this issue, and I'd also like to see this fixed rather than disabled. Same hardware, similar crash log. [signal SIGBUS: bus error code=0x1 addr=0x7f800e2004 pc=0x4fed04]
goroutine 1 [running]:
runtime.throw({0x55afbd?, 0x4421bc?})
/usr/local/go/src/runtime/panic.go:1077 +0x40 fp=0x4000156bb0 sp=0x4000156b80 pc=0x436cf0
runtime.sigpanic()
/usr/local/go/src/runtime/signal_unix.go:858 +0xec fp=0x4000156c10 sp=0x4000156bb0 pc=0x44deac
periph.io/x/host/v3/bcm283x.ReadTime(...)
/home/aliced/go/pkg/mod/periph.io/x/host/v3@v3.8.2/bcm283x/timer.go:20
periph.io/x/host/v3/bcm283x.Nanospin(0x40000021a0?)
/home/aliced/go/pkg/mod/periph.io/x/host/v3@v3.8.2/bcm283x/timer.go:25 +0x24 fp=0x4000156c40 sp=0x4000156c20 pc=0x4fed04
periph.io/x/host/v3/bcm283x.(*clock).setRaw(0x7f800e30a0, 0x6, 0x0?)
/home/aliced/go/pkg/mod/periph.io/x/host/v3@v3.8.2/bcm283x/clock.go:291 +0xdc fp=0x4000156c70 sp=0x4000156c40 pc=0x4f8fdc
periph.io/x/host/v3/bcm283x.(*clock).set(0x7f800e30a0, 0x400003d400?, 0x156ce8?)
/home/aliced/go/pkg/mod/periph.io/x/host/v3@v3.8.2/bcm283x/clock.go:272 +0x64 fp=0x4000156ca0 sp=0x4000156c70 pc=0x4f8e94
periph.io/x/host/v3/bcm283x.setPWMClockSource()
/home/aliced/go/pkg/mod/periph.io/x/host/v3@v3.8.2/bcm283x/pwm.go:229 +0x64 fp=0x4000156d50 sp=0x4000156ca0 pc=0x4fe954
periph.io/x/host/v3/bcm283x.(*Pin).PWM(0x6739e0, 0x6?, 0x10?)
/home/aliced/go/pkg/mod/periph.io/x/host/v3@v3.8.2/bcm283x/gpio.go:656 +0x16c fp=0x4000156de0 sp=0x4000156d50 pc=0x4fc2bc
gitlab.com/queer-computer-club/doorbot/devices.NewWS2811LEDStrip({{0x590d50, 0x4000020210}, 0x0, {0x0, 0x0}, {0x400012e400, 0x21, 0x1f4}, {0x4000020220, 0x1, ...}, ...}, ...)
/home/aliced/doorbot/devices/leds.go:63 +0x330 fp=0x4000156ea0 sp=0x4000156de0 pc=0x514dc0
main.NewDoorbot(0x4000157700, 0x4000130200)
/home/aliced/doorbot/doorbot.go:51 +0x500 fp=0x40001573b0 sp=0x4000156ea0 pc=0x5171f0
main.main()
/home/aliced/doorbot/main.go:44 +0x91c fp=0x4000157f30 sp=0x40001573b0 pc=0x51809c
runtime.main()
/usr/local/go/src/runtime/proc.go:267 +0x2bc fp=0x4000157fd0 sp=0x4000157f30 pc=0x4396ac
runtime.goexit()
/usr/local/go/src/runtime/asm_arm64.s:1197 +0x4 fp=0x4000157fd0 sp=0x4000157fd0 pc=0x469104 |
I also have this problem only if I access the timer reading func main() {
state, err := host.Init()
if err != nil {
log.Fatal("FAIL: device init", err)
}
// Prints the loaded driver.
fmt.Printf("Using drivers:\n")
for _, driver := range state.Loaded {
fmt.Printf("- %s\n", driver)
}
// Prints the driver that were skipped as irrelevant on the platform.
fmt.Printf("Drivers skipped:\n")
for _, failure := range state.Skipped {
fmt.Printf("- %s: %s\n", failure.D, failure.Err)
}
// Having drivers failing to load may not require process termination. It // is possible to continue to run in partial failure mode.
fmt.Printf("Drivers failed to load:\n")
for _, failure := range state.Failed {
fmt.Printf("- %s: %v\n", failure.D, failure.Err)
}
t := time.Duration(0)
for {
t2 := time.Now()
t = bcm283x.ReadTime()
for bcm283x.ReadTime()-t < 1000 {
}
exp := time.Since(t2).Nanoseconds()
println(exp, t)
time.Sleep(time.Second)
}
} result:
|
I see a similar trace running on Raspberry Pi Zero 2 W with 64 bit Pi OS.
|
Describe the bug
Running a basic PWM test results in a panic.
To Reproduce
Steps to reproduce the behavior:
From: https://periph.io/device/buzzer/
Expected behavior
It shouldn't crash and pin should pulse.
Platform (please complete the following information):
Additional context
Tried different pins and PWM0/1 all the same error.
Yet using a similar library
go-rpio
works fine which uses a similar memory-mapped io approach.The text was updated successfully, but these errors were encountered: