GPIO shared ID and Custom Board Defines

Dear, I am developing first project for self training using Nordic MCU. I want to interface few Buttons, Leds and LCD. I read the Datasheet nRF5340_PS_v1.0.pdf. In it in the article number 5.3.1.1, the Peripehral list with IDs and Base address is given. In article 7.1.2 (Peripherals With Shared ID), it is written that Peripehrals with shared ID can not be used simultaneously. Port0 and Port1 have same ID. There are total 32 P0 Pins and 16 P1 Pins. Does it mean that if more than 32 pins are requied in any application, then P0 and P1 can not be used simultaneously ? If, yes, how to confugure nRF5340 for more I/O pins than 32? As well, how to modify the varuous "#defines" of nRF5340_DK kit for custom board ? What header files of Zephyr are required to be included at minimum in the project to interface with Buttons, LEDs and 16x2 Alphanumeric LCD. 

Thanks

Gulzar Singh  

  • If you read the text under Peripherals with shared ID it says the following:

    "In general (with the exception of ID 0), peripherals sharing an ID and base address may not be used simultaneously. Only one peripheral can be enabled at a given ID."

    If you look at the base addresses of P0 and P1

    you can see that the base addresses are different, and it shouldn't be an issue using them simultaneously.

    However, for the UARTE, SPI and TWI, it's different:

    You can see the that the same instances (id) of the peripherals are sharing the same base address.

    Therefore you can't use UARTE0 at the same time as SPIM0, or TWIM2 at the same time as UARTE2, and so on..

    Best regards,

    Simon

Related