Skip to content
View in the app

A better way to browse. Learn more.

Learn more

to get 32768 clk from GPIO1 D4 on RK3328

Featured Replies

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.

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.

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.

Guest
Reply to this topic...

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.