8 years, 1 month ago.

Enable GPIO on pins 9 and 10 of nRF52?

I might have made an inconvenient choice of using pin 10 as an MPU9250 interrupt on a custom nRF52 development board. On one version of the board with the nRF52 CIAA flip chip I used pin 8 as the MPU9250 interrupt and this worked fine. On the QFAA version of the nRF52 I chose pin 10, not realizing (or not understanding) that this is by default assigned to the NFC pin pair 9 and 10. I know there is a way in the SDK to release the NFC function and get the interrupt to work since someone has done so successfully using the exact same development board with gcc and the Nordic SDK. My questions is, how do I do this with the mbed compiler?

Here is the necessary code from the gcc program that works:

if ((NRF_UICR->NFCPINS & UICR_NFCPINS_PROTECT_Msk) == (UICR_NFCPINS_PROTECT_NFC << UICR_NFCPINS_PROTECT_Pos)){ NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos; while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} NRF_UICR->NFCPINS &= UICR_NFCPINS_PROTECT_Msk; while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos; while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} NVIC_SystemReset(); }

Any idea how to do this on mbed?

A bit late, but you'll probably get an answer faster at Nordic Dev Zone.

posted by Jan Jongboom 04 Oct 2016

This is an mbed specific problem, the above function works with gcc/eclipse...

posted by Kris Winer 04 Oct 2016
Be the first to answer this question.