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.

LAUNCHXL-F280049C: Hall sensor connect to the EQEP pin

Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: BOOSTXL-DRV8320RS

Hi  Ti,

I am trying to port the instaspin lab 11e of 69M to F280049C(lab 5).  the belows are what I did:

Hardware:

1. Connect the related pins to EQEP1 on the launchpad 49C.

2. setting position 2 (LEFT) of S3 to 0 (DOWN),  and S4 is set to 1 (UP).

Software:

1. defined the _EQEP_EN_ in hal_obj.h.

2. changed the GPIO 35,37,59 settings as below for the EQEP1.

comments the below lines:

GPIO_setMasterCore(35, GPIO_CORE_CPU1);
GPIO_setPinConfig(GPIO_35_TDI);

GPIO_setMasterCore(37, GPIO_CORE_CPU1);
GPIO_setPinConfig(GPIO_37_TDO);

GPIO_setMasterCore(59, GPIO_CORE_CPU1);
GPIO_setPinConfig(GPIO_59_GPIO59);
GPIO_setDirectionMode(59, GPIO_DIR_MODE_IN);
GPIO_setPadConfig(59, GPIO_PIN_TYPE_STD);

add the below lines:

GPIO_setMasterCore(DEVICE_GPIO_PIN_EQEP1A, GPIO_CORE_CPU1);  //35
GPIO_setPinConfig(DEVICE_GPIO_CFG_EQEP1A);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_EQEP1A, GPIO_QUAL_3SAMPLE);

GPIO_setMasterCore(DEVICE_GPIO_PIN_EQEP1B, GPIO_CORE_CPU1); //37
GPIO_setPinConfig(DEVICE_GPIO_CFG_EQEP1B);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_EQEP1B, GPIO_QUAL_3SAMPLE);

GPIO_setMasterCore(DEVICE_GPIO_CFG_EQEP1I, GPIO_CORE_CPU1); //59
GPIO_setPinConfig(DEVICE_GPIO_CFG_EQEP1I);
GPIO_setQualificationMode(DEVICE_GPIO_CFG_EQEP1I, GPIO_QUAL_3SAMPLE);

then I ported the HALLBLDC_State_Check and watching the  gHall_GpioData.  I only got 4,5,7 for gHall_GpioData, which was wrong for the hall  status.

Is there anything wrong for the changes?  please help.  thanks!

  • You should configure these three pins to GPIO, not QEP for hall sensor signals input, and set the direction to input as below.

    // GPIO35->
    GPIO_setMasterCore(35, GPIO_CORE_CPU1);
    GPIO_setPinConfig(GPIO_35_GPIO35);
    GPIO_setDirectionMode(35, GPIO_DIR_MODE_IN);
    GPIO_setPadConfig(35, GPIO_PIN_TYPE_STD);

    // GPIO37->
    GPIO_setMasterCore(37, GPIO_CORE_CPU1);
    GPIO_setPinConfig(GPIO_37_GPIO37);
    GPIO_setDirectionMode(37, GPIO_DIR_MODE_IN);
    GPIO_setPadConfig(37, GPIO_PIN_TYPE_STD);

  • Hi  Yanming,

    I implement your changes, but it still not work. 

    It can't read the correct hall signal. 

    And we use oscilloscope to detect the HALL transform, it was correct.

    So the HALL sensor is running normal.

    Does the EQEP pins can be used for the HALL sensor?

    I didn't see any descriptions about the HALL sensor in the launchpad-49C and BOOSTXL-DRV8320RS's documents.

    If yes,  what should I do to make the HALL transform read from the GPIO correctly?

  • Hi  Yanming,

    The gpio value read from hall seems work now.  Thanks.