5 years, 8 months ago.

InterruptIn() problem on nRF52832, GPIO config/resource conflict?

Hello world,

The InterruptIn() causes my whole application to hang.. looks like program does not start at all..

Is there any other way to detect pin state change?

Is PullUp/PullDown problem already solved in 5.9.4?

What could be cause and fix for this?

My Custom Target inherits from MCU_RF52832, maybe there are some peripherals conflict with predefined GPIO that cause the problem/conflict?

I have problems with InterruptIn only if I define more than 4 instances. I can use 4 InterruptIn pins and everything was work OK, but if I try to create 5 InterruptIn then I get HardFault.

I use Mbed 5.11.1, work with nRF52832, SDK 14.2 Problem at module gpio_api.c:

static void gpio_apply_config(uint8_t pin) { ... nrf_drv_gpiote_in_init(pin, &cfg, gpiote_irq_handler); ...

This method called without check of return value, but here returned code NRF_ERROR_NO_MEM.

I don't understand why there was error, because at: https://infocenter.nordicsemi.com

Number of GPIOTE channels = 8

posted by Mihail Isaev 16 Sep 2019

1 Answer

4 years, 10 months ago.

Hi. I have the same problem, You found some solution? Marcelo

Hello Marcelo! No solution yet, but I have focused on some different tasks. I suspect this may be caused by NRF SDK / SoftDevice hardcodes. Luckily in MBED OS 5.13 CORDIO BLE STACK (Open-Source developed by ARM) has replaced SoftDevice. Will get back to this in upcoming weeks, so I would be able to say what was the problem, if I find the solution surely I will share it :-) Also I noticed GitHub project Issues page is far better to ask detailed technical questions :-) https://github.com/ARMmbed/mbed-os

posted by Tomasz CEDRO 16 Sep 2019