This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello of everybody,
I've used the TI position manager libraries as "starting point" for an EnDat 2.1/2.2/01/02 decoding routine in a MCU control board based on a f28379D microcontroller.
In case of an EnDat encoder with endat22Data.position_clocks = 31, the PM_endat22_getCrcPos() returns a wrong CRC value.
For a double check, I've compared che CRC calculation obtained with the MakeCrcPos EnDat CRC routine (i.e. the C-implementation from Heidenhain specs, which generates the CRC code for EnDat 2.1/2.2 send position values), and everything goes fine, i.e. the CRC is calculated correclty and the encoder position continuosly readed.
It is important to underline that, with every other endat22Data.position_clocks value, the PM_endat22_getCrcPos returns the correct CRC.
The PM_endat22_getCrcPos implementation of the CRC calc. is obviously more faster than the C-original implementation of the CRC, so, it could be there an optimizatio in the library implementation that has leaded to this issue with clk=31?
PS: the optimization level has been forced at "off" during these test.
Thanks in advance.
Hello Matteo,
There is a 30-bit implementation that was noted in this post for the CRC (the CRC calculation implementation is the same as in our BiSS-C implementation). Brett posted a potential workaround in the post. Unfortunately neither library has been updated at this time to accept > 30-bits.
I'd be interested in hearing back if you try the workaround.
Best Regards
Lori
Hello Lori,
I've implemented also the Biss-B and Biss-C decoding with the same libraries in the motor control fw.
Actually, with Biss B/C I've never test an encoder with 30 bit clk (only hengstler and Renishaw encoders with less number of bits), so that, as you says, there is the same problem (I will check in detail the mods in the post you suggested me).
With my EnDat implementation, I've also tested a 36 bit linear EnDat 2.2 encoder (LC415), and the CRC calculation goes well... so I think that the problem is circumscribable to position_clk = 31.
PS: Regarding the implementation, i.e. BissB/C + EnDat from position manager libraries builded toghether, when I've compiled these two libraries in the same project, a lot of warning in compilation step have been appear (related to callbacks with same names in the two libraries)... I've solve this issue by simply mask these warning...