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

Can only use 10 pins on port 1 for TWI

Hi experienced people

I try to initialize twi on pin 44 and 45.

ret_code_t err_code;
const nrf_drv_twi_config_t twi_config_top =
{
.scl = 45,
.sda = 44,
.frequency = NRF_DRV_TWI_FREQ_100K,
.interrupt_priority = APP_IRQ_PRIORITY_HIGHEST,
.clear_bus_init = false
};
err_code = nrf_drv_twi_init(&m_twi_top, &twi_config_top, NULL, NULL);

But it results in error:

<error> app: ERROR 3735928559 [Unknown error code] at ../../../../../../modules/nrfx/hal/nrf_gpio.h:492

This error occurs because the function below fails:

__STATIC_INLINE bool nrf_gpio_pin_present_check(uint32_t pin_number)

 

The failing is caused by #define in header file: nrf52833_peripherals.h

#define P0_PIN_NUM 32
#define P1_PIN_NUM 10

#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL
#define P1_FEATURE_PINS_PRESENT 0x000003FFUL


Are pin numbers above 10 unavailable on port 1?

Parents Reply Children
No Data
Related