zdebanos commented on code in PR #12081:
URL: https://github.com/apache/nuttx/pull/12081#discussion_r1563961819


##########
arch/arm/src/samv7/Kconfig:
##########
@@ -3786,6 +3786,19 @@ config SAMV7_TC3_QE
        ---help---
                Reserve TC3 for use by QEncoder.
 
+config SAMV7_QENCODER_ENABLE_GETINDEX
+       bool "Support ioctl GETINDEX call"
+       default n

Review Comment:
   @acassis The problem with making this a standard, in my opinion, is that 
this configuration of SAMV7's timer is not the way Microchip recommends in 
their datasheet.
   
   That doesn't mean this solution does not work, in the end this solution 
works much better, because the driver also implements range extension up to 32 
bits. The default recommended way zeroes the timer when the index is hit.
   
   I think it could have been possible to do the calibration with the default 
Timer's settings (polling a status flag in the register should do the thing), 
however the position measurement would be much harder. I suppose this 
peripheral could be handled properly if it were for a custom bare-metal API, 
however with NuttX, this approach is much easier, in my opinion.
   
   If it becomes the standard, it will not comply with the Timer's default 
settings. However, if someone wanted to use the encoder the way Microchip 
intends, it should be possible.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to