User Tools

Site Tools


technical_information

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
technical_information [2025/02/24 09:59]
giometti [Generators]
technical_information [2025/02/24 10:02] (current)
giometti [Parallel port generator]
Line 151: Line 151:
  
 To do so the class pps-gen has been added. PPS generators can be To do so the class pps-gen has been added. PPS generators can be
-registered in the kernel by defining a struct pps_gen_source_info as +registered in the kernel by defining a ''​struct pps_gen_source_info'' ​as 
-follows::+follows:
  
     static struct pps_gen_source_info pps_gen_dummy_info = {     static struct pps_gen_source_info pps_gen_dummy_info = {
Line 161: Line 161:
     };     };
  
-Where the use_system_clock states if the generator uses the system+Where the ''​use_system_clock'' ​states if the generator uses the system
 clock to generate its pulses, or they are from a peripheral device clock to generate its pulses, or they are from a peripheral device
-clock. Method get_time() is used to query the time stored into the +clock. Method ​''​get_time()'' ​is used to query the time stored into the 
-generator clock, while the method enable() is used to enable or+generator clock, while the method ​''​enable()'' ​is used to enable or
 disable the PPS pulse generation. disable the PPS pulse generation.
  
-Then calling the function pps_gen_register_source() in your+Then calling the function ​''​pps_gen_register_source()'' ​in your
 initialization routine as follows creates a new generator in the initialization routine as follows creates a new generator in the
-system::+system:
  
     pps_gen = pps_gen_register_source(&​pps_gen_dummy_info);​     pps_gen = pps_gen_register_source(&​pps_gen_dummy_info);​
Line 175: Line 175:
 ===== Generators SYSFS support ===== ===== Generators SYSFS support =====
  
-If the SYSFS filesystem is enabled in the kernel it provides a new class::+If the SYSFS filesystem is enabled in the kernel it provides a new class:
  
     $ ls /​sys/​class/​pps-gen/​     $ ls /​sys/​class/​pps-gen/​
Line 181: Line 181:
  
 Every directory is the ID of a PPS generator defined in the system and Every directory is the ID of a PPS generator defined in the system and
-inside of it you find several files::+inside of it you find several files:
  
     $ ls -F /​sys/​class/​pps-gen/​pps-gen0/​     $ ls -F /​sys/​class/​pps-gen/​pps-gen0/​
     dev  enable ​ name  power/ ​ subsystem@ ​ system ​ time  uevent     dev  enable ​ name  power/ ​ subsystem@ ​ system ​ time  uevent
  
-To enable the PPS signal generation you can use the command below::+To enable the PPS signal generation you can use the command below:
  
     $ echo 1 > /​sys/​class/​pps-gen/​pps-gen0/​enable     $ echo 1 > /​sys/​class/​pps-gen/​pps-gen0/​enable
Line 198: Line 198:
 ports, for example. ports, for example.
  
-Parallel port cable pinout::+Parallel port cable pinout:
  
         pin     ​name ​   master ​     slave         pin     ​name ​   master ​     slave
Line 231: Line 231:
 latencies. But if it is too small slave won't be able to capture clear edge latencies. But if it is too small slave won't be able to capture clear edge
 transition. The default of 30us should be good enough in most situations. transition. The default of 30us should be good enough in most situations.
-The delay can be selected using '​delay'​ pps_gen_parport module parameter.+The delay can be selected using ''delay'' pps_gen_parport module parameter.
  
  
technical_information.1740387594.txt.gz · Last modified: 2025/02/24 09:59 by giometti