AM6442: Endat cmd in loadshare

Part Number: AM6442


Tool/software:

Dear Experts

We have implemented 2XEndat on CH0 and CH1 in loadshare mode.

We need to run the CH0 and CH1 with different cmd in periodic mode

CH0 - Cmd = 9

CH1 - Cmd =1 

I noticed that endat_command_build in endat_drv.c will set all channels to the same command.

Is there any restriction to Endat IP that prevents them from running different command?

Thanks you

Alan I

  • Hi Alan,

    There is no restriction like this in the EnDat driver or IP. In the current SDK example, periodic mode is configured for command 1. Any EnDat command can be configured for periodic mode. You just need to ensure you use the correct command number and arguments for both endat_command_process and endat_recvd_process.

    Required parameters for each command can be found in endat_handle_user().

    For command 9, these changes will be needed in endat_process_periodic_command function.

    update the arguments for the both APIs:

    1. endat_command_process

      • Set the command ID to 9.
      • Configure cmd_supplement->address with the MRS code.
      • Pass both parameters to the API.
    2. endat_recvd_process

      • Use the correct command ID (9) when calling this API.

                           

    BR,

    Achala Ram

  • Hi Achala

    Thank you for the reply

    Is it possible to run CH0 with cmd=9 and CH1 to run cmd=1 in parallel. 

    Thank you

    Alan I

  • Hi Alan,

    Currently, this is not supported in driver and application, but it will be added in a future release. However, you can modify the driver and application to use different commands for each channel. The firmware does not have any limitation, both channels run independently in load share mode.

    Mainly, you need to make changes in:

    • endat_command_build to build two different commands.
    • When calling endat_recvd_process, use different arguments (cmd) for each channel.

    BR,
    Achala Ram

  • Hi Achala ,

    Thank you for confirmation on IP core compatibility

    I have modified endat_drv.c to process by Channel
    int32_t endat_command_build_v2(struct endat_priv *priv, int32_t cmd, int32_t ch,
    struct cmd_supplement *cmd_supplement)
    void endat_command_send_v2(struct endat_priv *priv , int32_t ch)

    I am still having problem with mix command, CH0: CMD = 9 and CH1: CMD =1,

    -CH0:CMD9 is running OK,  CH1:CMD1 is stuck

    Alan I

  • Hi Achala

    I am using Endat Diagnostic,

    The default CMD=1 works fine with both CH0 and CH1 on periodic continuous mode ( menu 200)

    Changing to  CMD=9 on periodic continuous  mode ( menu 200) on both CH0 and CH1  with motor_control_sdk_am243x_11_00_00_06

    From my I can see, only CH0 is running, while CH1 get stuck  after ~4 ISR

    Are you able to run CMD=9 on periodic continuous mode ( menu 200)

    Attached is modified endat_diagnotis.c to use CMD=9

    endat_diagnostic.c

    Settings

    Enter IEP reset cycle count (must be greater than EnDat cycle time including timeout period, in IEP cycles):  1,000,000

    Enter IEP trigger time (must be less than or equal to IEP reset cycle, in IEP cycles) Channel0:  10

     Enter IEP trigger time (must be less than or equal to IEP reset cycle, in IEP cycles) Channel1: 10

    Thank you

    Alan I