emresensoy Posted 10 hours ago Posted 10 hours ago I'm trying to get a clock signal of 32768 from the GPIO1 D4 pin of the rk3328 CPU, but I haven't been able to. I've tried everything, from `overlay dts` to `armbian-add-overlay`, but I can't get any output. I can set the value to 1 or 0 using the `echo 1 > /sys/class/gpio/gpio60/value` command, but the system doesn't give a clock output. Please help. Thank you in advance. 0 Quote
tparys Posted 3 hours ago Posted 3 hours ago The sysfs GPIO interface does not allow you to create clock outputs as-is. You'd do better seeing if that pin can be exposed through the sysfs PWM interface. I know the NanoPi M4V2's fan controller works this way (RK3399), and you can set the duty cycle. But you'd have to check if PWM is supported on that pin, and can be used in the way you're hoping. Failing that, it is possible to bit-bang the GPIO lines yourself if you're willing to write some C code. You can use Kernel Timers for fairly accurate timing, as long as you set High Scheduler Priority and Real Time Scheduler Class. Note that kernel timers only have a user specified resolution of 1ns, so you might not hit that frequency exactly. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.