How to change NRF52832's pins P0.00 and P0.01 destinations?



  • I have a custom board based on a module based on NRF52832 which have only HF Clock on it. I have made an "error" when I designed the pins destinations, so the P0.00 is now connected as SDA pin and P0.01 as SPI's CLK pin. But I don't want to change them, nor add a 32kHz Clock. So, I 've discovered https://github.com/mysensors/ArduinoHwNRF5 - which is great! I've followed the steps but I still get some notifications (The current selected board needs the core 'sandeepmistry:nRF5' that is not installed.) even if I've installed both correctly. It still compiles, with that error/notification.

    The problem is: I can't change the pins into SDA and CLK!

    I've changed in MyBoardNRF5.h this line #define PIN_SPI_SCK into (0), this line #define PIN_WIRE_SDA into (1u), whitout any success.
    I've changed in MyBoardsNRF5.cpp first lines into
    { PORT0, 0, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // LFCLK
    { PORT0, 1, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // LFCLK
    whitout any luck.

    I've noticed that when I measure the pins, these pins are high, no matter what: P0.01, P0.05, P0.29, P0.30.
    These pins fluctuates with low voltage (0.15V - 0.45V): P0.00, P0.06, P0.08, P0.15, P0.18, P021.

    Even if I don't use Softdevice s132, even if I choose in Arduino these:
    pinMode(1, INPUT);
    digitalWrite(1, LOW);
    the result is the same: they remain HIGH or fluctuates (the other pins).

    I've compiled from the beginning with Low Frequency Clock: RC Oscillator.

    But the code - the blink on pin 28 works!

    Can you give me some indications, where I did wrong?


 

269
Online

7.6k
Users

8.5k
Topics

91.2k
Posts