This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GPIO pullup

Good day!

Thank you for your consideration of my problem! The system is an nRF52832 utilized as a motor driver of a small 2W high rpm maxon motor. The system performs as expected but am having some difficulty with the pullups on the hall sensors which are an open collector needing a pullup resistor, rRF52832 internals. 

I am utilizing the example program ble_app_uart within SDK 14.0 and the armgcc toolchain, that is a nice toolchain. I understand that the pullup maybe weak to activate the trigger of the hall sensor on the nRF52832, but I am skeptical that is not even activated as it does not make the slightest measurement on the oscilloscope. 

My GPIO init for the HS_1 through HS_3:

     nrf_drv_gpiote_in_config_t in_configII = GPIOTE_CONFIG_IN_SENSE_TOGGLE(true);
     in_configII.pull = true;

     err_code = nrf_drv_gpiote_in_init(hs_1, &in_configII, phase_handler);
     err_code = nrf_drv_gpiote_in_init(hs_2, &in_configII, phase_handler);
     err_code = nrf_drv_gpiote_in_init(hs_3, &in_configII, phase_handler);
Is there any reason I should not see at least a slight increase from ground in the signal of the hall effect sensors?
Parents
  • Hi,

     

    in_configII.pull = true;

    This one should be equal to this enum:

    typedef enum
    {
        NRF_GPIO_PIN_NOPULL   = GPIO_PIN_CNF_PULL_Disabled, ///<  Pin pull-up resistor disabled.
        NRF_GPIO_PIN_PULLDOWN = GPIO_PIN_CNF_PULL_Pulldown, ///<  Pin pull-down resistor enabled.
        NRF_GPIO_PIN_PULLUP   = GPIO_PIN_CNF_PULL_Pullup,   ///<  Pin pull-up resistor enabled.
    } nrf_gpio_pin_pull_t;

    Setting it to true (1) will resolve to PIN_PULLDOWN. Could you try setting it to NRF_GPIO_PIN_PULLUP and see if it works better?

     

    Kind regards,

    Håkon 

Reply
  • Hi,

     

    in_configII.pull = true;

    This one should be equal to this enum:

    typedef enum
    {
        NRF_GPIO_PIN_NOPULL   = GPIO_PIN_CNF_PULL_Disabled, ///<  Pin pull-up resistor disabled.
        NRF_GPIO_PIN_PULLDOWN = GPIO_PIN_CNF_PULL_Pulldown, ///<  Pin pull-down resistor enabled.
        NRF_GPIO_PIN_PULLUP   = GPIO_PIN_CNF_PULL_Pullup,   ///<  Pin pull-up resistor enabled.
    } nrf_gpio_pin_pull_t;

    Setting it to true (1) will resolve to PIN_PULLDOWN. Could you try setting it to NRF_GPIO_PIN_PULLUP and see if it works better?

     

    Kind regards,

    Håkon 

Children
Related