Part Number: AM3352
Tool/software: TI C/C++ Compiler
Hi
I'm working on a custom board based around the beagle bone black and would like to generate a square wave from a specific pin to serve as a clock for a peripheral
that pins is GPMC_ADVN_ALE/TIMER4/GPIO2_2 and I would be looking for a frequency around 330kHz
I am wondering what would be the best way to control this?
I can see in my files system the folder /sys/kernel/debug/clk/timer4_fck but its not immediately obvious how I should be driving this
From my compiled device-tree (viewed with fdtdump) the relevant entries for timer 4 appear to be:
timer4_fck@510 {
#clock-cells = <0x00000000>;
compatible = "ti,mux-clock";
clocks = <0x00000016 0x00000009 0x00000015 0x00000000 0x00000000>;
reg = <0x00000510>;
};
target-module@44000 {
compatible = "ti,sysc-omap4-timer", "ti,sysc";
ti,hwmods = "timer4";
reg = <0x00044000 0x00000004 0x00044010 0x00000004 0x00044014 0x00000004>;
reg-names = "rev", "sysc", "syss";
ti,sysc-mask = <0x00000001>;
ti,sysc-sidle = <0x00000000 0x00000001 0x00000002 0x00000003>;
clocks = <0x0000002f 0x00000050 0x00000000>;
clock-names = "fck";
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
ranges = <0x00000000 0x00044000 0x00001000>;
timer@0 {
compatible = "ti,am335x-timer";
reg = <0x00000000 0x00000400>;
interrupts = <0x0000005c>;
ti,timer-pwm;
};
};
I would be very grateful for any suggestions as to how this might be done
Best regards,
- Richard