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.

LP-AM243: EnDat 2.x Motor Encoder Implementation with Motor Control SDK examples: FreeRTOS versus nortos examples

Part Number: LP-AM243
Other Parts Discussed in Thread: BP-AM2BLDCSERVO, , TIDEP-01032, SYSCONFIG

Hi TI experts,

I do have an EnDat 2.1 Absolute Motor Encoder, which I have hooked up to an AM243 Launchpad (LP-AM243) in conjunction with a BP-AM2BLDCSERVO Servo Motor Booster Pack from TI.

I have no problems to load and run the "endat_diagnostic" examples from the "examples" section of the Motor Control SDK for AM243x - RTOS (Version 09.01.00.06, Jan. 10 2024). The EnDat 2.1 Encoder is recognized, identified and read out without problems using the endat_diagnostic examples included in the Motor Control SDK. It should be noted, that all the endat diagnostic examples provided by the Motor Control SDK are all "freertos" examples.

Now my aim is to get a servo motor up and running (simple velocity control to get started) based on my EnDat 2.1 absolute encoder values.

For this I am working with the Design Guide TIDEP-01032 EtherCAT connected, single-chip, dual-servo motor drive reference design. That reference design is made up of three separate projects for Code Composer Studio: 

1) r5fss0-0_nortos

2) r5fss0-1_nortos

3) r5fss1-0_freertos

I am working with 1) r5fss0-0_nortos. This project is supposed to spin two separate BLDC motors with two independent EnDat 2.2 encoders operating at 16 MHz encoder frequency.
As I do have only a single motor with a single EnDat 2.1 encoder (operating at 1 MHz encoder frequency), I tried to adjust SysConfig in the EnDat Position Encoder settings, to enable channel 0 only (instead of channels 0 + channel 2).

Additionally I tried to turn off "multi channel load share", which resulted in compiler errors.

To make a long story short: So far I haven't been able to get my motor spinning using the r5fss0-0_nortos example project from TIDEP-01032 EtherCAT connected, single-chip, dual-servo motor drive reference design.

The motor is "armed" (that is the same DC-Link voltage is applied to all three phases), but it doesn't turn. That makes me suspect that the EnDat encoder isn't working, providing no motor position values to the µC.

I can only suspect so, as I don't currently have a way to diagnose the EnDat encoder values (the way it can be done in the endat_diagnsotic examples). So I can not say, whether the EnDat 2.1. encoder values are read correctly. I suppose they are not, because the reference design assumes an EnDat 2.2. encoder is used, with 16 MHz operating frequency, as opposed to 1 MHz operating frequency for an EnDat 2.1. encoder.

I'd appreciate any suggestions or advice, if and how I might adjust tTIDEP-01032 EtherCAT connected, single-chip, dual-servo motor drive reference design to diagnose my EnDat 2.1. encoder.

Thanks!

  • Hi

    Can you make the following change in the settings.h file of motor_control_sdk_am243x_09_01_00_06\examples\tidep_01032_dual_motor_drive\single_chip_servo\am243x-lp\r5fss0-0_nortos project?

    • Comment out the following line: #define DUAL_AXIS_USE_M1_M2

    You can keep sysconfig file as it is from SDK when trying the change.

    Regards

    Dhaval

  • Hi Dhaval,

    thank you for your feedback and advice.

    I did comment out
    #define DUAL_AXIS_USE_M1_M2
    in settings.h, as you wrote.

    That didn't change the outcome, the motor won't spin.

    In the CCS console I can see, that the EnDat 2.1. encoder is recognized after startup of r5fss0-0, the serial number is read and displayed:

    I still suspect, that after the encoder initialization (which is done @ 200 kHz as far as I can see) there may be some issue with the encoder opersting frequency, which seems to be hard coded to 16 MHz:

    I changed line 1674 to
     endat_init_clock(1 * 1000 * 1000, priv);
    in order to reduce the encoder operating frequency, but that didn't work either.

    Any further idea to what might be the root of the issue is appreciated on my side.

    Thanks, Tilman.

  • Hi

    Is it possible for you to share the signal capture (using logic analyzer/scope) of EnDat TX, RX and Clock pins after making this change?

    Regards
    Dhaval