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.

TMS320F28377D: The code jump to the maximum(65535) in the sdfm module of 28377d

Part Number: TMS320F28377D
Other Parts Discussed in Thread: CONTROLSUITE

HI! 

In my projiect I set the SDFM module of 28377D works at the mode0, 16bits ,filter3, osr256, EXT_RESET_DISABLE, only AE_ENABLE interrupt  state. I find that  the code of results rigester sometimes will go to the muximum (65535). At this time my input of sd-d is 0V, the correct code is 0, in the most time the code is right,but sometimes the code will go to the muximum.Why!

  • SDFM data filter result is a signed integer. Are you making sure you are reading this register as signed integer?

    0xFFFF in signed integer representation represents -1
    0xFFFF in unsigned integer representation represents 65535

    Regards,
    Manoj
  • Hi! Manoj

    Yes, it's my fault, I reading this register as unsigned integer.

    The another question is about the SDDATA register.

    In the datasheet of 28377, the description of SDDATA , The DATA16 represent the 16-bits data in 16b mode.

    But in the sample programe of C:\ti\controlSUITE\device_support\F2837xD\v210\F2837xD_examples_Cpu1\sdfm_pwm_sync_cpu, the result is read like this.  Filter1_Result[loopCounter1] = SDFM1_READ_FILTER1_DATA_16BIT; where the #define SDFM1_READ_FILTER1_DATA_16BIT     *(Uint16 *)0x5E17.

    So the SDFM1_READ_FILTER1_DATA_16BIT represent the Sdfm1Regs.SDDATA1.bit.DATA32HI. then I set the Filter1_Result[loopCounter1]=Sdfm1Regs.SDDATA1.bit.DATA32HI; the result is same as the Filter1_Result[loopCounter1] = SDFM1_READ_FILTER1_DATA_16BIT; 

    The description in the datasheet is error?

  • It is good to know that your issue is resolved.

    16 bit mode: Filter output is available in 0x5E17
    32 bit mode: Filter output is available in 0x5E16 and 0x5E17.
    0x5E16 should hold hi-order 16b in 32b mode
    0x5E17 should hold lo-order 16b in 32b mode

    Regards,
    Manoj
  • HI! Manoj
    Your answer is 16 bit mode: Filter output is available in 0x5E17
    0x5E17 present the Sdfm1Regs.SDDATA1.bit.DATA32HI. This is not consistent with the description on Datasheet. The Sdfm1Regs.SDDATA1.bit.DATA32HI register is higer 16bits of the filter output in 32 bit mode .
    regards
    shook
  • I shall look into this and get back with you in next couple of days.

    -Manoj
  • Shook,

    I got your point. I shall be correcting this in next release of TRM. Here is the correct description:-

    Regards,

    Manoj