This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

What is NRF_P0 in the {SDK_PATH}/components/drivers_nrf/hal/nrf_gpio.h

I'm using Keil5 to compile example of SDK v12.2. And I'm trying to understand each of Source code to understand how each of it is consists of.

I opened an example "SDK/Examples/peripheral/blinky/pca10028". (I have nRF51422 DK Board - PCA10028.)

I tried to find "NRF_P0", But can't find any code that defines "NRF_P0". I searched with Keil Studio 5, But there wern't any definition of NRF_P0. (really, I swear there were just code that uses "NRF_P0", and NO Definition!)

I tried to all of the SDK Folder to search "NRF_P0" and there was some files which defines "NRF_P0", But those files aren't related to my board.

The files that defines "NRF_P0" were

Components/device/nrf52.h

Components/device/nrf52840.h

Components/device/nrf51_to_nrf52.h

The first two files were only related to nrf52 boards and I'm using nrf51 board, so I thought those files are not related to my pca10028 board.

And also, nrf51_to_nrf52.h file, I though it just porting file of nrf51 -> nrf52 file.

That gives me an question, where is the definition for NRF_P0 for NRF51 board?

Is the reason that I can't find NRF_P0 Define Line, this NRF_P0 is defined in SoftDevice, So I can't find with it?

(+I'm guessing NRF_P0 means for NRF_GPIO_PIN 0 but i'm not sure it really is.)

Parents
  • Yeah, It's compiled Really well. But I just want to understand how this source code works, so I tried to find out what NRF_P0 is.

    The Thing is, I really can't understand why NRF_P0 points to the hardware register in nRF52 EVEN IF IT'S UPLOADED TO NRF51 Board.

    Isn't those two board(NRF51, NRF52 core) is totally diffrent? I thought those two core are totally diffrent so those pinout pointer will be no relationship at all(nRF51, nRF52).

    IF those GPIO base pointer location are totally same, It would be located at

    Components/device/nrf.h

    Not in

    Components/device/nrf52.h

    Does Nrf51.h file references Nrf52.h file just to get GPIO PIN BASE ADDRESS?

    EVEN IF IS JUST UPLOADED TO NRF51 BOARD?

Reply
  • Yeah, It's compiled Really well. But I just want to understand how this source code works, so I tried to find out what NRF_P0 is.

    The Thing is, I really can't understand why NRF_P0 points to the hardware register in nRF52 EVEN IF IT'S UPLOADED TO NRF51 Board.

    Isn't those two board(NRF51, NRF52 core) is totally diffrent? I thought those two core are totally diffrent so those pinout pointer will be no relationship at all(nRF51, nRF52).

    IF those GPIO base pointer location are totally same, It would be located at

    Components/device/nrf.h

    Not in

    Components/device/nrf52.h

    Does Nrf51.h file references Nrf52.h file just to get GPIO PIN BASE ADDRESS?

    EVEN IF IS JUST UPLOADED TO NRF51 BOARD?

Children
No Data
Related