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

  • Thank you for comment.
    I already setting UICR register to 0xFFFFFFFE. And,I checked register after program running.
    So,I think that the cause is electrical characteristics.

  • The ADC_RDY signal seems to be high for a relatively short amount of time judging by the figures in chapter 8 of the AFE4404 product specification. How have you measured the amplitude of the signal? With an oscilloscope?

  • I measured signal by oscilloscope. Uploaded a picture of ADC_RDY signal.

  • The product specification of the AFE4404 does not mention a pull-down resistor for the ADC_RDY pin, not that I have found at least. The only thing, of the top of my head, that I can think of is that the pull-down is too small. Could you try disabling the pull-down and see how it behaves? I have not been able to find any information on the physical behavior of the ADC_RDY pin, if it actively holds the pin low when the ADC is not ready a pull-down should not be necessary. If you do need a pull-down, and you are able to try it with a larger, external pulldown that would be interesting to see as well.

  • Thank you for advice.
    I tested disable the pull-down. But it didn't improve.
    And,I tested enable the pull-up, because I thought that the cause is ADC_RDY pin's drive current.
    But it didn't improved too.
    Uploaded picture of each signal.

Related