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.

BOOSTXL-POSMGR: Nikon encoder is not responding

Part Number: BOOSTXL-POSMGR

Hi,Lori

I used the CCS project of F280049C, which had successfully read encoder data before, to modify the protocol part to meet nikon encoder reading data, but the encoder did not respond.I understand that when I change the Tamagawa encoder to nikon encoder, I only need to modify part of the agreement.So I'm now modifying the function uint16_t PM_tformat_setupCommand(uint16_t tformatDataID, uint16_t eepromAddr,uint16_t eepromData,Uint16_t crcSend), and also get waveform, but it seems that the encoder does not respond.What is the reason for this?

(1)SPI's frequency is already 2.5MHZ;

(2)The instructions seem to be right, and the protocol looks like this:

Best regards

Johnson Alanl

  • Is the CRC correct?  I believe Nikon may have a different polynomial than t-format. 

  • Hi,Lori

    My encoder is responding, but the code stops at the CRC check.The code I wrote to fetch bits of data is written in the format:

    nikonData.informationField =(uint32_t)((nikonData.rdata[1]<<13)|(nikonData.rdata[2]>>3));
    
    nikonData.dataField0=(nikonData.rdata[2]<<15)|(nikonData.rdata[3]>>1)&0xffff;//
    nikonData.dataField1=(nikonData.rdata[4]<<1) |(nikonData.rdata[5]>>15)&0xffff;//
    nikonData.crc=((nikonData.rdata[4]&0x7f)<<1)|(nikonData.rdata[5]>>15)&0xff;//
    nikonData.rxPkts[0] = ((uint32_t) nikonData.informationField <<16)
    | ((uint32_t)nikonData.dataField0 );
    nikonData.rxPkts[1] =((uint32_t) (nikonData.dataField1>>8));

    But TI's source code is in this format(Using functions to take bits):

                tformatData.controlField = tformat_getBits (len, wordNo, bitIndex);  //bitIndex=13
    
                wordNo = wordNo + (10 + (16 - bitIndex) ) / 16; //wordNo=
                bitIndex = 16 - ((10 + (16 - bitIndex)) % 16) ; //bitIndex=
               tformatData.statusField = tformat_getBits (len, wordNo, bitIndex);
    
                wordNo = wordNo + (10 + (16 - bitIndex) ) / 16;
                bitIndex = 16 - ((10 + (16 - bitIndex)) % 16) ;
                tformatData.dataField0 = tformat_getBits (len, wordNo, bitIndex);
    
                wordNo = wordNo + (10 + (16 - bitIndex) ) / 16;
                bitIndex = 16 - ((10 + (16 - bitIndex)) % 16) ;
               tformatData.dataField1 = tformat_getBits (len, wordNo, bitIndex);
    
                wordNo = wordNo + (10 + (16 - bitIndex) ) / 16;
                bitIndex = 16 - ((10 + (16 - bitIndex)) % 16) ;
                tformatData.dataField2 = tformat_getBits (len, wordNo, bitIndex);
    
                wordNo = wordNo + (10 + (16 - bitIndex) ) / 16;
                bitIndex = 16 - ((10 + (16 - bitIndex)) % 16) ;
                tformatData.crc = tformat_getBits (len, wordNo, bitIndex);

    I changed TI's source code to the way I wrote it (taking bits directly instead of using functions to take bits), and I also had CRC problems, which may be using functions to take bits and may be equivalent to a proper delay.Have you seen anything like that?

    In addition, regarding the CRC issue, we need your answers to the following questions:
    1. Can you provide guidance to solve CRC problems?
    2. Can you provide the Nikon encoder code of TI debugging(Aformat code)?
    3. If possible, could you please write the bit function that receives the data?

    Best regards

    Johnson Alanl

  • Johnson,

    If there are CRC errors on your T-Format solution, then the data must be incorrect. One approach to debug this is to create a test project that calls into the TI provided function(s) with known specific data, you could use data captured from running the TI code with an encoder.  Then capture the results from the function.  Then do the same with your functions and compare. Basically creating unit level tests for the functions so you can find where they differ. 

    I don't have an A-format project to share. 

    I won't be able to re-write the git-bit function for A format.  I believe the function TI provides could be modified by adjusting the number of bits (10) and the start position of the first bit.

    I recently contacted Tamagawa and they indicated I could share the attached T-format information. 

    Regards

    Lori

     Specification of Smart-Abs TS5700N8500.pdf