Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Stepper Motor Device Driver Development


    I've been playing with ways to drive a stepper motor by writing a device driver, which works well if I have a calling process that writes to a char type device one step at a time (with the delays and step numbers controleede by this process). But when I try to make the device handle the number of steps and the delays by passing this data from the calling process, the device works OK but blocks the calling process while the device is dealing with the port switching for the motor.

    Is it possible to have a device that works like this? i.e send it instructions to run the motor for x mins at y speed, but that returns control back to the system once initiated?

    thanks in advance

  2. #2
    try by scheduling a work (which handles the seding data to device).. search for "queue_work()" in any device driver code, you will come to know how to use that.. that should allow to you to make your process non-blocking.. other method is to create a kernel thread.. though i would not recomment the use of kernel thread.. hope this helps

  3. #3
    Many thanks! - an initial search on your advice is certainly pointing me the right way.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts