0

nRF52832 P0.10 GPIO Voltage drop

koh gravatar image

asked 2017-12-07 09:35:05 +0100

updated 2017-12-13 03:13:35 +0100

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

edit retag flag offensive close delete report spam

Comments

What IC are you trying to control? Are you using the nRF52832 development kit (pca10040), or have you made a custom board?

Jørn ( 2017-12-07 10:18:12 +0100 )editconvert to answer

Thank you for comment. I using IC that is AFE4404(made in TI). I using nRF52832 in EYSHCNZXZ(made in TIYO YUDEN). AFE4404 and EYSHCNZXZ mounted on custom board.

koh ( 2017-12-07 11:24:14 +0100 )editconvert to answer

When you say you have connected P0.10 to IRQ do you mean the ADC_RDY pin? Could you upload a picture of your schematic showing how the Taiyo Yuden module and the AFE4404 are connected?

Jørn ( 2017-12-07 14:25:47 +0100 )editconvert to answer

I uploaded a picture masking other than AFE4404 and EYSHCNZXZ.

koh ( 2017-12-08 01:39:40 +0100 )editconvert to answer

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?

Jørn ( 2017-12-11 09:58:56 +0100 )editconvert to answer

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

koh ( 2017-12-12 02:06:59 +0100 )editconvert to answer

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.

Jørn ( 2017-12-12 08:20:16 +0100 )editconvert to answer

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.

koh ( 2017-12-12 09:11:30 +0100 )editconvert to answer

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?

Jørn ( 2017-12-12 09:34:51 +0100 )editconvert to answer

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.

koh ( 2017-12-13 03:15:04 +0100 )editconvert to answer

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.

Jørn ( 2017-12-13 09:30:40 +0100 )editconvert to answer

1 answer

Sort by » oldest newest most voted
0
letter57 gravatar image

answered 2017-12-08 02:21:17 +0100

Hi koh:

P0.09 & P0.10 defined as NFC PIN.

It's defined in UICR's address 0x20C. You can have a look at nRF52832 Product Specification 42.2 chapter.

If you want to define as GPIO. You need to overwrite UICR.

edit flag offensive delete publish link more

Comments

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.

koh ( 2017-12-08 02:43:13 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

Question Tools

1 follower

Stats

Asked: 2017-12-07 09:35:05 +0100

Seen: 99 times

Last updated: 7 hours ago