How to set a GPIO

Hi

I wanna use second pin of nRF52832 as a gpio output pin.

I'm using software as a follows.

・nRF5_SDK_17.1.0_ddde560

I don't know which function programs I must use to solve.

Please tell me how to set. 

Parents Reply Children
  • TakaTaka said:
    Thank you for your reply.

    No problem at all, I am happy to help!

    TakaTaka said:

    I'm trying to use nRF52 pin (P0.11) as a output when recieved data from  smartphone through BLE.

     (I use EVK-NINA-B1 as a evaluation board)

    If you are using a different board then you will need to change the board file used in the example.
    You will also need to change the BOARD_PCA100* define in your Project options -> Common configuration -> Preprocessor -> Preprocessor Definitions.
    This define is used by the boards.h file to include the correct board file to the project, which in turns details how many and what pins the different peripherals are located on.

    Alternatively, just to get this pin change example up and running, you could change the defines to instead use P0.11 directly:

    #define PIN_IN NRF_GPIO_MAP(0,11)



    Best regards,
    Karl

Related