periph / host

Go·Hardware·Lean - Host drivers
https://periph.io
Apache License 2.0
57 stars 32 forks source link

bcm283x: revamp DMA support #44

Open maruel opened 1 year ago

maruel commented 1 year ago

Ported from https://github.com/google/periph/issues/172.

This is about cleaning up the RPi DMA code for all generations.

Also see https://github.com/periph/host/issues/34 for RPi4 specific issue.

maruel commented 1 year ago

Also including issue https://github.com/google/periph/issues/198 about misuse of dmaWaitcyclesMax.

kirwinrMK commented 5 months ago

DMA appears completely broken on RPI. line 916 in bcm283x fails due to a miss match in units: l := int(int64(d) * int64(w.Frequency()) / int64(physic.Hertz)) // Bits should be `l := int(d / w.Frequency().Period()) // Bits'

Once that's fixed, there's still a SIGBUS error coming from Nanospin, that could be because I'm using a CM4 though.