This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF52832 P0.10 GPIO Voltage drop

Hi all,

I try to control IC by nRF52832.

[My Application]
・Supply 2.5V to nRF52832 and IC.
・Connect P0.10 to IRQ(IC)

[I did these setting]
・Define "CONFIG_NFCT_PINS_AS_GPIOS"
・P0.10 : INPUT, PULL DOWN

But, the IC's IRQ signal voltage drop. If it is normal, it should be 2.5V. But it will be 1.8V. (I confirmed that the P0.09 is operating as GPIO)

Please tell me if it need other settings.

[schematic]
image description

[ADC_RDY signal (enable pull-down)]
image description

[ADC_RDY signal (disable pull-down)] image description

[ADC_RDY signal (enable pull-up)] image description

[Setting of UICR]
Code use library is "nRF5_SDK_13.1.0_7ca7556".

# C flags common to all targets
CFLAGS += -DBLE_STACK_SUPPORT_REQD
CFLAGS += -DBOARD_CUSTOM
CFLAGS += -DCONFIG_GPIO_AS_PINRESET
CFLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS 
CFLAGS += -DNRF52
CFLAGS += -DNRF52832_XXAA
CFLAGS += -DNRF52_PAN_12
CFLAGS += -DNRF52_PAN_15
CFLAGS += -DNRF52_PAN_20
CFLAGS += -DNRF52_PAN_31
CFLAGS += -DNRF52_PAN_36
CFLAGS += -DNRF52_PAN_51
CFLAGS += -DNRF52_PAN_54
CFLAGS += -DNRF52_PAN_55
CFLAGS += -DNRF52_PAN_58
CFLAGS += -DNRF52_PAN_64
CFLAGS += -DNRF52_PAN_74
CFLAGS += -DNRF_SD_BLE_API_VERSION=4
CFLAGS += -DS132
CFLAGS += -DSOFTDEVICE_PRESENT
CFLAGS += -DSWI_DISABLE0
CFLAGS += -D__HEAP_SIZE=0
CFLAGS += -mcpu=cortex-m4
CFLAGS += -mthumb -mabi=aapcs
#CFLAGS +=  -Wall -Werror -O3 -g3
CFLAGS +=  -Wall -Werror -O0 -g3
#CFLAGS +=  -Werror -O0 -g3	#使ってない関数があるとエラーになるのが邪魔なら-Wallを消す
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
CFLAGS += -fstack-usage	#stack size 確認
# keep every function in separate section, this allows linker to discard unused ones
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
CFLAGS += -fno-builtin --short-enums 

# C++ flags common to all targets
CXXFLAGS += \

# Assembler flags common to all targets
ASMFLAGS += -x assembler-with-cpp
ASMFLAGS += -DBLE_STACK_SUPPORT_REQD
ASMFLAGS += -DBOARD_CUSTOM
ASMFLAGS += -DCONFIG_GPIO_AS_PINRESET
ASMFLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS 
ASMFLAGS += -DNRF52
ASMFLAGS += -DNRF52832_XXAA
ASMFLAGS += -DNRF52_PAN_12
ASMFLAGS += -DNRF52_PAN_15
ASMFLAGS += -DNRF52_PAN_20
ASMFLAGS += -DNRF52_PAN_31
ASMFLAGS += -DNRF52_PAN_36
ASMFLAGS += -DNRF52_PAN_51
ASMFLAGS += -DNRF52_PAN_54
ASMFLAGS += -DNRF52_PAN_55
ASMFLAGS += -DNRF52_PAN_58
ASMFLAGS += -DNRF52_PAN_64
ASMFLAGS += -DNRF52_PAN_74
ASMFLAGS += -DNRF_SD_BLE_API_VERSION=4
ASMFLAGS += -DS132
ASMFLAGS += -DSOFTDEVICE_PRESENT
ASMFLAGS += -DSWI_DISABLE0
ASMFLAGS += -D__HEAP_SIZE=0

# Linker flags
LDFLAGS += -mthumb -mabi=aapcs -L $(TEMPLATE_PATH) -T$(LINKER_SCRIPT)
LDFLAGS += -mcpu=cortex-m4
LDFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
# let linker to dump unused sections
LDFLAGS += -Wl,--gc-sections
# use newlib in nano version
LDFLAGS += --specs=nano.specs -lc -lnosys

[Setting of P0.10]
Code use library is "nRF5_SDK_13.1.0_7ca7556".

nrf_drv_gpiote_in_config_t adc_rdy_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);
adc_rdy_config.pull = NRF_GPIO_PIN_PULLDOWN;
err_code = nrf_drv_gpiote_in_init(D_PIN_POS_ADC_RDY, &adc_rdy_config,f_afe_irq_event_handler);
APP_ERROR_CHECK(err_code);

Thanks,
Koh

  • Your pictures confirm that you do not need a pull-down resistor for the ADC_RDY pin. Since the pin does not float up when pull-up is enabled the ADC_RDY pin actively holds the pin low.

    Have you tried measuring the pin when it is not connected to anything, to ensure that the AFE4404 actually supplies the specified 2.5V?

    Have you measured your power supply, to ensure you are delivering 2.5V?

    Could you post your code configuring P0.10, and the UICR?

  • I checked voltage of AFE4404 supply and power IC output. (Supply voltage measured from the capacitor closest to IO_SUP of AFE4404)
    Both voltage was 2.5V.

    I posted code configuring P0.10, and the UICR.

  • From what I can see it seems you have configured it correctly. I think you will need to disconnect the ADC_RDY from the MCU, and measure the output of the AFE4404 without the nRF connected. This will tell you if the AFE4404 actually outputs 2.5V or if there is something wrong with it. Before you do so you could also check all solderpoints to ensure there are no weak solders or small short-circuits.

  • This issue solved. The cause is that I used a broken probe. I retested ADC_RDY voltage with normal probe(another one). ADC_RDY pin rose up to 2.43V.

    Thank you for your cooperation.

  • Glad to hear it worked out! Thank you for posting an update.

Related