NFC Reader Library Migration to FRDM-MCXN947

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NFC Reader Library Migration to FRDM-MCXN947

NFC Reader Library Migration to FRDM-MCXN947

Introduction.

This document provides a guide on how to use the NFC frontend PN5190 with the FRDM-MCXN947 and using the latest existing version of the NFC Reader Library.

The hardware required to follow this guide is:

Software Setup.

  • MCXN947 SDK version: 26.06.00
  • NFCReaderLibrary version: 07.16.00
  • PN5190 FW version: 0x20D
  • MCUxpresso IDE version: 25.6

Hardware connections.

The PNEV5190 comes with a Kinetis K82F as a host MCU to drive the PN5190

Since the goal is to drive PN5190 from the MCXN947 via SPI, we need to prepare the PNEV5190 for it:

  • Power up board correctly
  • Enable external SPI pins
  • Disable K82F interface with PN5190

Power up and jumper configuration

 

  • To power up the board correctly:

– Powering it up over USB does not provide enough current. It will be powered with an external power supply of 7.5V over connector J17.

  • Put jumper on following pins:

– J9 2-3: External power supply

– J8: VBATPWR supplied with VBAT=3.3 V

– J12: VBAT supplied with 3.3 V

  • Remove jumpers on following pins:

– J22, J23: open SDA signals for K82F

– J19: RTS push-button bypass for K82F

– J3, J4, J5, J6: pull down jumpers for NFC module signals

  • Set GPIO and SPI voltage to 3.3 V: supplying 3.3 V to VDDIO and the μC supply:

– Remove short circuit on R19

– Place short circuit on R20

Location of the changes mentioned above can be seen in the following image:

Habib_MS_0-1781132345846.png

Routing NFC module communication pins to JP1

 

To enable the pins on JP1 for communication, we must enable bus switch U10 and disable bus switch U12 in the NFC Host Interface. These switches enable or disable the connections from K82 to PN5190 SPI pins, and expose the SPI interface to an external host.

  • Remove short on R5 to disable communication routing to K82F.
  • Place short on R7 to enable communication routing to JP1 pins.

Habib_MS_2-1781132571269.png

For FRDM-MCXN947 side, no modifications are necessary.  The pins used are available in Header J1 and J2. Which are shown in the following table.  

Name

MCXN947

PN5190

SCK

J2.12

JP1.1

MOSI

J2.8

JP1.2

MISO

J2.10

JP1.3

SSEL

J2.6

JP1.4

IRQ

J1.16

JP1.5

RESET

J2.2

JP6.1

GND

J2.14

JP1.10

SUCCESS

J2.17*

 

FAIL

J2.15*

 

DWL

J2.13*

 

* Pins that need to be configured for library compatibility but are not used and do not need to be connected.

Software Changes

 

This section describes the software changes required to run the “NfcrdlibEx1_DiscoveryLoop” example from the NFC Reader Library which consists in a detection loop that displays in a terminal information (like UID, SAK, and Product Type for MIFARE product-based cards) about any tag detected by the PN5190. Please download the NFC Reader Library for PN5190 from NFC Reader Library | NXP Semiconductors.

To begin with the migration, we first need to create a project with the FRDM-MCXN947 SDK (v26.06.00), for this purpose download and install the FRDM-MCXN947 SDK from the SDK Builder.

Importing NFC Reader Library

  1. Click on “File” from upper tab menu and “Import…”.
  2. In the Import wizard, select “Existing Projects into Workspace”.
  3. In the “Select root directory” search the directory where the downloaded library is located and click on Finish (do not check the “Copy projects into workspace” option).

Habib_MS_0-1781133143312.png

Note: If the K82 SDK is not installed an error message will appear, please click on cancel.

Habib_MS_0-1782234443148.png

 

Creating base project

 

1. In the Quick Start panel click on “import SDK example(s)…” in the MCUXpresso IDE.

2. Select “frdmmcxn947” and click on next.

Habib_MS_1-1781133200020.png

3. Select the SDK example “hello_world_cm33_core0” and click on finish.

Habib_MS_2-1781133254045.png

4.Now we will add the required drivers for migration, which are SPI and CTIMER drivers. . Click on properties-> SDK Management-> Manage SDK Components.

Habib_MS_3-1781133444305.png

5. Search in the filter bar “ctimer” and “lpspi” and check their boxes to add them and click on OK.

Habib_MS_5-1781133510047.png

Habib_MS_6-1781133576098.png

Add the source code Discovery Loop Example

 

From the imported example NfcrdlibEx1_DiscoveryLoop_mcux of the NFC Reader Library, find and copy the following files (included in src folder): NfcrdlibEx1_EmvcoProfile.c, phApp_Helper.c, phApp_Init.c, phApp_PN5190_Init.c; and paste them into the source folder inside the created base project. Additionally, delete the file hello_world .c created by the project.

Habib_MS_0-1781134009079.png            Habib_MS_1-1781134021054.png

Additionally, we need to add the file “NfcrdlibEx1_DiscoveryLoop.c” which is the main source file of the project, to do this right-click on the “source” folder of our project and then put the cursor on “New” and select “File”.

Habib_MS_2-1781134090137.png

In the tab that will open, write the name of the file (NfcrdlibEx1_DiscoveryLoop.c) and then, click on “Finish”.

Habib_MS_3-1781134114470.png

Finally, in the created file copy and paste all the code inside the original source file located in the library example.

Habib_MS_4-1781134170782.png

Habib_MS_5-1781134196935.png

Link the NFC Reader Library elements

 

To make the required software changes, we need to link the DAL, NxpNfcRdLib, phOsal and intfs folders into the base project, to do this:

1. In the Project Explorer, right click on the project and place your cursor on New and click on Folder.

2. In the New Folder tab, click on “Advanced >>” and select “Link to alternate location (Linked Folder)” and on “Browse…”.

Habib_MS_6-1781134337471.png

3. Browse into the path where the library was extracted, choose the NxpNfcRdLib folder and click on Finish.

Habib_MS_7-1781134383646.png

4. Do the same procedure for “Platform/DAL”, “Examples/NfcrdlibEx1_DiscoveryLoop/intfs” and “RTOS/phOsal” folders.

If you have the folder in the same project explorer, the included folder will not appear, but you can see it when you open the window to add another folder, as shown in the following figure.

Habib_MS_8-1781134451238.png

But if the included folders are not in the Project Explorer, the Project should look like this:

Habib_MS_9-1781134500816.png

Once this is done, we will need to delete the “KinetisSDK” folder located in “DAL > src” to avoid multiple definition issues.

Habib_MS_10-1781134521814.png

Define FRDM-MCXN947 SDK preprocessor symbol

 

We need to do some changes to the compiler preprocessor configuration.

1. Right click on the project in the Project Explorer and click on “Properties…

Habib_MS_0-1781134734232.png

2. In the properties tab, go to “C/C++ Build > Settings > MCU C Compiler > Preprocessor”. The symbols are related with the FRDM board, but we need to add the following symbols related with the NFC Reader Library:

  • PH_OSAL_NULLOS
  • PHDRIVER_FRDMMCXN947_PN5190_BOARD
  • NXPBUILD_CUSTOMER_HEADER_INCLUDED
  • PHDRIVER_MCXN947_SPI_POLLING

Habib_MS_1-1781134774044.png

Click on the “Add...” button at the top right corner of the “Defined symbols (-D)” menu and enter each symbol mentioned before.

Habib_MS_0-1782235762579.png

 

These symbols are added so the preprocessor knows which header files to include at build time.

  • PHDRIVER_FRDMMCXN947_PN5190_BOARD will help include the BoardSelection.h header, the file that is going to define addresses for registers and peripherals of MCXN947.
  • PH_OSAL_NULLOS will include headers related to non-OS operation, meaning that the project will work without any operative system (at the end of this guide you will find the steps to add FreeRTOS support).
  • NXPBUILD_CUSTOMER_HEADER_INCLUDED will add headers to add and select the NFC reader and host that will be used in the project.
  • PHDRIVER_MCXN947_SPI_POLLING if is defined the example will perform SPI communication by polling method, and if not, will be perform through non-blocking transfers.

3. Once added, click on “Apply and Close”, "Rebuild Index" and then to “Yes” to save the changes.

Modifying the Driver Abstraction Layer (DAL)

 

The added linked folder DAL will contain the important changes to be able to use the MCXN947 as host device since it will contain all the changes regarding SPI, timer and GPIO configurations required by the library to work properly.

Board_FRDM_MCXN947_PN5190.h

 

We need to create a header file that will contain important macros used by the library that are related to the host specific SPI, timer and GPIO peripherals, as well as interrupt vectors and priorities, clock sources and addresses. This file is required to be inside the “boards” folder which is inside DAL. Please add the header file as the file created NfcrdlibEx1_DiscoveryLoop.c but replacing .c to .h:

Habib_MS_1-1782236163267.png

 

Habib_MS_0-1781196980059.png

The file should be named as shown in the picture above.

Inside this file, some important macros related to the SPI peripheral and the important pins to be handled (IRQ, Chip Select, Reset) are defined.

Habib_MS_1-1781196999826.png

Spoiler
#ifndef DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_
#define DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_
#define GPIO_PORT 0
#define GPIO_PORT1 1
/******************************************************************
* LPSPI clock configuration
******************************************************************/
/*Clock Frequency for SPI Flexcomm 1*/
#define SPI_CLOCK_FREQ (CLOCK_GetLPFlexCommClkFreq(1u))
#define SPI_MASTER_CLOCK_FREQ SPI_CLOCK_FREQ
/******************************************************************
* Board Pin/Gpio configurations
******************************************************************/
#define PHDRIVER_PIN_RESET ((GPIO_PORT << 8) | 28) /**< Reset pin, Pin28, PIO0_28 */
#define PHDRIVER_PIN_IRQ ((GPIO_PORT << 8) | 31)  /**< IRQ pin, Pin10, PIO0_10 */
/* For 5190 busy is same as IRQ */
#define PHDRIVER_PIN_BUSY ((GPIO_PORT << 8) | 31)  /**< IRQ pin, Pin31, PIO0_31 */
#define PHDRIVER_PIN_DWL    ((GPIO_PORT << 8) | 19)  /**< Download pin, Pin19, PIO0_19*/
/* These pins are used for EMVCo Interoperability test status indication,
 * not for the generic Reader Library implementation.
 */
#define PHDRIVER_PIN_SUCCESS   ((GPIO_PORT1 << 8) | 0)   /**< GPIO, Port 1, Pin0 */
#define PHDRIVER_PIN_FAIL      ((GPIO_PORT1 << 8) | 1)   /**< GPIO, Port 1, Pin1 */
/******************************************************************
* PIN Pull-Up/Pull-Down configurations.
******************************************************************/
#define PHDRIVER_PIN_RESET_PULL_CFG    PH_DRIVER_PULL_UP
#define PHDRIVER_PIN_IRQ_PULL_CFG      PH_DRIVER_PULL_DOWN
#define PHDRIVER_PIN_WKUP_PULL_CFG     PH_DRIVER_PULL_UP
#define PHDRIVER_PIN_CLK_PULL_CFG      PH_DRIVER_PULL_UP
#define PHDRIVER_PIN_DWL_PULL_CFG      PH_DRIVER_PULL_UP
#define PHDRIVER_PIN_NSS_PULL_CFG      PH_DRIVER_PULL_UP
#define PHDRIVER_PIN_BUSY_PULL_CFG     PH_DRIVER_PULL_UP

We define the macros as well for the interrupt vector of MCXN947, its priority, handler and trigger type.

Habib_MS_0-1781198808350.png

Spoiler
/******************************************************************
* IRQ PIN NVIC settings
******************************************************************/
#define EINT_IRQn GPIO00_IRQn /*Adding interrupt vector A of GPIO*/
#define EINT_PRIORITY 7 /*Default interrupt priority for GPIO*/
#define CLIF_IRQHandler GPIO00_IRQHandler /*Interrupt handler for vector A*/
#define PIN_IRQ_TRIGGER_TYPE PH_DRIVER_INTERRUPT_RISINGEDGE /*Rising edge Trigger*/

As well as some macros for pin logic levels.

Habib_MS_1-1781198875355.png

Spoiler
/*****************************************************************
* Front End Reset logic level settings
****************************************************************/
#define PH_DRIVER_SET_HIGH 1 /**< Logic High. */
#define PH_DRIVER_SET_LOW 0 /**< Logic Low. */
#define RESET_POWERDOWN_LEVEL PH_DRIVER_SET_LOW
#define RESET_POWERUP_LEVEL PH_DRIVER_SET_HIGH

Finally, we define macros for the base address of CTIMER and SPI peripherals, clock frequencies, interrupt vectors and related pins.

Habib_MS_2-1781198913604.png

Spoiler
/*****************************************************************
* SPI Configuration
****************************************************************/
#define PHDRIVER_MCXN947_SPI_MASTER LPSPI1
#define PHDRIVER_MCXN947_SPI_DATA_RATE 5000000U
#define PHDRIVER_MCXN947_SPI_CLK_SRC SPI_MASTER_CLOCK_FREQ
#define PHDRIVER_MCXN947_SPI_IRQ LP_FLEXCOMM1_IRQn
#define SPI_IRQ_PRIORITY 6 /*SPI interrupt priority*/
#define PHDRIVER_PIN_SSEL  27U/* Chip Select, Pin6, SPI */
#define PHDRIVER_PIN_SCK   25U/* SPI clock, Pin7, SPI */
#define PHDRIVER_PIN_MISO  26U/* MISO, Pin8, SPI */
#define PHDRIVER_PIN_MOSI  24U/* MOSI, Pin9, SPI */
#define PHDRIVER_FC1_SPI_DIV kCLOCK_DivFlexcom1Clk
#define PHDRIVER_FC1_SPI_CLK kFRO12M_to_FLEXCOMM1 /*Clock to attach to Flexcomm1*/
/*****************************************************************
* Timer Configuration
****************************************************************/
#define PH_DRIVER_SDK_CTIMER CTIMER0 /*CTIMER0 base*/
#define PH_DRIVER_SDK_CTIMER_CLK  kCLOCK_DivCtimer0Clk/*CTIMER0 clock*/
#define PH_DRIVER_SDK_CTIMER_NVIC CTIMER0_IRQn /*Interrupt vector*/
#define PH_DRIVER_SDK_CTIMER_PRIORITY 4
#define PH_DRIVER_SDK_CTIMER_CLK_FREQ CLOCK_GetCTimerClkFreq(0U) /*CTIMER0 Clock frequency*/

#endif /* DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_ */

MCXN947 SPI and SDK files

 

Now, inside DAL > src folder we will create a folder named “MCXN947” that will contain 2 source files:

  • phbalReg_Mcxn947Spi.c
  • phDriver_Mcxn947SDK.c

Habib_MS_3-1781198965225.png

Inside these source files we will modify the functions from the source files of other board hosts with the specific configurations of MCXN947 peripheral drivers, such as SPI, timers, GPIOs and interrupt handlers. This is done based on SDK examples such as “ctimer_match_interrupt_example_cm33_core0” and “lpspi_polling_b2b_transfer_master_cm33_core0”.

phbalReg_Mcxn947Spi.c:

 

In this file we first need to include the necessary files and include the headers and callbacks to ensure the correct functionality:

Habib_MS_4-1781199007051.png

Spoiler
#include "phDriver.h"
#include <board.h>
#include "BoardSelection.h"
#include <fsl_lpspi.h>
#include <fsl_clock.h>
#include <fsl_port.h>

#define PHBAL_REG_MCXN947_SPI_ID 0x0FU /**< ID for MCXN947 SPI BAL component */
#define RX_BUFFER_SIZE_MAX                     272U /* Receive Buffer size while exchange */

#ifndef PHDRIVER_MCXN947_SPI_POLLING
lpspi_master_handle_t g_masterHandle;
/* LPSPI user callback */
void LPSPI_MasterUserCallback(LPSPI_Type *base, lpspi_master_handle_t *handle, status_t status, void *userData);
#endif
static void phbalReg_Mcxn947SpiConfig(void);
#ifndef PHDRIVER_MCXN947_SPI_POLLING
volatile bool isTransferCompleted  = false;
void LPSPI_MasterUserCallback(LPSPI_Type *base, lpspi_master_handle_t *handle, status_t status, void *userData)
{
    if (status == kStatus_Success)
    {
        __NOP();
    }
    isTransferCompleted = true;
}
#endif

After, we will define the phbalReg_Init function, which will be used by the library to initialize the SPI peripheral in this case, and it is defined as follows:

Habib_MS_5-1781199067774.png

Spoiler
phStatus_t phbalReg_Init( void * pDataParams, uint16_t wSizeOfDataParams)
{
	lpspi_master_config_t userConfig;
	uint32_t srcFreq = 0;
	if((pDataParams == NULL) || (sizeof(phbalReg_Type_t) != wSizeOfDataParams))
	{
	return (PH_DRIVER_ERROR | PH_COMP_DRIVER);
	}
	((phbalReg_Type_t *)pDataParams)->wId = PH_COMP_DRIVER | PHBAL_REG_MCXN947_SPI_ID;
	((phbalReg_Type_t *)pDataParams)->bBalType = PHBAL_REG_TYPE_SPI;
	/*Initialize Flexcomm1 clock*/
	/* attach FRO 12M to FLEXCOMM1 */
	CLOCK_SetClkDiv(PHDRIVER_FC1_SPI_DIV, 1u);
	CLOCK_AttachClk(PHDRIVER_FC1_SPI_CLK);
	/*Configure SPI pins*/
	phbalReg_Mcxn947SpiConfig();
	/*SPI configuration*/
	LPSPI_MasterGetDefaultConfig(&userConfig);
	userConfig.baudRate = PHDRIVER_MCXN947_SPI_DATA_RATE;
	srcFreq = SPI_MASTER_CLOCK_FREQ;
	userConfig.whichPcs = (lpspi_which_pcs_t)kLPSPI_Pcs0;
	userConfig.pcsActiveHighOrLow = (lpspi_pcs_polarity_config_t)kLPSPI_PcsActiveLow;
	userConfig.pcsToSckDelayInNanoSec        = 1000000000U / (userConfig.baudRate * 1U);
	userConfig.lastSckToPcsDelayInNanoSec    = 1000000000U / (userConfig.baudRate * 1U);
	userConfig.betweenTransferDelayInNanoSec = 1000000000U / (userConfig.baudRate * 1U);

	/*Initialize SPI*/
#ifdef PHDRIVER_MCXN947_SPI_POLLING
	LPSPI_MasterInit(PHDRIVER_MCXN947_SPI_MASTER, &userConfig, srcFreq);
#else
	LPSPI_MasterInit(PHDRIVER_MCXN947_SPI_MASTER, &userConfig, srcFreq);
    LPSPI_MasterTransferCreateHandle(PHDRIVER_MCXN947_SPI_MASTER, &g_masterHandle, LPSPI_MasterUserCallback, NULL);
#endif
	return PH_DRIVER_SUCCESS;
}

We have to define the phbalReg_Exchange function as well, which is used for communicating via SPI with the PN5190.

Habib_MS_0-1781200864120.png

Habib_MS_1-1781200889109.png

Spoiler
phStatus_t phbalReg_Exchange(
				void * pDataParams,
				uint16_t wOption,
				uint8_t * pTxBuffer,
				uint16_t wTxLength,
				uint16_t wRxBufSize,
				uint8_t * pRxBuffer,
				uint16_t * pRxLength
				)
{
    phStatus_t status = PH_DRIVER_SUCCESS;
    uint8_t * pRxBuf;
    status_t lpspiStatus;
    lpspi_transfer_t g_masterXfer;
    uint8_t g_dummyBuffer[RX_BUFFER_SIZE_MAX];
    if(pRxBuffer == NULL)
    {
        pRxBuf = g_dummyBuffer;
    }
    else
    {
        pRxBuf = pRxBuffer;
    }
    if(pTxBuffer == NULL)
    {
        wTxLength = wRxBufSize;
        g_dummyBuffer[0] = 0xFF;
        pTxBuffer = g_dummyBuffer;
    }
    memset(&g_masterXfer, 0, sizeof(lpspi_transfer_t));
    /* Set up the transfer */
    g_masterXfer.txData = pTxBuffer;
    g_masterXfer.rxData = pRxBuf;
    g_masterXfer.dataSize = wTxLength;
    g_masterXfer.configFlags = kLPSPI_MasterPcs0 | kLPSPI_MasterPcsContinuous | kLPSPI_MasterByteSwap;
    /* Start transfer */
#ifdef PHDRIVER_MCXN947_SPI_POLLING
    lpspiStatus = LPSPI_MasterTransferBlocking(PHDRIVER_MCXN947_SPI_MASTER, &g_masterXfer);
#else
    lpspiStatus = LPSPI_MasterTransferNonBlocking(PHDRIVER_MCXN947_SPI_MASTER, &g_masterHandle, &g_masterXfer);
    /* Wait transfer complete */
    while (!isTransferCompleted)
    {
    }
#endif
    if (lpspiStatus != kStatus_Success)
    {
        return (PH_DRIVER_FAILURE | PH_COMP_DRIVER);
    }
    if (pRxLength != NULL)
    {
        *pRxLength = wTxLength;
    }
#ifndef PHDRIVER_MCXN947_SPI_POLLING
    SDK_DelayAtLeastUs(300U, BOARD_BOOTCLOCKPLL150M_CORE_CLOCK);
#endif
    return status;
}

Finally, we will define the phbalReg_Mcxn947SpiConfig function, which is called by phbalReg_Init to configure the SPI pins on the MCXN947:

Habib_MS_2-1781200981954.png

Spoiler
static void phbalReg_Mcxn947SpiConfig(void)
{
    const port_pin_config_t port0_24_pinB6_config = {
kPORT_PullUp,
                                                     kPORT_LowPullResistor,
                                                     kPORT_SlowSlewRate,
                                                  kPORT_PassiveFilterDisable,
                                                     kPORT_OpenDrainDisable,
                                                     kPORT_LowDriveStrength,
                                           /* Pin is configured as FC1_P0 */
                                                     kPORT_MuxAlt2,
                                                     kPORT_InputBufferEnable,
                                                     kPORT_InputNormal,
                                                     kPORT_UnlockRegister};
    /* PORT0_24 (pin B6) is configured as SPI_MOSI */
    PORT_SetPinConfig(PORT0, 24U, &port0_24_pinB6_config);

    const port_pin_config_t port0_25_pinA6_config = {kPORT_PullUp,
                                                     kPORT_LowPullResistor,
                                                     kPORT_SlowSlewRate,
                                                 kPORT_PassiveFilterDisable,
                                                     kPORT_OpenDrainDisable,
                                                     kPORT_LowDriveStrength,
                                            /* Pin is configured as FC1_P1 */
                                                     kPORT_MuxAlt2,
                                                     kPORT_InputBufferEnable,
                                                     kPORT_InputNormal,
                                                     kPORT_UnlockRegister};
    /* PORT0_25 (pin A6) is configured as SPI_SCK */
    PORT_SetPinConfig(PORT0, 25U, &port0_25_pinA6_config);
const port_pin_config_t port0_26_pinF10_config = {kPORT_PullUp,
                                                      kPORT_LowPullResistor,
                                                      kPORT_SlowSlewRate,
                                                 kPORT_PassiveFilterDisable,
                                                      kPORT_OpenDrainDisable,
                                                      kPORT_LowDriveStrength,
                                            /* Pin is configured as FC1_P2 */
                                                      kPORT_MuxAlt2,
                                                     kPORT_InputBufferEnable,
                                                      kPORT_InputNormal,
                                                      kPORT_UnlockRegister};
    /* PORT0_26 (pin F10) is configured as SPI_MISO */
    PORT_SetPinConfig(PORT0, 26U, &port0_26_pinF10_config);

    const port_pin_config_t port0_27_pinE10_config = {kPORT_PullUp,
                                                      kPORT_LowPullResistor,
                                                      kPORT_SlowSlewRate,
                                                  kPORT_PassiveFilterDisable,
                                                      kPORT_OpenDrainDisable,
                                                      kPORT_LowDriveStrength,
                                            /* Pin is configured as FC1_P3 */
                                                      kPORT_MuxAlt2,
                                                     kPORT_InputBufferEnable,
                                                      kPORT_InputNormal,
                                                      kPORT_UnlockRegister};
    /* PORT0_27 (pin E10) is configured as SPI_CS */
    PORT_SetPinConfig(PORT0, 27U, &port0_27_pinE10_config);
}

phDriver_Mcxn947SDK.c:

 

In this file we will have the following definitions and includes that describe relevant characteristics of the ctimer (configuration structures, interrupt handlers and maximum count value), and of the GPIO port:

Habib_MS_3-1781201256179.png

 

Spoiler
#include "phDriver.h"
#include "BoardSelection.h"
#include "fsl_device_registers.h"
#include <fsl_gpio.h>
#include <fsl_ctimer.h>
/* ***********************************************************************************************************
* Internal Definitions
* ********************************************************************************************************** */
#define MCXN947_TIMER_MAX_32BIT 0xFFFFFFFFU
#define CTIMER_HANDLER CTIMER0_IRQHandler
/* ***********************************************************************************************************
 * * Type Definitions
*********************************************************************************************************** */
volatile bool ctimerIsrFlag = false;
/* ***********************************************************************************************************
* Global and Static Variables
*
* Match Configuration for CTIMER Channel 0*/
static ctimer_match_config_t matchConfig0;
/* Total Size: NNNbytes
* ********************************************************************************************************** */
/* Array initializer of GPIO peripheral base pointers */
static const GPIO_Type *pGpiosBaseAddr[] = GPIO_BASE_PTRS;

static pphDriver_TimerCallBck_t pCTimerCallBack;
static volatile uint8_t dwTimerExp;

static const gpio_interrupt_config_t aInterruptTypes[] = {kGPIO_InterruptLogicZero, /* Unused. */
        kGPIO_InterruptLogicZero,
        kGPIO_InterruptLogicOne,
        kGPIO_InterruptRisingEdge,
        kGPIO_InterruptFallingEdge,
        kGPIO_InterruptEitherEdge,
};
/* ***********************************************************************************************************
* Private Functions Prototypes
* ********************************************************************************************************** */
static void phDriver_CTimerIsrCallBack(void);

We will define the following functions to initialize and stop the timer, and to enable timer interruptions and its callback:

 

Habib_MS_4-1781201344846.png

Habib_MS_5-1781201376952.png

Spoiler
phStatus_t phDriver_TimerStart(phDriver_Timer_Unit_t eTimerUnit, uint32_t dwTimePeriod,
pphDriver_TimerCallBck_t pTimerCallBack)
{
	uint64_t qwTimerCnt;
	uint32_t dwTimerFreq;

	dwTimerFreq = PH_DRIVER_SDK_CTIMER_CLK_FREQ;

	qwTimerCnt = dwTimerFreq;
	qwTimerCnt = (qwTimerCnt / eTimerUnit);
	qwTimerCnt = (dwTimePeriod * qwTimerCnt);
	/* 32-bit timers. */
	if(qwTimerCnt > (uint64_t)MCXN947_TIMER_MAX_32BIT)
	{
		return PH_DRIVER_ERROR | PH_COMP_DRIVER;
	}
	if(pTimerCallBack == NULL) /* Timer Start is blocking call. */
	{
		dwTimerExp = 0;
		pCTimerCallBack = phDriver_CTimerIsrCallBack;
	}
	else /* Call the Timer callback. */
	{
		pCTimerCallBack = pTimerCallBack;
	}
	/*Configure & start CTIMER*/
	/*Ctimer config structure*/
	ctimer_config_t config;

	/*Timer mode, init*/
	CTIMER_GetDefaultConfig(&config);
	CTIMER_Init(PH_DRIVER_SDK_CTIMER, &config);
	CTIMER_EnableInterrupts(PH_DRIVER_SDK_CTIMER, kCTIMER_Match0InterruptEnable|kCTIMER_Capture0InterruptEnable);
	/* Configuration match 0 */
	matchConfig0.enableCounterReset = true;
	matchConfig0.enableCounterStop 	= false;
	matchConfig0.matchValue 	 	= (uint32_t)qwTimerCnt;
	matchConfig0.outControl 		= kCTIMER_Output_NoAction;
	matchConfig0.outPinInitState 	= false;
	matchConfig0.enableInterrupt 	= true;

	EnableIRQ(PH_DRIVER_SDK_CTIMER_NVIC);
NVIC_SetPriority(PH_DRIVER_SDK_CTIMER_NVIC, PH_DRIVER_SDK_CTIMER_PRIORITY);
	/*Setup Match*/
	CTIMER_SetupMatch(PH_DRIVER_SDK_CTIMER, kCTIMER_Match_0, &matchConfig0);
	/*Start*/
	CTIMER_StartTimer(PH_DRIVER_SDK_CTIMER);
	while (true)
	{
		/* Check whether an interrupt occurred */
		if (true == ctimerIsrFlag && dwTimerExp)
		{
			/* Clear interrupt flag*/
			ctimerIsrFlag = false;
			break;
		}
	}

	return PH_DRIVER_SUCCESS;
}

Habib_MS_7-1781201652469.png

Spoiler
phStatus_t phDriver_TimerStop(void)
{
	/*Stop timer & disable interrupts*/
	CTIMER_StopTimer(PH_DRIVER_SDK_CTIMER);
	CTIMER_DisableInterrupts(PH_DRIVER_SDK_CTIMER, kCTIMER_Match0InterruptEnable|kCTIMER_Capture0InterruptEnable);

	/* Disable at the NVIC */
	DisableIRQ(PH_DRIVER_SDK_CTIMER_NVIC);

	return PH_DRIVER_SUCCESS;
}

We will also have definitions for the functions that configure and handle GPIOs of the MCXN947 and enable interruptions.

Habib_MS_0-1781201935240.png

Spoiler
phStatus_t phDriver_PinConfig(uint32_t dwPinNumber, phDriver_Pin_Func_t ePinFunc, phDriver_Pin_Config_t *pPinConfig)
{
	gpio_pin_config_t sGpioConfig;
	uint8_t bPinNum;
	uint8_t bPortGpio;

	if((ePinFunc == PH_DRIVER_PINFUNC_BIDIR) || (pPinConfig == NULL))
	{
		return PH_DRIVER_ERROR | PH_COMP_DRIVER;
	}
	/* Extract the Pin, Gpio, Port details from dwPinNumber */
	bPinNum = (uint8_t)(dwPinNumber & 0xFF);
	bPortGpio = (uint8_t)((dwPinNumber & 0xFF00)>>8);

	sGpioConfig.pinDirection = (ePinFunc == PH_DRIVER_PINFUNC_OUTPUT) ? kGPIO_DigitalOutput:kGPIO_DigitalInput;
	sGpioConfig.outputLogic = pPinConfig->bOutputLogic;

	if(ePinFunc == PH_DRIVER_PINFUNC_INTERRUPT)
	{
		gpio_interrupt_config_t intConfig = aInterruptTypes[(uint8_t)pPinConfig->eInterruptConfig];

		GPIO_GpioClearInterruptFlags((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum);
		GPIO_SetPinInterruptConfig((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum, intConfig);
		EnableIRQ(EINT_IRQn);

		GPIO_PinInit((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT],bPinNum,&sGpioConfig);
	}
	else
	{
		GPIO_PinInit((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT],bPinNum,&sGpioConfig);
	}

	return PH_DRIVER_SUCCESS;
}

Habib_MS_1-1781202317214.png

Spoiler
uint8_t phDriver_PinRead(uint32_t dwPinNumber, phDriver_Pin_Func_t ePinFunc)
{
	uint8_t bValue;
	uint32_t intStatus;
	uint8_t bGpioNum;
	uint8_t bPinNum;

	/* Extract the Pin, Gpio details from dwPinNumber */
	bPinNum = (uint8_t)(dwPinNumber & 0xFF);
	bGpioNum = (uint8_t)((dwPinNumber & 0xFF00)>>8);

	if(ePinFunc == PH_DRIVER_PINFUNC_INTERRUPT)
	{
		/*Get value of pin interrupt status*/
		intStatus = GPIO_PinGetInterruptFlag((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum);
		bValue = intStatus ? 1:0;
	}
	else
	{
		/*Read pin value*/
		bValue = (uint8_t)GPIO_PinRead((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum);
	}
	return bValue;
}

 

Habib_MS_3-1781202436423.png

Spoiler
void phDriver_PinWrite(uint32_t dwPinNumber, uint8_t bValue)
{
	uint8_t bGpioNum;
	uint8_t bPinNum;

	/* Extract the Pin, Gpio details from dwPinNumber */
	bPinNum = (uint8_t)(dwPinNumber & 0xFF);
	bGpioNum = (uint8_t)((dwPinNumber & 0xFF00)>>8);

	GPIO_PinWrite((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum, bValue);
}

void phDriver_PinClearIntStatus(uint32_t dwPinNumber)
{
	uint8_t bGpioNum;
	uint8_t bPinNum;

	/* Extract the Pin, Gpio details from dwPinNumber */
	bPinNum = (uint8_t)(dwPinNumber & 0xFF);
	bGpioNum = (uint8_t)((dwPinNumber & 0xFF00)>>8);

	/*Clear interrupt flag*/
	GPIO_GpioClearInterruptFlags((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], (1U << bPinNum));
}

It is also necessary to add functions required for the library to function correctly.

Habib_MS_4-1781202506101.png

Spoiler
void phDriver_EnterCriticalSection(void)
{
    NVIC_DisableIRQ(EINT_IRQn);
}

void phDriver_ExitCriticalSection(void)
{
	NVIC_EnableIRQ(EINT_IRQn);
}

phStatus_t phDriver_IRQPinRead(uint32_t dwPinNumber)
{
	phStatus_t bGpioVal = false;

	bGpioVal = phDriver_PinRead(dwPinNumber, PH_DRIVER_PINFUNC_INPUT);

	return bGpioVal;
}
phStatus_t phDriver_IRQPinPoll(uint32_t dwPinNumber, phDriver_Pin_Func_t ePinFunc, phDriver_Interrupt_Config_t eInterruptType)
{
    uint8_t    bGpioState = 0;

    if ((eInterruptType != PH_DRIVER_INTERRUPT_RISINGEDGE) && (eInterruptType != PH_DRIVER_INTERRUPT_FALLINGEDGE))
    {
        return PH_DRIVER_ERROR | PH_COMP_DRIVER;
    }

    if (eInterruptType == PH_DRIVER_INTERRUPT_FALLINGEDGE)
    {
        bGpioState = 1;
    }

	while(phDriver_PinRead(dwPinNumber, ePinFunc) == bGpioState);

    return PH_DRIVER_SUCCESS;
}

Finally, here, we will have the definition of the timer interrupt handler and ISR callback.

Habib_MS_5-1781202601491.png

Spoiler
void CTIMER0_IRQHandler(void)
{
	/* Clear interrupt flag.*/
	CTIMER_ClearStatusFlags(PH_DRIVER_SDK_CTIMER, kCTIMER_Match0Flag|kCTIMER_Capture0Flag);
	/* Single shot timer. Stop it. */
	CTIMER_StopTimer(PH_DRIVER_SDK_CTIMER);
	CTIMER_DisableInterrupts(PH_DRIVER_SDK_CTIMER, kCTIMER_Match0InterruptEnable|kCTIMER_Capture0InterruptEnable);
	pCTimerCallBack();

	ctimerIsrFlag = true;
}

static void phDriver_CTimerIsrCallBack(void)
{
	dwTimerExp = 1;
}

With these additions, we have all the functions needed (based on the FRDM-MCXN947 SDK) by the library to communicate with the PN5190.

BoardSelection.h

 

In this header file, which is found at “DAL > cfg” we will add the definition set in the preprocessor settings to use the FRDM-MCXN947 board as host by adding the following lines to the file:

Habib_MS_6-1781202691439.png

Spoiler
#ifdef PHDRIVER_FRDMMCXN947_PN5190_BOARD
#    include <Board_FRDM_MCXN947_PN5190.h>
#endif

ph_NxpBuild_App.h

 

In this header found at “intfs” folder, we will add our board support to use it with the PN5190 by adding the following change:

Habib_MS_7-1781202815632.png

Spoiler
#if defined(PHDRIVER_LPC1769PN5190_BOARD) \
    || defined(PHDRIVER_K82F_PNEV5190B_BOARD)\
	|| defined(PHDRIVER_FRDMMCXN947_PN5190_BOARD)
#   define NXPBUILD__PHHAL_HW_PN5190
#endif

phApp_Init.h

 

In this header located at “intfs” folder we will add the required include files for the initialization of our board and enable the correct debug interface.

Habib_MS_8-1781202847396.png

Spoiler
/*Check for MCXN controller based boards*/
#if defined (PHDRIVER_FRDMMCXN947_PN5190_BOARD)
#define PHDRIVER_FRDM_MCXN947
#endif
#ifdef PHDRIVER_FRDM_MCXN947
#include <fsl_debug_console.h>
#include <stdio.h>
#include <fsl_gpio.h>
#include <fsl_ctimer.h>
#include <fsl_clock.h>
#include <fsl_lpspi.h>
#endif


Please replace this line.

Spoiler

 

#if defined(PHDRIVER_KINETIS_K82)|| defined(PHDRIVER_FRDM_MCXN947)

phApp_Init.c

 

Finally, in this source file we will add the initialization code for the MCXN947 to complement the initialization macros defined in the previous phApp_Init.h file modification. Here we will call functions to initialize clocks and UART pins.

Habib_MS_0-1781205399694.png

 

Spoiler
#ifdef PHDRIVER_FRDM_MCXN947
#include "fsl_common.h"
#include "pin_mux.h"
#include "clock_config.h"
#include "board.h"
static void phApp_MCXN947_Init(void){
	BOARD_InitBootPins();
	BOARD_InitBootClocks();
	BOARD_InitDebugConsole();
}
#endif

 

Spoiler
#elif defined(PHDRIVER_FRDM_MCXN947)
    phApp_MCXN947_Init();

These functions are used to initialize the correspondent clocks of each peripheral such as CTIMER, the input pins multiplexor for selecting GPIO functionality and FLEXCOMM for SPI. In here we also set the GPIO functionality for pins P0_31 and P0_28 (IRQ and RESET), as well as UART3 for printing the tag information on the serial port connected to the computer.

Additionally, we need to set the NVIC priority to ensure that interrupts can occur. Add the NVIC_SetPriority() function to phApp_Configure_IRQ().

Habib_MS_1-1781205512787.png

Spoiler
#ifdef PH_PLATFORM_HAS_ICFRONTEND
#if !(defined(PH_OSAL_LINUX) && defined(NXPBUILD__PHHAL_HW_PN5190))
    phDriver_Pin_Config_t pinCfg;
    NVIC_SetPriority(EINT_IRQn, EINT_PRIORITY);
    pinCfg.bOutputLogic = PH_DRIVER_SET_LOW;
    pinCfg.bPullSelect = PHDRIVER_PIN_IRQ_PULL_CFG;

    pinCfg.eInterruptConfig = PIN_IRQ_TRIGGER_TYPE;
    phDriver_PinConfig(PHDRIVER_PIN_IRQ, PH_DRIVER_PINFUNC_INTERRUPT, &pinCfg);

#endif

pin_mux.c

 

Inside the function “BOARD_InitBootPins()” which is defined in board -> pin_mux.c file, the following initializations need to be added:

Habib_MS_3-1781205793803.png

Spoiler
void BOARD_InitBootPins(void)
{
    /* Use FRO HF clock for some of the Ctimers */
    CLOCK_SetClkDiv(kCLOCK_DivCtimer0Clk, 1u);
    CLOCK_AttachClk(kFRO_HF_to_CTIMER0);

    CLOCK_EnableClock(kCLOCK_Gpio0);
    CLOCK_EnableClock(kCLOCK_Gpio1);
    BOARD_InitPins();
}

Additionally, within the “BOARD_InitPins()” function available in the same file, we will replace the initializations of the GPIO and UART pins.

Habib_MS_4-1781205847058.png

Habib_MS_5-1781205872354.png

Habib_MS_6-1781205919494.png

Spoiler
void BOARD_InitPins(void)
{
    /* Enables the clock for PORT0 controller: Enables clock */
    CLOCK_EnableClock(kCLOCK_Port0);
    /* Enables the clock for PORT1: Enables clock */
    CLOCK_EnableClock(kCLOCK_Port1);

    const port_pin_config_t port0_19_config = {/* Internal pull-up/down resistor is disabled */
                                                      kPORT_PullDisable,
                                         /* Low internal pull resistor value is selected. */
                                                      kPORT_LowPullResistor,
                                                      /* Fast slew rate is configured */
                                                      kPORT_FastSlewRate,
                                                      /* Passive input filter is disabled */
                                                      kPORT_PassiveFilterDisable,
                                                      /* Open drain output is disabled */
                                                      kPORT_OpenDrainDisable,
                                                      /* Low drive strength is configured */
                                                      kPORT_LowDriveStrength,
                                                      /* Pin is configured as PIO0_10 */
                                                      kPORT_MuxAlt0,
                                                      /* Digital input enabled */
                                                      kPORT_InputBufferEnable,
                                                      /* Digital input is not inverted */
                                                      kPORT_InputNormal,
                                     /* Pin Control Register fields [15:0] are not locked */
                                                      kPORT_UnlockRegister};
    /* PORT0_10 (pin B12) is configured as PIO0_10 */
    PORT_SetPinConfig(PORT0, 19U, &port0_19_config);

    const port_pin_config_t port1_0_config = {
                                                      kPORT_PullDisable,
                                                      kPORT_LowPullResistor,
                                                      kPORT_FastSlewRate,
                                                      kPORT_PassiveFilterDisable,
                                                      kPORT_OpenDrainDisable,
                                                      kPORT_LowDriveStrength,
                                                      /* Pin is configured as PIO0_10 */
                                                      kPORT_MuxAlt0,
                                                      kPORT_InputBufferEnable,
                                                      kPORT_InputNormal,
                                                      kPORT_UnlockRegister};
    /* PORT0_10 (pin B12) is configured as PIO0_10 */
    PORT_SetPinConfig(PORT1, 0U, &port1_0_config);
    const port_pin_config_t port1_1_config = {
                                                      kPORT_PullDisable,
                                                      kPORT_LowPullResistor,
                                                      kPORT_FastSlewRate,
                                                      kPORT_PassiveFilterDisable,
                                                      kPORT_OpenDrainDisable,
                                                      kPORT_LowDriveStrength,
                                                      /* Pin is configured as PIO0_10 */
                                                      kPORT_MuxAlt0,
                                                      kPORT_InputBufferEnable,
                                                      kPORT_InputNormal,
                                                      kPORT_UnlockRegister};
    /* PORT0_10 (pin B12) is configured as PIO0_10 */
    PORT_SetPinConfig(PORT1, 1U, &port1_1_config);
    const port_pin_config_t port0_31_pinB12_config = {
                                                      kPORT_PullDown,
                                                      kPORT_LowPullResistor,
                                                      kPORT_FastSlewRate,
                                                      kPORT_PassiveFilterDisable,
                                                      kPORT_OpenDrainDisable,
                                                      kPORT_LowDriveStrength,
                                                      /* Pin is configured as PIO0_10 */
                                                      kPORT_MuxAlt0,
                                                      kPORT_InputBufferEnable,
                                                      kPORT_InputNormal,
                                                      kPORT_UnlockRegister};
    /* PORT0_10 (pin B12) is configured as PIO0_10 */
    PORT_SetPinConfig(PORT0, 31U, &port0_31_pinB12_config);

    const port_pin_config_t port0_28_config = {
                                                     kPORT_PullDisable,
                                                     kPORT_LowPullResistor,
                                                     kPORT_FastSlewRate,
                                                     kPORT_PassiveFilterDisable,
                                                     kPORT_OpenDrainDisable,
                                                     kPORT_LowDriveStrength,
                                                     /* Pin is configured as PIO0_6 */
                                                     kPORT_MuxAlt0,
                                                     kPORT_InputBufferEnable,
                                                     kPORT_InputNormal,
                                                     kPORT_UnlockRegister};
    /* PORT0_6 (pin C14) is configured as PIO0_6 */
    PORT_SetPinConfig(PORT0, 28U, &port0_28_config);

    const port_pin_config_t port0_2_pinB16_config = {
                                                     .pullSelect = kPORT_PullDisable,
                                                     .pullValueSelect = kPORT_LowPullResistor,
                                                     .slewRate = kPORT_FastSlewRate,
                                               .passiveFilterEnable = kPORT_PassiveFilterDisable,
                                                     .openDrainEnable = kPORT_OpenDrainDisable,
                                                     .driveStrength = kPORT_HighDriveStrength,
                                                     /* Pin is configured as SWO */
                                                     .mux = kPORT_MuxAlt1,
                                                     .inputBuffer = kPORT_InputBufferEnable,
                                                     .invertInput = kPORT_InputNormal,
                                                     .lockRegister = kPORT_UnlockRegister};
    /* PORT0_2 (pin B16) is configured as SWO */
    PORT_SetPinConfig(PORT0, 2U, &port0_2_pinB16_config);

    const port_pin_config_t port1_8_pinA1_config = {
                                                    .pullSelect = kPORT_PullUp,
                                                    .pullValueSelect = kPORT_LowPullResistor,
                                                    .slewRate = kPORT_FastSlewRate,
                                              .passiveFilterEnable = kPORT_PassiveFilterDisable,
                                                    .openDrainEnable = kPORT_OpenDrainDisable,
                                                    .driveStrength = kPORT_LowDriveStrength,
                                                    /* Pin is configured as FC4_P0 */
                                                    .mux = kPORT_MuxAlt2,
                                                    .inputBuffer = kPORT_InputBufferEnable,
                                                    .invertInput = kPORT_InputNormal,
                                                    .lockRegister = kPORT_UnlockRegister};
    /* PORT1_8 (pin A1) is configured as FC4_P0 */
    PORT_SetPinConfig(PORT1, 8U, &port1_8_pinA1_config);
   const port_pin_config_t port1_9_pinB1_config = {
                                                   .pullSelect = kPORT_PullDisable,
                                                    .pullValueSelect = kPORT_LowPullResistor,
                                                    .slewRate = kPORT_FastSlewRate,
                                               .passiveFilterEnable = kPORT_PassiveFilterDisable,
                                                    .openDrainEnable = kPORT_OpenDrainDisable,
                                                    .driveStrength = kPORT_LowDriveStrength,
                                                    /* Pin is configured as FC4_P1 */
                                                    .mux = kPORT_MuxAlt2,
                                                    .inputBuffer = kPORT_InputBufferEnable,
                                                    .invertInput = kPORT_InputNormal,
                                                    .lockRegister = kPORT_UnlockRegister};
    /* PORT1_9 (pin B1) is configured as FC4_P1 */
    PORT_SetPinConfig(PORT1, 9U, &port1_9_pinB1_config);
}

At the same time, add the following includes to the file:

Habib_MS_0-1781207973118.png

Spoiler
#include "fsl_common.h"
#include "fsl_port.h"
#include "board.h"
#include "clock_config.h"
#include "pin_mux.h"

Adding include paths

 

Since we are including header files into the project, we must specify which directories to search in order to find the required files. To do this:

1. Open project properties (right-click on project > Properties).

2.Click on the drop menu “C/C++ Build”, then “Settings”.

3.Click on “Includes” option.

Habib_MS_1-1781208012765.png

4.Click on the “Add..” button at the top right corner of the “Include paths (-l)” menu.

5. Click on “Workspace…”

Habib_MS_2-1781208068003.png

6. Add the following highlighted directories from FRDM-MCXN project:

Habib_MS_3-1781208097487.png

7. Accept the changes and click on “Apply and Close”.

Add “root folder” to source location

 

1.Open project properties.

2. Click on the drop menu “C/C++ General”, then “Paths and Symbols”.

3. Click on the “Source Location” tab.

4.Click on “Add Folder…” and add the “<root folder>”.

Habib_MS_4-1781208199983.png

Delete phOsal files

 

We must delete from the path “phOsal > src > NullOs > portable” the files: “phOsal_Port_CM3.c”,“phOsal_Port_PN76xx.c” and “phOsal_Port_PN74xxxx.c”. This has the purpose of avoiding any multiple definition errors when compiling the final project.

Add _DSB and _ISB support

 

As final modification step, please include in NxpNfcRdLib->comps->phhalHw->src->PN5190-> phhalHw_Pn5190_Int.c the  “cmsis_gcc.h” to support of _DSB and _ISB functions.

Habib_MS_5-1781208264265.png

Testing Final Project Without OS

 

After making all the previous changes and modifications, the migration is now complete, and we can proceed to compile and flash the example to MCXN947.

Please “clean” the project before building by right clicking on the project as follows:

Habib_MS_6-1781208329457.png

To run the project, we will need a serial terminal like Tera Term with the following settings:

- 115200 baud rate.

- 8 data bits.

- No parity.

- One stop bit,

- No flow control.

Once the program is flashed and the serial terminal configured, we can reset the board and power the PNEV5190BP. You should see an output similar to the following:

Habib_MS_7-1781208358485.png

Now if any NFC tag is close to the PNEV5190BP’s antenna, you should see the information displayed as shown in the image below:

Habib_MS_8-1781208378570.png

Adding FreeRTOS support

 

This section presents the steps to follow to add FreeRTOS support to the current project with the possibility of easily choosing either to have OS support or not.

1. Open the “Manage SDK Components” in properties->SDK Management.

Habib_MS_9-1781208421419.png

2. Search the FreeRTOS kernel component (NXP integration layer), heap 4 and add it to your project.

Habib_MS_0-1785533111303.png

 

Note: If this option does not appear, you will have to download the SDK with the FreeRTOS stack included.

Adding porting-specific files to FreeRTOS folder

 

We need to set the core-specific files which define core register addresses and the assembly instructions that integrate the FreeRTOS kernel functions. The core integrating the MCXN947 IC is the Cortex M33 with Trust Zone, therefore, the folder that we will use to add the port files will be from the folder “ARM_CM33_NTZ” as explained below:

1. Import the SDK example called “freertos_hello_cm33_core0”:

Habib_MS_11-1781208505026.png

2. Inside this example, you will see the folder “GCC” from the path freertos>freertoskernel>portable>GCC, please copy and paste this folder into the same path of the project.

Habib_MS_2-1785533633824.pngHabib_MS_3-1785533645497.png

 

 

Adding port-specific created folder to include path.

 

Now we need to tell the compiler where to find the port-specific files we just added to the project, to accomplish this:

1. Open the project properties (right-click on project > Properties) and click on “C/C++ General” and on “Paths and symbols”.

Habib_MS_14-1781208609258.png

2. Here we will click on “Add…” and then “Workspace”. In the new tab we will search the last folder of the path we created (freertos/freertoskernel/portable/GCC/ARM_CM33_NTZ/non-secure), select it and click on “OK”

Habib_MS_1-1785533523574.png

 

3. Repeat this step in project > Properties > “C/C++ Build” >Settings >“Includes”.

Habib_MS_16-1781208764822.png

Changing OS preprocessor macro

 

Finally, we just need to tell the compiler that we want to run the example with FreeRTOS, to do this:

1. Open the project properties (right-click on project > Properties) and click on “C/C++ Build”, then on “Settings” and on “Preprocessor”.

Habib_MS_17-1781208849806.png

2. Now find the previous macro named “PH_OSAL_NULLOS”, double click on it and change it to “PH_OSAL_FREERTOS”

Habib_MS_18-1781209097027.png

3. Click on “Apply and Close” and click on “Rebuild Index”.

4. To avoid multiple definition issues when we change between NULLOS and FREERTOS, we will discard the SysTickHandler for FREERTOS side located in port.c when the NULLOS macro is defined, as shown the following image:

Habib_MS_0-1781896206808.png

Spoiler
#ifndef PH_OSAL_NULLOS
void SysTick_Handler( void ) /* PRIVILEGED_FUNCTION */
{
    uint32_t ulPreviousMask;

    ulPreviousMask = portSET_INTERRUPT_MASK_FROM_ISR();
    traceISR_ENTER();
    {
        /* Increment the RTOS tick. */
        if( xTaskIncrementTick() != pdFALSE )
        {
            traceISR_EXIT_TO_SCHEDULER();
            /* Pend a context switch. */
            portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
        }
        else
        {
            traceISR_EXIT();
        }
    }
    portCLEAR_INTERRUPT_MASK_FROM_ISR( ulPreviousMask );
}
#endif

5. Finally, copy and paste the FreeRTOSConfig_Gen.h, FreeRTOSConfig.h and freertos_tasks_c_additions.h files from the freertos_hello example as shown the following image:

Habib_MS_0-1785536616039.pngHabib_MS_1-1785536639784.png

 

 

Now you are able to build and debug following the chapter Testing Final Project Without OS but now with FreeRTOS.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Labels (1)
%3CLINGO-SUB%20id%3D%22lingo-sub-2379726%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3ENFC%20Reader%20Library%20Migration%20to%20FRDM-MCXN947%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2379726%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CH3%20class%3D%22lia-align-justify%22%20id%3D%22toc-hId-2033051097%22%20style%3D%22text-align%20%3A%20justify%3B%22%20id%3D%22toc-hId-2033703675%22%20style%3D%22text-align%20%3A%20justify%3B%22%3EIntroduction.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FH3%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3EThis%20document%20provides%20a%20guide%20on%20how%20to%20use%20the%20NFC%20frontend%20PN5190%20with%20the%20FRDM-MCXN947%20and%20using%20the%20latest%20existing%20version%20of%20the%20NFC%20Reader%20Library.%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3EThe%20hardware%20required%20to%20follow%20this%20guide%20is%3A%3C%2FP%3E%0A%3CUL%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Fdevelopment-boards-and-designs%2FFRDM-MCXN947%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EFRDM-MCXN947%3C%2FA%3E%20development%20board%20as%20host%20MCU.%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Fdevelopment-boards-and-designs%2FPNEV5190BP%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EPNEV5190BP%3C%2FA%3E%20(based%20on%20PN5190)%20as%20the%20NFC%20transceiver%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH3%20class%3D%22lia-align-justify%22%20id%3D%22toc-hId-225596634%22%20style%3D%22text-align%20%3A%20justify%3B%22%20id%3D%22toc-hId-226249212%22%20style%3D%22text-align%20%3A%20justify%3B%22%3ESoftware%20Setup.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FH3%3E%0A%3CUL%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%0A%3CLI%3EMCXN947%20SDK%20version%3A%2026.06.00%3C%2FLI%3E%0A%3CLI%3ENFCReaderLibrary%20version%3A%2007.16.00%3C%2FLI%3E%0A%3CLI%3EPN5190%20FW%20version%3A%200x20D%3C%2FLI%3E%0A%3CLI%3EMCUxpresso%20IDE%20version%3A%2025.6%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH3%20class%3D%22lia-align-justify%22%20id%3D%22toc-hId--1581857829%22%20style%3D%22text-align%20%3A%20justify%3B%22%20id%3D%22toc-hId--1581205251%22%20style%3D%22text-align%20%3A%20justify%3B%22%3EHardware%20connections.%3C%2FH3%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3EThe%20PNEV5190%20comes%20with%20a%20Kinetis%20K82F%20as%20a%20host%20MCU%20to%20drive%20the%20PN5190%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3ESince%20the%20goal%20is%20to%20drive%20PN5190%20from%20the%20MCXN947%20via%20SPI%2C%20we%20need%20to%20prepare%20the%20PNEV5190%20for%20it%3A%3C%2FP%3E%0A%3CUL%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%0A%3CLI%3EPower%20up%20board%20correctly%3C%2FLI%3E%0A%3CLI%3EEnable%20external%20SPI%20pins%3C%2FLI%3E%0A%3CLI%3EDisable%20K82F%20interface%20with%20PN5190%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH4%20class%3D%22lia-align-justify%22%20id%3D%22toc-hId--891296355%22%20style%3D%22text-align%20%3A%20justify%3B%22%20id%3D%22toc-hId--890643777%22%20style%3D%22text-align%20%3A%20justify%3B%22%3EPower%20up%20and%20jumper%20configuration%3C%2FH4%3E%0A%3CBR%20%2F%3E%0A%3CUL%3E%0A%3CLI%3ETo%20power%20up%20the%20board%20correctly%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%E2%80%93%20Powering%20it%20up%20over%20USB%20does%20not%20provide%20enough%20current.%20It%20will%20be%20powered%20with%20an%20external%20power%20supply%20of%207.5V%20over%20connector%20J17.%3C%2FP%3E%0A%3CUL%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%0A%3CLI%3EPut%20jumper%20on%20following%20pins%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%E2%80%93%20J9%202-3%3A%20External%20power%20supply%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%E2%80%93%20J8%3A%20VBATPWR%20supplied%20with%20VBAT%3D3.3%20V%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%E2%80%93%20J12%3A%20VBAT%20supplied%20with%203.3%20V%3C%2FP%3E%0A%3CUL%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%0A%3CLI%3ERemove%20jumpers%20on%20following%20pins%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%E2%80%93%20J22%2C%20J23%3A%20open%20SDA%20signals%20for%20K82F%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%E2%80%93%20J19%3A%20RTS%20push-button%20bypass%20for%20K82F%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%E2%80%93%20J3%2C%20J4%2C%20J5%2C%20J6%3A%20pull%20down%20jumpers%20for%20NFC%20module%20signals%3C%2FP%3E%0A%3CUL%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%0A%3CLI%3ESet%20GPIO%20and%20SPI%20voltage%20to%203.3%20V%3A%20supplying%203.3%20V%20to%20VDDIO%20and%20the%20%CE%BCC%20supply%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%E2%80%93%20Remove%20short%20circuit%20on%20R19%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%E2%80%93%20Place%20short%20circuit%20on%20R20%3C%2FP%3E%0A%3CUL%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%0A%3CLI%3EFor%20any%20additional%20configuration%2C%20please%20see%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN12550.pdf%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EPNEV5190B%20evaluation%20board%20quick%20start%20guide%3C%2FA%3E.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3ELocation%20of%20the%20changes%20mentioned%20above%20can%20be%20seen%20in%20the%20following%20image%3A%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1781132345846.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1781132345846.png%22%20style%3D%22width%3A%20572px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388605i77ECF996C5D4843C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1781132345846.png%22%20alt%3D%22Habib_MS_0-1781132345846.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20class%3D%22lia-align-justify%22%20id%3D%22toc-hId--901799459%22%20style%3D%22text-align%20%3A%20justify%3B%22%20id%3D%22toc-hId--901146881%22%20style%3D%22text-align%20%3A%20justify%3B%22%3ERouting%20NFC%20module%20communication%20pins%20to%20JP1%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3ETo%20enable%20the%20pins%20on%20JP1%20for%20communication%2C%20we%20must%20enable%20bus%20switch%20U10%20and%20disable%20bus%20switch%20U12%20in%20the%20NFC%20Host%20Interface.%20These%20switches%20enable%20or%20disable%20the%20connections%20from%20K82%20to%20PN5190%20SPI%20pins%2C%20and%20expose%20the%20SPI%20interface%20to%20an%20external%20host.%3C%2FP%3E%0A%3CUL%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%0A%3CLI%3ERemove%20short%20on%20R5%20to%20disable%20communication%20routing%20to%20K82F.%3C%2FLI%3E%0A%3CLI%3EPlace%20short%20on%20R7%20to%20enable%20communication%20routing%20to%20JP1%20pins.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_2-1781132571269.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_2-1781132571269.png%22%20style%3D%22width%3A%20460px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388607i1C715D64B3ADD22F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_2-1781132571269.png%22%20alt%3D%22Habib_MS_2-1781132571269.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3EFor%20FRDM-MCXN947%20side%2C%20no%20modifications%20are%20necessary.%26nbsp%3B%20The%20pins%20used%20are%20available%20in%20Header%20J1%20and%20J2.%20Which%20are%20shown%20in%20the%20following%20table.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20class%3D%22%20lia-align-justify%22%20width%3D%22623px%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22225.7px%22%3E%0A%3CP%3EName%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22206.75px%22%3E%0A%3CP%3EMCXN947%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189.75px%22%3E%0A%3CP%3EPN5190%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22225.7px%22%3E%0A%3CP%3ESCK%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22206.75px%22%3E%0A%3CP%3EJ2.12%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189.75px%22%3E%0A%3CP%3EJP1.1%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22225.7px%22%3E%0A%3CP%3EMOSI%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22206.75px%22%3E%0A%3CP%3EJ2.8%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189.75px%22%3E%0A%3CP%3EJP1.2%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22225.7px%22%3E%0A%3CP%3EMISO%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22206.75px%22%3E%0A%3CP%3EJ2.10%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189.75px%22%3E%0A%3CP%3EJP1.3%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22225.7px%22%3E%0A%3CP%3ESSEL%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22206.75px%22%3E%0A%3CP%3EJ2.6%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189.75px%22%3E%0A%3CP%3EJP1.4%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22225.7px%22%3E%0A%3CP%3EIRQ%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22206.75px%22%3E%0A%3CP%3EJ1.16%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189.75px%22%3E%0A%3CP%3EJP1.5%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22225.7px%22%3E%0A%3CP%3ERESET%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22206.75px%22%3E%0A%3CP%3EJ2.2%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189.75px%22%3E%0A%3CP%3EJP6.1%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22225.7px%22%3E%0A%3CP%3EGND%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22206.75px%22%3E%0A%3CP%3EJ2.14%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189.75px%22%3E%0A%3CP%3EJP1.10%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22225.7px%22%3E%0A%3CP%3ESUCCESS%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22206.75px%22%3E%0A%3CP%3EJ2.17*%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189.75px%22%3E%0A%3CBR%20%2F%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22225.7px%22%3E%0A%3CP%3EFAIL%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22206.75px%22%3E%0A%3CP%3EJ2.15*%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189.75px%22%3E%0A%3CBR%20%2F%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22225.7px%22%3E%0A%3CP%3EDWL%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22206.75px%22%3E%0A%3CP%3EJ2.13*%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189.75px%22%3E%0A%3CBR%20%2F%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E*%20Pins%20that%20need%20to%20be%20configured%20for%20library%20compatibility%20but%20are%20not%20used%20and%20do%20not%20need%20to%20be%20connected.%3C%2FP%3E%0A%3CH3%20class%3D%22lia-align-justify%22%20id%3D%22toc-hId-1585713374%22%20style%3D%22text-align%20%3A%20justify%3B%22%20id%3D%22toc-hId-1586365952%22%20style%3D%22text-align%20%3A%20justify%3B%22%3ESoftware%20Changes%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3EThis%20section%20describes%20the%20software%20changes%20required%20to%20run%20the%20%E2%80%9CNfcrdlibEx1_DiscoveryLoop%E2%80%9D%20example%20from%20the%20NFC%20Reader%20Library%20which%20consists%20in%20a%20detection%20loop%20that%20displays%20in%20a%20terminal%20information%20(like%20UID%2C%20SAK%2C%20and%20Product%20Type%20for%20MIFARE%20product-based%20cards)%20about%20any%20tag%20detected%20by%20the%20PN5190.%20Please%20download%20the%20NFC%20Reader%20Library%20for%20PN5190%20from%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fapplications%2Ftechnologies%2Fsecurity%2Findustrial-security%2Fnfc-reader-library-software-support-for-nfc-frontend-solutions%3ANFC-READER-LIBRARY%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3ENFC%20Reader%20Library%20%7C%20NXP%20Semiconductors%3C%2FA%3E.%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3ETo%20begin%20with%20the%20migration%2C%20we%20first%20need%20to%20create%20a%20project%20with%20the%20FRDM-MCXN947%20SDK%20(v26.06.00)%2C%20for%20this%20purpose%20download%20and%20install%20the%20FRDM-MCXN947%20SDK%20from%20the%20%3CA%20href%3D%22https%3A%2F%2Fmcuxpresso.nxp.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3ESDK%20Builder.%3C%2FA%3E%3C%2FP%3E%0A%3CH3%20class%3D%22lia-align-justify%22%20id%3D%22toc-hId--221741089%22%20style%3D%22text-align%20%3A%20justify%3B%22%20id%3D%22toc-hId--221088511%22%20style%3D%22text-align%20%3A%20justify%3B%22%3EImporting%20NFC%20Reader%20Library%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FH3%3E%0A%3COL%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%0A%3CLI%3EClick%20on%20%E2%80%9CFile%E2%80%9D%20from%20upper%20tab%20menu%20and%20%E2%80%9CImport%E2%80%A6%E2%80%9D.%3C%2FLI%3E%0A%3CLI%3EIn%20the%20Import%20wizard%2C%20select%20%E2%80%9CExisting%20Projects%20into%20Workspace%E2%80%9D.%3C%2FLI%3E%0A%3CLI%3EIn%20the%20%E2%80%9CSelect%20root%20directory%E2%80%9D%20search%20the%20directory%20where%20the%20downloaded%20library%20is%20located%20and%20click%20on%20Finish%20(do%20not%20check%20the%20%E2%80%9CCopy%20projects%20into%20workspace%E2%80%9D%20option).%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1781133143312.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1781133143312.png%22%20style%3D%22width%3A%20738px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388608i8A0D220FB3621044%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1781133143312.png%22%20alt%3D%22Habib_MS_0-1781133143312.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ENote%3A%20If%20the%20K82%20SDK%20is%20not%20installed%20an%20error%20message%20will%20appear%2C%20please%20click%20on%20cancel.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1782234443148.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1782234443148.png%22%20style%3D%22width%3A%20733px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F389891iFD377821C080E3DD%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1782234443148.png%22%20alt%3D%22Habib_MS_0-1782234443148.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CH3%20class%3D%22lia-align-justify%22%20id%3D%22toc-hId--2029195552%22%20style%3D%22text-align%20%3A%20justify%3B%22%20id%3D%22toc-hId--2028542974%22%20style%3D%22text-align%20%3A%20justify%3B%22%3ECreating%20base%20project%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E1.%20In%20the%20Quick%20Start%20panel%20click%20on%20%E2%80%9Cimport%20SDK%20example(s)%E2%80%A6%E2%80%9D%20in%20the%20MCUXpresso%20IDE.%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E2.%20Select%20%E2%80%9Cfrdmmcxn947%E2%80%9D%20and%20click%20on%20next.%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_1-1781133200020.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_1-1781133200020.png%22%20style%3D%22width%3A%20865px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388609iAD6B1C436D6848F2%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_1-1781133200020.png%22%20alt%3D%22Habib_MS_1-1781133200020.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E3.%20Select%20the%20SDK%20example%20%E2%80%9Chello_world_cm33_core0%E2%80%9D%20and%20click%20on%20finish.%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_2-1781133254045.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_2-1781133254045.png%22%20style%3D%22width%3A%20814px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388610iB4C414672C2916BE%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_2-1781133254045.png%22%20alt%3D%22Habib_MS_2-1781133254045.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E4.Now%20we%20will%20add%20the%20required%20drivers%20for%20migration%2C%20which%20are%20SPI%20and%20CTIMER%20drivers.%20.%20Click%20on%20properties-%26gt%3B%20SDK%20Management-%26gt%3B%20Manage%20SDK%20Components.%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_3-1781133444305.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_3-1781133444305.png%22%20style%3D%22width%3A%20590px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388611i90135564188C7DE2%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_3-1781133444305.png%22%20alt%3D%22Habib_MS_3-1781133444305.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E5.%20Search%20in%20the%20filter%20bar%20%E2%80%9Cctimer%E2%80%9D%20and%20%E2%80%9Clpspi%E2%80%9D%20and%20check%20their%20boxes%20to%20add%20them%20and%20click%20on%20OK.%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_5-1781133510047.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_5-1781133510047.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388613i29C26E0C5EB24CA2%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_5-1781133510047.png%22%20alt%3D%22Habib_MS_5-1781133510047.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_6-1781133576098.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_6-1781133576098.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388614i23ECB2C5B22AA082%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_6-1781133576098.png%22%20alt%3D%22Habib_MS_6-1781133576098.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20class%3D%22lia-align-justify%22%20id%3D%22toc-hId-458317281%22%20style%3D%22text-align%20%3A%20justify%3B%22%20id%3D%22toc-hId-458969859%22%20style%3D%22text-align%20%3A%20justify%3B%22%3EAdd%20the%20source%20code%20Discovery%20Loop%20Example%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3EFrom%20the%20imported%20example%26nbsp%3BNfcrdlibEx1_DiscoveryLoop_mcux%20of%20the%20NFC%20Reader%20Library%2C%20find%20and%20copy%20the%20following%20files%20(included%20in%20src%20folder)%3A%20NfcrdlibEx1_EmvcoProfile.c%2C%20phApp_Helper.c%2C%20phApp_Init.c%2C%20phApp_PN5190_Init.c%3B%20and%20paste%20them%20into%20the%20source%20folder%20inside%20the%20created%20base%20project.%20Additionally%2C%20delete%20the%20file%20hello_world%20.c%20created%20by%20the%20project.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1781134009079.png%22%20style%3D%22width%3A%20275px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1781134009079.png%22%20style%3D%22width%3A%20275px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388615iAAE962FDE850A341%2Fimage-dimensions%2F275x499%3Fv%3Dv2%22%20width%3D%22275%22%20height%3D%22499%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1781134009079.png%22%20alt%3D%22Habib_MS_0-1781134009079.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_1-1781134021054.png%22%20style%3D%22width%3A%20259px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_1-1781134021054.png%22%20style%3D%22width%3A%20259px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388616i514DCEF0AC718DC9%2Fimage-dimensions%2F259x443%3Fv%3Dv2%22%20width%3D%22259%22%20height%3D%22443%22%20role%3D%22button%22%20title%3D%22Habib_MS_1-1781134021054.png%22%20alt%3D%22Habib_MS_1-1781134021054.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAdditionally%2C%20we%20need%20to%20add%20the%20file%20%E2%80%9CNfcrdlibEx1_DiscoveryLoop.c%E2%80%9D%20which%20is%20the%20main%20source%20file%20of%20the%20project%2C%20to%20do%20this%20right-click%20on%20the%20%E2%80%9Csource%E2%80%9D%20folder%20of%20our%20project%20and%20then%20put%20the%20cursor%20on%20%E2%80%9CNew%E2%80%9D%20and%20select%20%E2%80%9CFile%E2%80%9D.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_2-1781134090137.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_2-1781134090137.png%22%20style%3D%22width%3A%20534px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388617i79F0A26AEBBBBE2B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_2-1781134090137.png%22%20alt%3D%22Habib_MS_2-1781134090137.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIn%20the%20tab%20that%20will%20open%2C%20write%20the%20name%20of%20the%20file%20(NfcrdlibEx1_DiscoveryLoop.c)%20and%20then%2C%20click%20on%20%E2%80%9CFinish%E2%80%9D.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_3-1781134114470.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_3-1781134114470.png%22%20style%3D%22width%3A%20405px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388618i59FB736AAA55F6E3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_3-1781134114470.png%22%20alt%3D%22Habib_MS_3-1781134114470.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EFinally%2C%20in%20the%20created%20file%20copy%20and%20paste%20all%20the%20code%20inside%20the%20original%20source%20file%20located%20in%20the%20library%20example.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_4-1781134170782.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_4-1781134170782.png%22%20style%3D%22width%3A%20695px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388619i65DAFF5D05D92DFF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_4-1781134170782.png%22%20alt%3D%22Habib_MS_4-1781134170782.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_5-1781134196935.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_5-1781134196935.png%22%20style%3D%22width%3A%20700px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388620iC7A3EF64F36EB53D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_5-1781134196935.png%22%20alt%3D%22Habib_MS_5-1781134196935.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1349137182%22%20id%3D%22toc-hId--1348484604%22%3ELink%20the%20NFC%20Reader%20Library%20elements%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3ETo%20make%20the%20required%20software%20changes%2C%20we%20need%20to%20link%20the%20DAL%2C%20NxpNfcRdLib%2C%20phOsal%20and%20intfs%20folders%20into%20the%20base%20project%2C%20to%20do%20this%3A%3C%2FP%3E%0A%3CP%3E1.%20In%20the%20Project%20Explorer%2C%20right%20click%20on%20the%20project%20and%20place%20your%20cursor%20on%20New%20and%20click%20on%20Folder.%3C%2FP%3E%0A%3CP%3E2.%20In%20the%20New%20Folder%20tab%2C%20click%20on%20%E2%80%9CAdvanced%20%26gt%3B%26gt%3B%E2%80%9D%20and%20select%20%E2%80%9CLink%20to%20alternate%20location%20(Linked%20Folder)%E2%80%9D%20and%20on%20%E2%80%9CBrowse%E2%80%A6%E2%80%9D.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_6-1781134337471.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_6-1781134337471.png%22%20style%3D%22width%3A%20296px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388621iC5F77485497B4770%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_6-1781134337471.png%22%20alt%3D%22Habib_MS_6-1781134337471.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E3.%20Browse%20into%20the%20path%20where%20the%20library%20was%20extracted%2C%20choose%20the%20NxpNfcRdLib%20folder%20and%20click%20on%20Finish.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_7-1781134383646.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_7-1781134383646.png%22%20style%3D%22width%3A%20783px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388622i90ACC0774563122E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_7-1781134383646.png%22%20alt%3D%22Habib_MS_7-1781134383646.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3E4.%20Do%20the%20same%20procedure%20for%20%E2%80%9CPlatform%2FDAL%E2%80%9D%2C%20%E2%80%9CExamples%2FNfcrdlibEx1_DiscoveryLoop%2Fintfs%E2%80%9D%20and%20%E2%80%9CRTOS%2FphOsal%E2%80%9D%20folders.%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%20style%3D%22text-align%20%3A%20justify%3B%22%20style%3D%22text-align%20%3A%20justify%3B%22%3EIf%20you%20have%20the%20folder%20in%20the%20same%20project%20explorer%2C%20the%20included%20folder%20will%20not%20appear%2C%20but%20you%20can%20see%20it%20when%20you%20open%20the%20window%20to%20add%20another%20folder%2C%20as%20shown%20in%20the%20following%20figure.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_8-1781134451238.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_8-1781134451238.png%22%20style%3D%22width%3A%20429px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388623i56856C3CE3FBAB43%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_8-1781134451238.png%22%20alt%3D%22Habib_MS_8-1781134451238.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBut%20if%20the%20included%20folders%20are%20not%20in%20the%20Project%20Explorer%2C%20the%20Project%20should%20look%20like%20this%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_9-1781134500816.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_9-1781134500816.png%22%20style%3D%22width%3A%20329px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388624i38685596EA852016%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_9-1781134500816.png%22%20alt%3D%22Habib_MS_9-1781134500816.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EOnce%20this%20is%20done%2C%20we%20will%20need%20to%20delete%20the%20%E2%80%9CKinetisSDK%E2%80%9D%20folder%20located%20in%20%E2%80%9CDAL%20%26gt%3B%20src%E2%80%9D%20to%20avoid%20multiple%20definition%20issues.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_10-1781134521814.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_10-1781134521814.png%22%20style%3D%22width%3A%20350px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388625i66573A5C2236615D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_10-1781134521814.png%22%20alt%3D%22Habib_MS_10-1781134521814.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-443212172%22%20id%3D%22toc-hId-443864750%22%3EDefine%20FRDM-MCXN947%20SDK%20preprocessor%20symbol%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3EWe%20need%20to%20do%20some%20changes%20to%20the%20compiler%20preprocessor%20configuration.%3C%2FP%3E%0A%3CP%3E1.%20Right%20click%20on%20the%20project%20in%20the%20Project%20Explorer%20and%20click%20on%20%E2%80%9CProperties%E2%80%A6%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1781134734232.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1781134734232.png%22%20style%3D%22width%3A%20235px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388626i2007F5F56F7E8946%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1781134734232.png%22%20alt%3D%22Habib_MS_0-1781134734232.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E2.%20In%20the%20properties%20tab%2C%20go%20to%20%E2%80%9CC%2FC%2B%2B%20Build%20%26gt%3B%20Settings%20%26gt%3B%20MCU%20C%20Compiler%20%26gt%3B%20Preprocessor%E2%80%9D.%20The%20symbols%20are%20related%20with%20the%20FRDM%20board%2C%20but%20we%20need%20to%20add%20the%20following%20symbols%20related%20with%20the%20NFC%20Reader%20Library%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EPH_OSAL_NULLOS%3C%2FLI%3E%0A%3CLI%3EPHDRIVER_FRDMMCXN947_PN5190_BOARD%3C%2FLI%3E%0A%3CLI%3ENXPBUILD_CUSTOMER_HEADER_INCLUDED%3C%2FLI%3E%0A%3CLI%3EPHDRIVER_MCXN947_SPI_POLLING%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_1-1781134774044.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_1-1781134774044.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388627i58173A0E0FAFC03C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_1-1781134774044.png%22%20alt%3D%22Habib_MS_1-1781134774044.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EClick%20on%20the%20%E2%80%9CAdd...%E2%80%9D%20button%20at%20the%20top%20right%20corner%20of%20the%20%E2%80%9CDefined%20symbols%20(-D)%E2%80%9D%20menu%20and%20enter%20each%20symbol%20mentioned%20before.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1782235762579.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1782235762579.png%22%20style%3D%22width%3A%20802px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F389896i535E0F63B8A777DD%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1782235762579.png%22%20alt%3D%22Habib_MS_0-1782235762579.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThese%20symbols%20are%20added%20so%20the%20preprocessor%20knows%20which%20header%20files%20to%20include%20at%20build%20time.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3EPHDRIVER_FRDMMCXN947_PN5190_BOARD%3C%2FSTRONG%3E%20will%20help%20include%20the%20BoardSelection.h%20header%2C%20the%20file%20that%20is%20going%20to%20define%20addresses%20for%20registers%20and%20peripherals%20of%20MCXN947.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EPH_OSAL_NULLOS%3C%2FSTRONG%3E%20will%20include%20headers%20related%20to%20non-OS%20operation%2C%20meaning%20that%20the%20project%20will%20work%20without%20any%20operative%20system%20(at%20the%20end%20of%20this%20guide%20you%20will%20find%20the%20steps%20to%20add%20FreeRTOS%20support).%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3ENXPBUILD_CUSTOMER_HEADER_INCLUDED%3C%2FSTRONG%3E%20will%20add%20headers%20to%20add%20and%20select%20the%20NFC%20reader%20and%20host%20that%20will%20be%20used%20in%20the%20project.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EPHDRIVER_MCXN947_SPI_POLLING%3C%2FSTRONG%3E%20if%20is%20defined%20the%20example%20will%20perform%20SPI%20communication%20by%20polling%20method%2C%20and%20if%20not%2C%20will%20be%20perform%20through%20non-blocking%20transfers.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E3.%20Once%20added%2C%20click%20on%20%E2%80%9CApply%20and%20Close%E2%80%9D%2C%20%22Rebuild%20Index%22%20and%20then%20to%20%E2%80%9CYes%E2%80%9D%20to%20save%20the%20changes.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1364242291%22%20id%3D%22toc-hId--1363589713%22%3EModifying%20the%20Driver%20Abstraction%20Layer%20(DAL)%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThe%20added%20linked%20folder%20DAL%20will%20contain%20the%20important%20changes%20to%20be%20able%20to%20use%20the%20MCXN947%20as%20host%20device%20since%20it%20will%20contain%20all%20the%20changes%20regarding%20SPI%2C%20timer%20and%20GPIO%20configurations%20required%20by%20the%20library%20to%20work%20properly.%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-1252353261%22%20id%3D%22toc-hId-1253005839%22%3EBoard_FRDM_MCXN947_PN5190.h%3C%2FH4%3E%0A%3CBR%20%2F%3E%0A%3CP%3EWe%20need%20to%20create%20a%20header%20file%20that%20will%20contain%20important%20macros%20used%20by%20the%20library%20that%20are%20related%20to%20the%20host%20specific%20SPI%2C%20timer%20and%20GPIO%20peripherals%2C%20as%20well%20as%20interrupt%20vectors%20and%20priorities%2C%20clock%20sources%20and%20addresses.%20This%20file%20is%20required%20to%20be%20inside%20the%20%E2%80%9Cboards%E2%80%9D%20folder%20which%20is%20inside%20DAL.%20Please%20add%20the%20header%20file%20as%20the%20file%20created%26nbsp%3BNfcrdlibEx1_DiscoveryLoop.c%20but%20replacing%20.c%20to%20.h%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_1-1782236163267.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_1-1782236163267.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F389897iF916397CE28289C6%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_1-1782236163267.png%22%20alt%3D%22Habib_MS_1-1782236163267.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1781196980059.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1781196980059.png%22%20style%3D%22width%3A%20637px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388732i86C20A3E91CB2BE3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1781196980059.png%22%20alt%3D%22Habib_MS_0-1781196980059.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20file%20should%20be%20named%20as%20shown%20in%20the%20picture%20above.%3C%2FP%3E%0A%3CP%3EInside%20this%20file%2C%20some%20important%20macros%20related%20to%20the%20SPI%20peripheral%20and%20the%20important%20pins%20to%20be%20handled%20(IRQ%2C%20Chip%20Select%2C%20Reset)%20are%20defined.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_1-1781196999826.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_1-1781196999826.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388733iA6016F94688F7084%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_1-1781196999826.png%22%20alt%3D%22Habib_MS_1-1781196999826.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%23ifndef%20DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_%0A%23define%20DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_%0A%23define%20GPIO_PORT%200%0A%23define%20GPIO_PORT1%201%0A%2F******************************************************************%0A*%20LPSPI%20clock%20configuration%0A******************************************************************%2F%0A%2F*Clock%20Frequency%20for%20SPI%20Flexcomm%201*%2F%0A%23define%20SPI_CLOCK_FREQ%20(CLOCK_GetLPFlexCommClkFreq(1u))%0A%23define%20SPI_MASTER_CLOCK_FREQ%20SPI_CLOCK_FREQ%0A%2F******************************************************************%0A*%20Board%20Pin%2FGpio%20configurations%0A******************************************************************%2F%0A%23define%20PHDRIVER_PIN_RESET%20((GPIO_PORT%20%26lt%3B%26lt%3B%208)%20%7C%2028)%20%2F**%26lt%3B%20Reset%20pin%2C%20Pin28%2C%20PIO0_28%20*%2F%0A%23define%20PHDRIVER_PIN_IRQ%20((GPIO_PORT%20%26lt%3B%26lt%3B%208)%20%7C%2031)%20%20%2F**%26lt%3B%20IRQ%20pin%2C%20Pin10%2C%20PIO0_10%20*%2F%0A%2F*%20For%205190%20busy%20is%20same%20as%20IRQ%20*%2F%0A%23define%20PHDRIVER_PIN_BUSY%20((GPIO_PORT%20%26lt%3B%26lt%3B%208)%20%7C%2031)%20%20%2F**%26lt%3B%20IRQ%20pin%2C%20Pin31%2C%20PIO0_31%20*%2F%0A%23define%20PHDRIVER_PIN_DWL%20%20%20%20((GPIO_PORT%20%26lt%3B%26lt%3B%208)%20%7C%2019)%20%20%2F**%26lt%3B%20Download%20pin%2C%20Pin19%2C%20PIO0_19*%2F%0A%2F*%20These%20pins%20are%20used%20for%20EMVCo%20Interoperability%20test%20status%20indication%2C%0A%20*%20not%20for%20the%20generic%20Reader%20Library%20implementation.%0A%20*%2F%0A%23define%20PHDRIVER_PIN_SUCCESS%20%20%20((GPIO_PORT1%20%26lt%3B%26lt%3B%208)%20%7C%200)%20%20%20%2F**%26lt%3B%20GPIO%2C%20Port%201%2C%20Pin0%20*%2F%0A%23define%20PHDRIVER_PIN_FAIL%20%20%20%20%20%20((GPIO_PORT1%20%26lt%3B%26lt%3B%208)%20%7C%201)%20%20%20%2F**%26lt%3B%20GPIO%2C%20Port%201%2C%20Pin1%20*%2F%0A%2F******************************************************************%0A*%20PIN%20Pull-Up%2FPull-Down%20configurations.%0A******************************************************************%2F%0A%23define%20PHDRIVER_PIN_RESET_PULL_CFG%20%20%20%20PH_DRIVER_PULL_UP%0A%23define%20PHDRIVER_PIN_IRQ_PULL_CFG%20%20%20%20%20%20PH_DRIVER_PULL_DOWN%0A%23define%20PHDRIVER_PIN_WKUP_PULL_CFG%20%20%20%20%20PH_DRIVER_PULL_UP%0A%23define%20PHDRIVER_PIN_CLK_PULL_CFG%20%20%20%20%20%20PH_DRIVER_PULL_UP%0A%23define%20PHDRIVER_PIN_DWL_PULL_CFG%20%20%20%20%20%20PH_DRIVER_PULL_UP%0A%23define%20PHDRIVER_PIN_NSS_PULL_CFG%20%20%20%20%20%20PH_DRIVER_PULL_UP%0A%23define%20PHDRIVER_PIN_BUSY_PULL_CFG%20%20%20%20%20PH_DRIVER_PULL_UP%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%23ifndef%20DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_%0A%23define%20DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_%0A%23define%20GPIO_PORT%200%0A%23define%20GPIO_PORT1%201%0A%2F******************************************************************%0A*%20LPSPI%20clock%20configuration%0A******************************************************************%2F%0A%2F*Clock%20Frequency%20for%20SPI%20Flexcomm%201*%2F%0A%23define%20SPI_CLOCK_FREQ%20(CLOCK_GetLPFlexCommClkFreq(1u))%0A%23define%20SPI_MASTER_CLOCK_FREQ%20SPI_CLOCK_FREQ%0A%2F******************************************************************%0A*%20Board%20Pin%2FGpio%20configurations%0A******************************************************************%2F%0A%23define%20PHDRIVER_PIN_RESET%20((GPIO_PORT%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%2028)%20%2F**%26lt%3B%20Reset%20pin%2C%20Pin28%2C%20PIO0_28%20*%2F%0A%23define%20PHDRIVER_PIN_IRQ%20((GPIO_PORT%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%2031)%20%20%2F**%26lt%3B%20IRQ%20pin%2C%20Pin10%2C%20PIO0_10%20*%2F%0A%2F*%20For%205190%20busy%20is%20same%20as%20IRQ%20*%2F%0A%23define%20PHDRIVER_PIN_BUSY%20((GPIO_PORT%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%2031)%20%20%2F**%26lt%3B%20IRQ%20pin%2C%20Pin31%2C%20PIO0_31%20*%2F%0A%23define%20PHDRIVER_PIN_DWL%20%20%20%20((GPIO_PORT%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%2019)%20%20%2F**%26lt%3B%20Download%20pin%2C%20Pin19%2C%20PIO0_19*%2F%0A%2F*%20These%20pins%20are%20used%20for%20EMVCo%20Interoperability%20test%20status%20indication%2C%0A%20*%20not%20for%20the%20generic%20Reader%20Library%20implementation.%0A%20*%2F%0A%23define%20PHDRIVER_PIN_SUCCESS%20%20%20((GPIO_PORT1%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%200)%20%20%20%2F**%26lt%3B%20GPIO%2C%20Port%201%2C%20Pin0%20*%2F%0A%23define%20PHDRIVER_PIN_FAIL%20%20%20%20%20%20((GPIO_PORT1%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%201)%20%20%20%2F**%26lt%3B%20GPIO%2C%20Port%201%2C%20Pin1%20*%2F%0A%2F******************************************************************%0A*%20PIN%20Pull-Up%2FPull-Down%20configurations.%0A******************************************************************%2F%0A%23define%20PHDRIVER_PIN_RESET_PULL_CFG%20%20%20%20PH_DRIVER_PULL_UP%0A%23define%20PHDRIVER_PIN_IRQ_PULL_CFG%20%20%20%20%20%20PH_DRIVER_PULL_DOWN%0A%23define%20PHDRIVER_PIN_WKUP_PULL_CFG%20%20%20%20%20PH_DRIVER_PULL_UP%0A%23define%20PHDRIVER_PIN_CLK_PULL_CFG%20%20%20%20%20%20PH_DRIVER_PULL_UP%0A%23define%20PHDRIVER_PIN_DWL_PULL_CFG%20%20%20%20%20%20PH_DRIVER_PULL_UP%0A%23define%20PHDRIVER_PIN_NSS_PULL_CFG%20%20%20%20%20%20PH_DRIVER_PULL_UP%0A%23define%20PHDRIVER_PIN_BUSY_PULL_CFG%20%20%20%20%20PH_DRIVER_PULL_UP%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EWe%20define%20the%20macros%20as%20well%20for%20the%20interrupt%20vector%20of%20MCXN947%2C%20its%20priority%2C%20handler%20and%20trigger%20type.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1781198808350.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1781198808350.png%22%20style%3D%22width%3A%20922px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388734i5F1420B5D6913A67%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1781198808350.png%22%20alt%3D%22Habib_MS_0-1781198808350.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%2F******************************************************************%0A*%20IRQ%20PIN%20NVIC%20settings%0A******************************************************************%2F%0A%23define%20EINT_IRQn%20GPIO00_IRQn%20%2F*Adding%20interrupt%20vector%20A%20of%20GPIO*%2F%0A%23define%20EINT_PRIORITY%207%20%2F*Default%20interrupt%20priority%20for%20GPIO*%2F%0A%23define%20CLIF_IRQHandler%20GPIO00_IRQHandler%20%2F*Interrupt%20handler%20for%20vector%20A*%2F%0A%23define%20PIN_IRQ_TRIGGER_TYPE%20PH_DRIVER_INTERRUPT_RISINGEDGE%20%2F*Rising%20edge%20Trigger*%2F%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%2F******************************************************************%0A*%20IRQ%20PIN%20NVIC%20settings%0A******************************************************************%2F%0A%23define%20EINT_IRQn%20GPIO00_IRQn%20%2F*Adding%20interrupt%20vector%20A%20of%20GPIO*%2F%0A%23define%20EINT_PRIORITY%207%20%2F*Default%20interrupt%20priority%20for%20GPIO*%2F%0A%23define%20CLIF_IRQHandler%20GPIO00_IRQHandler%20%2F*Interrupt%20handler%20for%20vector%20A*%2F%0A%23define%20PIN_IRQ_TRIGGER_TYPE%20PH_DRIVER_INTERRUPT_RISINGEDGE%20%2F*Rising%20edge%20Trigger*%2F%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EAs%20well%20as%20some%20macros%20for%20pin%20logic%20levels.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_1-1781198875355.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_1-1781198875355.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388735iFCA19312E24324DD%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_1-1781198875355.png%22%20alt%3D%22Habib_MS_1-1781198875355.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%2F*****************************************************************%0A*%20Front%20End%20Reset%20logic%20level%20settings%0A****************************************************************%2F%0A%23define%20PH_DRIVER_SET_HIGH%201%20%2F**%26lt%3B%20Logic%20High.%20*%2F%0A%23define%20PH_DRIVER_SET_LOW%200%20%2F**%26lt%3B%20Logic%20Low.%20*%2F%0A%23define%20RESET_POWERDOWN_LEVEL%20PH_DRIVER_SET_LOW%0A%23define%20RESET_POWERUP_LEVEL%20PH_DRIVER_SET_HIGH%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%2F*****************************************************************%0A*%20Front%20End%20Reset%20logic%20level%20settings%0A****************************************************************%2F%0A%23define%20PH_DRIVER_SET_HIGH%201%20%2F**%26lt%3B%20Logic%20High.%20*%2F%0A%23define%20PH_DRIVER_SET_LOW%200%20%2F**%26lt%3B%20Logic%20Low.%20*%2F%0A%23define%20RESET_POWERDOWN_LEVEL%20PH_DRIVER_SET_LOW%0A%23define%20RESET_POWERUP_LEVEL%20PH_DRIVER_SET_HIGH%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EFinally%2C%20we%20define%20macros%20for%20the%20base%20address%20of%20CTIMER%20and%20SPI%20peripherals%2C%20clock%20frequencies%2C%20interrupt%20vectors%20and%20related%20pins.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_2-1781198913604.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_2-1781198913604.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388736i773A415F7A6EA249%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_2-1781198913604.png%22%20alt%3D%22Habib_MS_2-1781198913604.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%2F*****************************************************************%0A*%20SPI%20Configuration%0A****************************************************************%2F%0A%23define%20PHDRIVER_MCXN947_SPI_MASTER%20LPSPI1%0A%23define%20PHDRIVER_MCXN947_SPI_DATA_RATE%205000000U%0A%23define%20PHDRIVER_MCXN947_SPI_CLK_SRC%20SPI_MASTER_CLOCK_FREQ%0A%23define%20PHDRIVER_MCXN947_SPI_IRQ%20LP_FLEXCOMM1_IRQn%0A%23define%20SPI_IRQ_PRIORITY%206%20%2F*SPI%20interrupt%20priority*%2F%0A%23define%20PHDRIVER_PIN_SSEL%20%2027U%2F*%20Chip%20Select%2C%20Pin6%2C%20SPI%20*%2F%0A%23define%20PHDRIVER_PIN_SCK%20%20%2025U%2F*%20SPI%20clock%2C%20Pin7%2C%20SPI%20*%2F%0A%23define%20PHDRIVER_PIN_MISO%20%2026U%2F*%20MISO%2C%20Pin8%2C%20SPI%20*%2F%0A%23define%20PHDRIVER_PIN_MOSI%20%2024U%2F*%20MOSI%2C%20Pin9%2C%20SPI%20*%2F%0A%23define%20PHDRIVER_FC1_SPI_DIV%20kCLOCK_DivFlexcom1Clk%0A%23define%20PHDRIVER_FC1_SPI_CLK%20kFRO12M_to_FLEXCOMM1%20%2F*Clock%20to%20attach%20to%20Flexcomm1*%2F%0A%2F*****************************************************************%0A*%20Timer%20Configuration%0A****************************************************************%2F%0A%23define%20PH_DRIVER_SDK_CTIMER%20CTIMER0%20%2F*CTIMER0%20base*%2F%0A%23define%20PH_DRIVER_SDK_CTIMER_CLK%20%20kCLOCK_DivCtimer0Clk%2F*CTIMER0%20clock*%2F%0A%23define%20PH_DRIVER_SDK_CTIMER_NVIC%20CTIMER0_IRQn%20%2F*Interrupt%20vector*%2F%0A%23define%20PH_DRIVER_SDK_CTIMER_PRIORITY%204%0A%23define%20PH_DRIVER_SDK_CTIMER_CLK_FREQ%20CLOCK_GetCTimerClkFreq(0U)%20%2F*CTIMER0%20Clock%20frequency*%2F%0A%0A%23endif%20%2F*%20DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_%20*%2F%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%2F*****************************************************************%0A*%20SPI%20Configuration%0A****************************************************************%2F%0A%23define%20PHDRIVER_MCXN947_SPI_MASTER%20LPSPI1%0A%23define%20PHDRIVER_MCXN947_SPI_DATA_RATE%205000000U%0A%23define%20PHDRIVER_MCXN947_SPI_CLK_SRC%20SPI_MASTER_CLOCK_FREQ%0A%23define%20PHDRIVER_MCXN947_SPI_IRQ%20LP_FLEXCOMM1_IRQn%0A%23define%20SPI_IRQ_PRIORITY%206%20%2F*SPI%20interrupt%20priority*%2F%0A%23define%20PHDRIVER_PIN_SSEL%20%2027U%2F*%20Chip%20Select%2C%20Pin6%2C%20SPI%20*%2F%0A%23define%20PHDRIVER_PIN_SCK%20%20%2025U%2F*%20SPI%20clock%2C%20Pin7%2C%20SPI%20*%2F%0A%23define%20PHDRIVER_PIN_MISO%20%2026U%2F*%20MISO%2C%20Pin8%2C%20SPI%20*%2F%0A%23define%20PHDRIVER_PIN_MOSI%20%2024U%2F*%20MOSI%2C%20Pin9%2C%20SPI%20*%2F%0A%23define%20PHDRIVER_FC1_SPI_DIV%20kCLOCK_DivFlexcom1Clk%0A%23define%20PHDRIVER_FC1_SPI_CLK%20kFRO12M_to_FLEXCOMM1%20%2F*Clock%20to%20attach%20to%20Flexcomm1*%2F%0A%2F*****************************************************************%0A*%20Timer%20Configuration%0A****************************************************************%2F%0A%23define%20PH_DRIVER_SDK_CTIMER%20CTIMER0%20%2F*CTIMER0%20base*%2F%0A%23define%20PH_DRIVER_SDK_CTIMER_CLK%20%20kCLOCK_DivCtimer0Clk%2F*CTIMER0%20clock*%2F%0A%23define%20PH_DRIVER_SDK_CTIMER_NVIC%20CTIMER0_IRQn%20%2F*Interrupt%20vector*%2F%0A%23define%20PH_DRIVER_SDK_CTIMER_PRIORITY%204%0A%23define%20PH_DRIVER_SDK_CTIMER_CLK_FREQ%20CLOCK_GetCTimerClkFreq(0U)%20%2F*CTIMER0%20Clock%20frequency*%2F%0A%0A%23endif%20%2F*%20DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_%20*%2F%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CH4%20id%3D%22toc-hId--555101202%22%20id%3D%22toc-hId--554448624%22%3EMCXN947%20SPI%20and%20SDK%20files%3C%2FH4%3E%0A%3CBR%20%2F%3E%0A%3CP%3ENow%2C%20inside%20DAL%20%26gt%3B%20src%20folder%20we%20will%20create%20a%20folder%20named%20%E2%80%9CMCXN947%E2%80%9D%20that%20will%20contain%202%20source%20files%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EphbalReg_Mcxn947Spi.c%3C%2FLI%3E%0A%3CLI%3EphDriver_Mcxn947SDK.c%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_3-1781198965225.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_3-1781198965225.png%22%20style%3D%22width%3A%20378px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388737iFB2B5232D55877C1%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_3-1781198965225.png%22%20alt%3D%22Habib_MS_3-1781198965225.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EInside%20these%20source%20files%20we%20will%20modify%20the%20functions%20from%20the%20source%20files%20of%20other%20board%20hosts%20with%20the%20specific%20configurations%20of%20MCXN947%20peripheral%20drivers%2C%20such%20as%20SPI%2C%20timers%2C%20GPIOs%20and%20interrupt%20handlers.%20This%20is%20done%20based%20on%20SDK%20examples%20such%20as%20%E2%80%9Cctimer_match_interrupt_example_cm33_core0%E2%80%9D%20and%20%E2%80%9Clpspi_polling_b2b_transfer_master_cm33_core0%E2%80%9D.%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-1932411631%22%20id%3D%22toc-hId-1933064209%22%3EphbalReg_Mcxn947Spi.c%3A%3C%2FH4%3E%0A%3CBR%20%2F%3E%0A%3CP%3EIn%20this%20file%20we%20first%20need%20to%20include%20the%20necessary%20files%20and%20include%20the%20headers%20and%20callbacks%20to%20ensure%20the%20correct%20functionality%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_4-1781199007051.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_4-1781199007051.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388738i17001D5897A47C72%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_4-1781199007051.png%22%20alt%3D%22Habib_MS_4-1781199007051.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%23include%20%22phDriver.h%22%0A%23include%20%3CBOARD.H%3E%0A%23include%20%22BoardSelection.h%22%0A%23include%20%3CFSL_LPSPI.H%3E%0A%23include%20%3CFSL_CLOCK.H%3E%0A%23include%20%3CFSL_PORT.H%3E%0A%0A%23define%20PHBAL_REG_MCXN947_SPI_ID%200x0FU%20%2F**%26lt%3B%20ID%20for%20MCXN947%20SPI%20BAL%20component%20*%2F%0A%23define%20RX_BUFFER_SIZE_MAX%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20272U%20%2F*%20Receive%20Buffer%20size%20while%20exchange%20*%2F%0A%0A%23ifndef%20PHDRIVER_MCXN947_SPI_POLLING%0Alpspi_master_handle_t%20g_masterHandle%3B%0A%2F*%20LPSPI%20user%20callback%20*%2F%0Avoid%20LPSPI_MasterUserCallback(LPSPI_Type%20*base%2C%20lpspi_master_handle_t%20*handle%2C%20status_t%20status%2C%20void%20*userData)%3B%0A%23endif%0Astatic%20void%20phbalReg_Mcxn947SpiConfig(void)%3B%0A%23ifndef%20PHDRIVER_MCXN947_SPI_POLLING%0Avolatile%20bool%20isTransferCompleted%20%20%3D%20false%3B%0Avoid%20LPSPI_MasterUserCallback(LPSPI_Type%20*base%2C%20lpspi_master_handle_t%20*handle%2C%20status_t%20status%2C%20void%20*userData)%0A%7B%0A%20%20%20%20if%20(status%20%3D%3D%20kStatus_Success)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20__NOP()%3B%0A%20%20%20%20%7D%0A%20%20%20%20isTransferCompleted%20%3D%20true%3B%0A%7D%0A%23endif%0A%3C%2FFSL_PORT.H%3E%3C%2FFSL_CLOCK.H%3E%3C%2FFSL_LPSPI.H%3E%3C%2FBOARD.H%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%23include%20%22phDriver.h%22%0A%23include%20%3CBOARD.H%3E%0A%23include%20%22BoardSelection.h%22%0A%23include%20%3CFSL_LPSPI.H%3E%0A%23include%20%3CFSL_CLOCK.H%3E%0A%23include%20%3CFSL_PORT.H%3E%0A%0A%23define%20PHBAL_REG_MCXN947_SPI_ID%200x0FU%20%2F**%26lt%3B%20ID%20for%20MCXN947%20SPI%20BAL%20component%20*%2F%0A%23define%20RX_BUFFER_SIZE_MAX%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20272U%20%2F*%20Receive%20Buffer%20size%20while%20exchange%20*%2F%0A%0A%23ifndef%20PHDRIVER_MCXN947_SPI_POLLING%0Alpspi_master_handle_t%20g_masterHandle%3B%0A%2F*%20LPSPI%20user%20callback%20*%2F%0Avoid%20LPSPI_MasterUserCallback(LPSPI_Type%20*base%2C%20lpspi_master_handle_t%20*handle%2C%20status_t%20status%2C%20void%20*userData)%3B%0A%23endif%0Astatic%20void%20phbalReg_Mcxn947SpiConfig(void)%3B%0A%23ifndef%20PHDRIVER_MCXN947_SPI_POLLING%0Avolatile%20bool%20isTransferCompleted%20%20%3D%20false%3B%0Avoid%20LPSPI_MasterUserCallback(LPSPI_Type%20*base%2C%20lpspi_master_handle_t%20*handle%2C%20status_t%20status%2C%20void%20*userData)%0A%7B%0A%20%20%20%20if%20(status%20%3D%3D%20kStatus_Success)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20__NOP()%3B%0A%20%20%20%20%7D%0A%20%20%20%20isTransferCompleted%20%3D%20true%3B%0A%7D%0A%23endif%0A%3C%2FFSL_PORT.H%3E%3C%2FFSL_CLOCK.H%3E%3C%2FFSL_LPSPI.H%3E%3C%2FBOARD.H%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EAfter%2C%20we%20will%20define%20the%20phbalReg_Init%20function%2C%20which%20will%20be%20used%20by%20the%20library%20to%20initialize%20the%20SPI%20peripheral%20in%20this%20case%2C%20and%20it%20is%20defined%20as%20follows%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_5-1781199067774.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_5-1781199067774.png%22%20style%3D%22width%3A%20884px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388739i93D36AA6B33AD516%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_5-1781199067774.png%22%20alt%3D%22Habib_MS_5-1781199067774.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3EphStatus_t%20phbalReg_Init(%20void%20*%20pDataParams%2C%20uint16_t%20wSizeOfDataParams)%0A%7B%0A%09lpspi_master_config_t%20userConfig%3B%0A%09uint32_t%20srcFreq%20%3D%200%3B%0A%09if((pDataParams%20%3D%3D%20NULL)%20%7C%7C%20(sizeof(phbalReg_Type_t)%20!%3D%20wSizeOfDataParams))%0A%09%7B%0A%09return%20(PH_DRIVER_ERROR%20%7C%20PH_COMP_DRIVER)%3B%0A%09%7D%0A%09((phbalReg_Type_t%20*)pDataParams)-%26gt%3BwId%20%3D%20PH_COMP_DRIVER%20%7C%20PHBAL_REG_MCXN947_SPI_ID%3B%0A%09((phbalReg_Type_t%20*)pDataParams)-%26gt%3BbBalType%20%3D%20PHBAL_REG_TYPE_SPI%3B%0A%09%2F*Initialize%20Flexcomm1%20clock*%2F%0A%09%2F*%20attach%20FRO%2012M%20to%20FLEXCOMM1%20*%2F%0A%09CLOCK_SetClkDiv(PHDRIVER_FC1_SPI_DIV%2C%201u)%3B%0A%09CLOCK_AttachClk(PHDRIVER_FC1_SPI_CLK)%3B%0A%09%2F*Configure%20SPI%20pins*%2F%0A%09phbalReg_Mcxn947SpiConfig()%3B%0A%09%2F*SPI%20configuration*%2F%0A%09LPSPI_MasterGetDefaultConfig(%26amp%3BuserConfig)%3B%0A%09userConfig.baudRate%20%3D%20PHDRIVER_MCXN947_SPI_DATA_RATE%3B%0A%09srcFreq%20%3D%20SPI_MASTER_CLOCK_FREQ%3B%0A%09userConfig.whichPcs%20%3D%20(lpspi_which_pcs_t)kLPSPI_Pcs0%3B%0A%09userConfig.pcsActiveHighOrLow%20%3D%20(lpspi_pcs_polarity_config_t)kLPSPI_PcsActiveLow%3B%0A%09userConfig.pcsToSckDelayInNanoSec%20%20%20%20%20%20%20%20%3D%201000000000U%20%2F%20(userConfig.baudRate%20*%201U)%3B%0A%09userConfig.lastSckToPcsDelayInNanoSec%20%20%20%20%3D%201000000000U%20%2F%20(userConfig.baudRate%20*%201U)%3B%0A%09userConfig.betweenTransferDelayInNanoSec%20%3D%201000000000U%20%2F%20(userConfig.baudRate%20*%201U)%3B%0A%0A%09%2F*Initialize%20SPI*%2F%0A%23ifdef%20PHDRIVER_MCXN947_SPI_POLLING%0A%09LPSPI_MasterInit(PHDRIVER_MCXN947_SPI_MASTER%2C%20%26amp%3BuserConfig%2C%20srcFreq)%3B%0A%23else%0A%09LPSPI_MasterInit(PHDRIVER_MCXN947_SPI_MASTER%2C%20%26amp%3BuserConfig%2C%20srcFreq)%3B%0A%20%20%20%20LPSPI_MasterTransferCreateHandle(PHDRIVER_MCXN947_SPI_MASTER%2C%20%26amp%3Bg_masterHandle%2C%20LPSPI_MasterUserCallback%2C%20NULL)%3B%0A%23endif%0A%09return%20PH_DRIVER_SUCCESS%3B%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3EphStatus_t%20phbalReg_Init(%20void%20*%20pDataParams%2C%20uint16_t%20wSizeOfDataParams)%0A%7B%0A%09lpspi_master_config_t%20userConfig%3B%0A%09uint32_t%20srcFreq%20%3D%200%3B%0A%09if((pDataParams%20%3D%3D%20NULL)%20%7C%7C%20(sizeof(phbalReg_Type_t)%20!%3D%20wSizeOfDataParams))%0A%09%7B%0A%09return%20(PH_DRIVER_ERROR%20%7C%20PH_COMP_DRIVER)%3B%0A%09%7D%0A%09((phbalReg_Type_t%20*)pDataParams)-%26gt%3BwId%20%3D%20PH_COMP_DRIVER%20%7C%20PHBAL_REG_MCXN947_SPI_ID%3B%0A%09((phbalReg_Type_t%20*)pDataParams)-%26gt%3BbBalType%20%3D%20PHBAL_REG_TYPE_SPI%3B%0A%09%2F*Initialize%20Flexcomm1%20clock*%2F%0A%09%2F*%20attach%20FRO%2012M%20to%20FLEXCOMM1%20*%2F%0A%09CLOCK_SetClkDiv(PHDRIVER_FC1_SPI_DIV%2C%201u)%3B%0A%09CLOCK_AttachClk(PHDRIVER_FC1_SPI_CLK)%3B%0A%09%2F*Configure%20SPI%20pins*%2F%0A%09phbalReg_Mcxn947SpiConfig()%3B%0A%09%2F*SPI%20configuration*%2F%0A%09LPSPI_MasterGetDefaultConfig(%26amp%3BuserConfig)%3B%0A%09userConfig.baudRate%20%3D%20PHDRIVER_MCXN947_SPI_DATA_RATE%3B%0A%09srcFreq%20%3D%20SPI_MASTER_CLOCK_FREQ%3B%0A%09userConfig.whichPcs%20%3D%20(lpspi_which_pcs_t)kLPSPI_Pcs0%3B%0A%09userConfig.pcsActiveHighOrLow%20%3D%20(lpspi_pcs_polarity_config_t)kLPSPI_PcsActiveLow%3B%0A%09userConfig.pcsToSckDelayInNanoSec%20%20%20%20%20%20%20%20%3D%201000000000U%20%2F%20(userConfig.baudRate%20*%201U)%3B%0A%09userConfig.lastSckToPcsDelayInNanoSec%20%20%20%20%3D%201000000000U%20%2F%20(userConfig.baudRate%20*%201U)%3B%0A%09userConfig.betweenTransferDelayInNanoSec%20%3D%201000000000U%20%2F%20(userConfig.baudRate%20*%201U)%3B%0A%0A%09%2F*Initialize%20SPI*%2F%0A%23ifdef%20PHDRIVER_MCXN947_SPI_POLLING%0A%09LPSPI_MasterInit(PHDRIVER_MCXN947_SPI_MASTER%2C%20%26amp%3BuserConfig%2C%20srcFreq)%3B%0A%23else%0A%09LPSPI_MasterInit(PHDRIVER_MCXN947_SPI_MASTER%2C%20%26amp%3BuserConfig%2C%20srcFreq)%3B%0A%20%20%20%20LPSPI_MasterTransferCreateHandle(PHDRIVER_MCXN947_SPI_MASTER%2C%20%26amp%3Bg_masterHandle%2C%20LPSPI_MasterUserCallback%2C%20NULL)%3B%0A%23endif%0A%09return%20PH_DRIVER_SUCCESS%3B%0A%7D%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EWe%20have%20to%20define%20the%20phbalReg_Exchange%20function%20as%20well%2C%20which%20is%20used%20for%20communicating%20via%20SPI%20with%20the%20PN5190.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1781200864120.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1781200864120.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388740i097625082179309D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1781200864120.png%22%20alt%3D%22Habib_MS_0-1781200864120.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_1-1781200889109.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_1-1781200889109.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388741i3A47C7D0EA96917A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_1-1781200889109.png%22%20alt%3D%22Habib_MS_1-1781200889109.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3EphStatus_t%20phbalReg_Exchange(%0A%09%09%09%09void%20*%20pDataParams%2C%0A%09%09%09%09uint16_t%20wOption%2C%0A%09%09%09%09uint8_t%20*%20pTxBuffer%2C%0A%09%09%09%09uint16_t%20wTxLength%2C%0A%09%09%09%09uint16_t%20wRxBufSize%2C%0A%09%09%09%09uint8_t%20*%20pRxBuffer%2C%0A%09%09%09%09uint16_t%20*%20pRxLength%0A%09%09%09%09)%0A%7B%0A%20%20%20%20phStatus_t%20status%20%3D%20PH_DRIVER_SUCCESS%3B%0A%20%20%20%20uint8_t%20*%20pRxBuf%3B%0A%20%20%20%20status_t%20lpspiStatus%3B%0A%20%20%20%20lpspi_transfer_t%20g_masterXfer%3B%0A%20%20%20%20uint8_t%20g_dummyBuffer%5BRX_BUFFER_SIZE_MAX%5D%3B%0A%20%20%20%20if(pRxBuffer%20%3D%3D%20NULL)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20pRxBuf%20%3D%20g_dummyBuffer%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20pRxBuf%20%3D%20pRxBuffer%3B%0A%20%20%20%20%7D%0A%20%20%20%20if(pTxBuffer%20%3D%3D%20NULL)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20wTxLength%20%3D%20wRxBufSize%3B%0A%20%20%20%20%20%20%20%20g_dummyBuffer%5B0%5D%20%3D%200xFF%3B%0A%20%20%20%20%20%20%20%20pTxBuffer%20%3D%20g_dummyBuffer%3B%0A%20%20%20%20%7D%0A%20%20%20%20memset(%26amp%3Bg_masterXfer%2C%200%2C%20sizeof(lpspi_transfer_t))%3B%0A%20%20%20%20%2F*%20Set%20up%20the%20transfer%20*%2F%0A%20%20%20%20g_masterXfer.txData%20%3D%20pTxBuffer%3B%0A%20%20%20%20g_masterXfer.rxData%20%3D%20pRxBuf%3B%0A%20%20%20%20g_masterXfer.dataSize%20%3D%20wTxLength%3B%0A%20%20%20%20g_masterXfer.configFlags%20%3D%20kLPSPI_MasterPcs0%20%7C%20kLPSPI_MasterPcsContinuous%20%7C%20kLPSPI_MasterByteSwap%3B%0A%20%20%20%20%2F*%20Start%20transfer%20*%2F%0A%23ifdef%20PHDRIVER_MCXN947_SPI_POLLING%0A%20%20%20%20lpspiStatus%20%3D%20LPSPI_MasterTransferBlocking(PHDRIVER_MCXN947_SPI_MASTER%2C%20%26amp%3Bg_masterXfer)%3B%0A%23else%0A%20%20%20%20lpspiStatus%20%3D%20LPSPI_MasterTransferNonBlocking(PHDRIVER_MCXN947_SPI_MASTER%2C%20%26amp%3Bg_masterHandle%2C%20%26amp%3Bg_masterXfer)%3B%0A%20%20%20%20%2F*%20Wait%20transfer%20complete%20*%2F%0A%20%20%20%20while%20(!isTransferCompleted)%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%23endif%0A%20%20%20%20if%20(lpspiStatus%20!%3D%20kStatus_Success)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20return%20(PH_DRIVER_FAILURE%20%7C%20PH_COMP_DRIVER)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(pRxLength%20!%3D%20NULL)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20*pRxLength%20%3D%20wTxLength%3B%0A%20%20%20%20%7D%0A%23ifndef%20PHDRIVER_MCXN947_SPI_POLLING%0A%20%20%20%20SDK_DelayAtLeastUs(300U%2C%20BOARD_BOOTCLOCKPLL150M_CORE_CLOCK)%3B%0A%23endif%0A%20%20%20%20return%20status%3B%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3EphStatus_t%20phbalReg_Exchange(%0A%09%09%09%09void%20*%20pDataParams%2C%0A%09%09%09%09uint16_t%20wOption%2C%0A%09%09%09%09uint8_t%20*%20pTxBuffer%2C%0A%09%09%09%09uint16_t%20wTxLength%2C%0A%09%09%09%09uint16_t%20wRxBufSize%2C%0A%09%09%09%09uint8_t%20*%20pRxBuffer%2C%0A%09%09%09%09uint16_t%20*%20pRxLength%0A%09%09%09%09)%0A%7B%0A%20%20%20%20phStatus_t%20status%20%3D%20PH_DRIVER_SUCCESS%3B%0A%20%20%20%20uint8_t%20*%20pRxBuf%3B%0A%20%20%20%20status_t%20lpspiStatus%3B%0A%20%20%20%20lpspi_transfer_t%20g_masterXfer%3B%0A%20%20%20%20uint8_t%20g_dummyBuffer%5BRX_BUFFER_SIZE_MAX%5D%3B%0A%20%20%20%20if(pRxBuffer%20%3D%3D%20NULL)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20pRxBuf%20%3D%20g_dummyBuffer%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20pRxBuf%20%3D%20pRxBuffer%3B%0A%20%20%20%20%7D%0A%20%20%20%20if(pTxBuffer%20%3D%3D%20NULL)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20wTxLength%20%3D%20wRxBufSize%3B%0A%20%20%20%20%20%20%20%20g_dummyBuffer%5B0%5D%20%3D%200xFF%3B%0A%20%20%20%20%20%20%20%20pTxBuffer%20%3D%20g_dummyBuffer%3B%0A%20%20%20%20%7D%0A%20%20%20%20memset(%26amp%3Bg_masterXfer%2C%200%2C%20sizeof(lpspi_transfer_t))%3B%0A%20%20%20%20%2F*%20Set%20up%20the%20transfer%20*%2F%0A%20%20%20%20g_masterXfer.txData%20%3D%20pTxBuffer%3B%0A%20%20%20%20g_masterXfer.rxData%20%3D%20pRxBuf%3B%0A%20%20%20%20g_masterXfer.dataSize%20%3D%20wTxLength%3B%0A%20%20%20%20g_masterXfer.configFlags%20%3D%20kLPSPI_MasterPcs0%20%7C%20kLPSPI_MasterPcsContinuous%20%7C%20kLPSPI_MasterByteSwap%3B%0A%20%20%20%20%2F*%20Start%20transfer%20*%2F%0A%23ifdef%20PHDRIVER_MCXN947_SPI_POLLING%0A%20%20%20%20lpspiStatus%20%3D%20LPSPI_MasterTransferBlocking(PHDRIVER_MCXN947_SPI_MASTER%2C%20%26amp%3Bg_masterXfer)%3B%0A%23else%0A%20%20%20%20lpspiStatus%20%3D%20LPSPI_MasterTransferNonBlocking(PHDRIVER_MCXN947_SPI_MASTER%2C%20%26amp%3Bg_masterHandle%2C%20%26amp%3Bg_masterXfer)%3B%0A%20%20%20%20%2F*%20Wait%20transfer%20complete%20*%2F%0A%20%20%20%20while%20(!isTransferCompleted)%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%23endif%0A%20%20%20%20if%20(lpspiStatus%20!%3D%20kStatus_Success)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20return%20(PH_DRIVER_FAILURE%20%7C%20PH_COMP_DRIVER)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(pRxLength%20!%3D%20NULL)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20*pRxLength%20%3D%20wTxLength%3B%0A%20%20%20%20%7D%0A%23ifndef%20PHDRIVER_MCXN947_SPI_POLLING%0A%20%20%20%20SDK_DelayAtLeastUs(300U%2C%20BOARD_BOOTCLOCKPLL150M_CORE_CLOCK)%3B%0A%23endif%0A%20%20%20%20return%20status%3B%0A%7D%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EFinally%2C%20we%20will%20define%20the%20phbalReg_Mcxn947SpiConfig%20function%2C%20which%20is%20called%20by%20phbalReg_Init%20to%20configure%20the%20SPI%20pins%20on%20the%20MCXN947%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_2-1781200981954.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_2-1781200981954.png%22%20style%3D%22width%3A%20677px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388742i5CECC5A26C29C046%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_2-1781200981954.png%22%20alt%3D%22Habib_MS_2-1781200981954.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Estatic%20void%20phbalReg_Mcxn947SpiConfig(void)%0A%7B%0A%20%20%20%20const%20port_pin_config_t%20port0_24_pinB6_config%20%3D%20%7B%0AkPORT_PullUp%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_SlowSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20FC1_P0%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt2%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_24%20(pin%20B6)%20is%20configured%20as%20SPI_MOSI%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2024U%2C%20%26amp%3Bport0_24_pinB6_config)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port0_25_pinA6_config%20%3D%20%7BkPORT_PullUp%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_SlowSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20FC1_P1%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt2%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_25%20(pin%20A6)%20is%20configured%20as%20SPI_SCK%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2025U%2C%20%26amp%3Bport0_25_pinA6_config)%3B%0Aconst%20port_pin_config_t%20port0_26_pinF10_config%20%3D%20%7BkPORT_PullUp%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_SlowSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20FC1_P2%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt2%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_26%20(pin%20F10)%20is%20configured%20as%20SPI_MISO%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2026U%2C%20%26amp%3Bport0_26_pinF10_config)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port0_27_pinE10_config%20%3D%20%7BkPORT_PullUp%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_SlowSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20FC1_P3%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt2%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_27%20(pin%20E10)%20is%20configured%20as%20SPI_CS%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2027U%2C%20%26amp%3Bport0_27_pinE10_config)%3B%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3Estatic%20void%20phbalReg_Mcxn947SpiConfig(void)%0A%7B%0A%20%20%20%20const%20port_pin_config_t%20port0_24_pinB6_config%20%3D%20%7B%0AkPORT_PullUp%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_SlowSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20FC1_P0%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt2%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_24%20(pin%20B6)%20is%20configured%20as%20SPI_MOSI%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2024U%2C%20%26amp%3Bport0_24_pinB6_config)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port0_25_pinA6_config%20%3D%20%7BkPORT_PullUp%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_SlowSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20FC1_P1%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt2%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_25%20(pin%20A6)%20is%20configured%20as%20SPI_SCK%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2025U%2C%20%26amp%3Bport0_25_pinA6_config)%3B%0Aconst%20port_pin_config_t%20port0_26_pinF10_config%20%3D%20%7BkPORT_PullUp%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_SlowSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20FC1_P2%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt2%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_26%20(pin%20F10)%20is%20configured%20as%20SPI_MISO%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2026U%2C%20%26amp%3Bport0_26_pinF10_config)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port0_27_pinE10_config%20%3D%20%7BkPORT_PullUp%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_SlowSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20FC1_P3%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt2%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_27%20(pin%20E10)%20is%20configured%20as%20SPI_CS%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2027U%2C%20%26amp%3Bport0_27_pinE10_config)%3B%0A%7D%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CH4%20id%3D%22toc-hId-124957168%22%20id%3D%22toc-hId-125609746%22%3EphDriver_Mcxn947SDK.c%3A%3C%2FH4%3E%0A%3CBR%20%2F%3E%0A%3CP%3EIn%20this%20file%20we%20will%20have%20the%20following%20definitions%20and%20includes%20that%20describe%20relevant%20characteristics%20of%20the%20ctimer%20(configuration%20structures%2C%20interrupt%20handlers%20and%20maximum%20count%20value)%2C%20and%20of%20the%20GPIO%20port%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_3-1781201256179.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_3-1781201256179.png%22%20style%3D%22width%3A%20978px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388743i3080A5B76BE1C51C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_3-1781201256179.png%22%20alt%3D%22Habib_MS_3-1781201256179.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%23include%20%22phDriver.h%22%0A%23include%20%22BoardSelection.h%22%0A%23include%20%22fsl_device_registers.h%22%0A%23include%20%3CFSL_GPIO.H%3E%0A%23include%20%3CFSL_CTIMER.H%3E%0A%2F*%20***********************************************************************************************************%0A*%20Internal%20Definitions%0A*%20**********************************************************************************************************%20*%2F%0A%23define%20MCXN947_TIMER_MAX_32BIT%200xFFFFFFFFU%0A%23define%20CTIMER_HANDLER%20CTIMER0_IRQHandler%0A%2F*%20***********************************************************************************************************%0A%20*%20*%20Type%20Definitions%0A***********************************************************************************************************%20*%2F%0Avolatile%20bool%20ctimerIsrFlag%20%3D%20false%3B%0A%2F*%20***********************************************************************************************************%0A*%20Global%20and%20Static%20Variables%0A*%0A*%20Match%20Configuration%20for%20CTIMER%20Channel%200*%2F%0Astatic%20ctimer_match_config_t%20matchConfig0%3B%0A%2F*%20Total%20Size%3A%20NNNbytes%0A*%20**********************************************************************************************************%20*%2F%0A%2F*%20Array%20initializer%20of%20GPIO%20peripheral%20base%20pointers%20*%2F%0Astatic%20const%20GPIO_Type%20*pGpiosBaseAddr%5B%5D%20%3D%20GPIO_BASE_PTRS%3B%0A%0Astatic%20pphDriver_TimerCallBck_t%20pCTimerCallBack%3B%0Astatic%20volatile%20uint8_t%20dwTimerExp%3B%0A%0Astatic%20const%20gpio_interrupt_config_t%20aInterruptTypes%5B%5D%20%3D%20%7BkGPIO_InterruptLogicZero%2C%20%2F*%20Unused.%20*%2F%0A%20%20%20%20%20%20%20%20kGPIO_InterruptLogicZero%2C%0A%20%20%20%20%20%20%20%20kGPIO_InterruptLogicOne%2C%0A%20%20%20%20%20%20%20%20kGPIO_InterruptRisingEdge%2C%0A%20%20%20%20%20%20%20%20kGPIO_InterruptFallingEdge%2C%0A%20%20%20%20%20%20%20%20kGPIO_InterruptEitherEdge%2C%0A%7D%3B%0A%2F*%20***********************************************************************************************************%0A*%20Private%20Functions%20Prototypes%0A*%20**********************************************************************************************************%20*%2F%0Astatic%20void%20phDriver_CTimerIsrCallBack(void)%3B%0A%3C%2FFSL_CTIMER.H%3E%3C%2FFSL_GPIO.H%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%23include%20%22phDriver.h%22%0A%23include%20%22BoardSelection.h%22%0A%23include%20%22fsl_device_registers.h%22%0A%23include%20%3CFSL_GPIO.H%3E%0A%23include%20%3CFSL_CTIMER.H%3E%0A%2F*%20***********************************************************************************************************%0A*%20Internal%20Definitions%0A*%20**********************************************************************************************************%20*%2F%0A%23define%20MCXN947_TIMER_MAX_32BIT%200xFFFFFFFFU%0A%23define%20CTIMER_HANDLER%20CTIMER0_IRQHandler%0A%2F*%20***********************************************************************************************************%0A%20*%20*%20Type%20Definitions%0A***********************************************************************************************************%20*%2F%0Avolatile%20bool%20ctimerIsrFlag%20%3D%20false%3B%0A%2F*%20***********************************************************************************************************%0A*%20Global%20and%20Static%20Variables%0A*%0A*%20Match%20Configuration%20for%20CTIMER%20Channel%200*%2F%0Astatic%20ctimer_match_config_t%20matchConfig0%3B%0A%2F*%20Total%20Size%3A%20NNNbytes%0A*%20**********************************************************************************************************%20*%2F%0A%2F*%20Array%20initializer%20of%20GPIO%20peripheral%20base%20pointers%20*%2F%0Astatic%20const%20GPIO_Type%20*pGpiosBaseAddr%5B%5D%20%3D%20GPIO_BASE_PTRS%3B%0A%0Astatic%20pphDriver_TimerCallBck_t%20pCTimerCallBack%3B%0Astatic%20volatile%20uint8_t%20dwTimerExp%3B%0A%0Astatic%20const%20gpio_interrupt_config_t%20aInterruptTypes%5B%5D%20%3D%20%7BkGPIO_InterruptLogicZero%2C%20%2F*%20Unused.%20*%2F%0A%20%20%20%20%20%20%20%20kGPIO_InterruptLogicZero%2C%0A%20%20%20%20%20%20%20%20kGPIO_InterruptLogicOne%2C%0A%20%20%20%20%20%20%20%20kGPIO_InterruptRisingEdge%2C%0A%20%20%20%20%20%20%20%20kGPIO_InterruptFallingEdge%2C%0A%20%20%20%20%20%20%20%20kGPIO_InterruptEitherEdge%2C%0A%7D%3B%0A%2F*%20***********************************************************************************************************%0A*%20Private%20Functions%20Prototypes%0A*%20**********************************************************************************************************%20*%2F%0Astatic%20void%20phDriver_CTimerIsrCallBack(void)%3B%0A%3C%2FFSL_CTIMER.H%3E%3C%2FFSL_GPIO.H%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EWe%20will%20define%20the%20following%20functions%20to%20initialize%20and%20stop%20the%20timer%2C%20and%20to%20enable%20timer%20interruptions%20and%20its%20callback%3A%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_4-1781201344846.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_4-1781201344846.png%22%20style%3D%22width%3A%20743px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388744iD13175757A39903D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_4-1781201344846.png%22%20alt%3D%22Habib_MS_4-1781201344846.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_5-1781201376952.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_5-1781201376952.png%22%20style%3D%22width%3A%20965px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388745i983118C957EC7B3A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_5-1781201376952.png%22%20alt%3D%22Habib_MS_5-1781201376952.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3EphStatus_t%20phDriver_TimerStart(phDriver_Timer_Unit_t%20eTimerUnit%2C%20uint32_t%20dwTimePeriod%2C%0ApphDriver_TimerCallBck_t%20pTimerCallBack)%0A%7B%0A%09uint64_t%20qwTimerCnt%3B%0A%09uint32_t%20dwTimerFreq%3B%0A%0A%09dwTimerFreq%20%3D%20PH_DRIVER_SDK_CTIMER_CLK_FREQ%3B%0A%0A%09qwTimerCnt%20%3D%20dwTimerFreq%3B%0A%09qwTimerCnt%20%3D%20(qwTimerCnt%20%2F%20eTimerUnit)%3B%0A%09qwTimerCnt%20%3D%20(dwTimePeriod%20*%20qwTimerCnt)%3B%0A%09%2F*%2032-bit%20timers.%20*%2F%0A%09if(qwTimerCnt%20%26gt%3B%20(uint64_t)MCXN947_TIMER_MAX_32BIT)%0A%09%7B%0A%09%09return%20PH_DRIVER_ERROR%20%7C%20PH_COMP_DRIVER%3B%0A%09%7D%0A%09if(pTimerCallBack%20%3D%3D%20NULL)%20%2F*%20Timer%20Start%20is%20blocking%20call.%20*%2F%0A%09%7B%0A%09%09dwTimerExp%20%3D%200%3B%0A%09%09pCTimerCallBack%20%3D%20phDriver_CTimerIsrCallBack%3B%0A%09%7D%0A%09else%20%2F*%20Call%20the%20Timer%20callback.%20*%2F%0A%09%7B%0A%09%09pCTimerCallBack%20%3D%20pTimerCallBack%3B%0A%09%7D%0A%09%2F*Configure%20%26amp%3B%20start%20CTIMER*%2F%0A%09%2F*Ctimer%20config%20structure*%2F%0A%09ctimer_config_t%20config%3B%0A%0A%09%2F*Timer%20mode%2C%20init*%2F%0A%09CTIMER_GetDefaultConfig(%26amp%3Bconfig)%3B%0A%09CTIMER_Init(PH_DRIVER_SDK_CTIMER%2C%20%26amp%3Bconfig)%3B%0A%09CTIMER_EnableInterrupts(PH_DRIVER_SDK_CTIMER%2C%20kCTIMER_Match0InterruptEnable%7CkCTIMER_Capture0InterruptEnable)%3B%0A%09%2F*%20Configuration%20match%200%20*%2F%0A%09matchConfig0.enableCounterReset%20%3D%20true%3B%0A%09matchConfig0.enableCounterStop%20%09%3D%20false%3B%0A%09matchConfig0.matchValue%20%09%20%09%3D%20(uint32_t)qwTimerCnt%3B%0A%09matchConfig0.outControl%20%09%09%3D%20kCTIMER_Output_NoAction%3B%0A%09matchConfig0.outPinInitState%20%09%3D%20false%3B%0A%09matchConfig0.enableInterrupt%20%09%3D%20true%3B%0A%0A%09EnableIRQ(PH_DRIVER_SDK_CTIMER_NVIC)%3B%0ANVIC_SetPriority(PH_DRIVER_SDK_CTIMER_NVIC%2C%20PH_DRIVER_SDK_CTIMER_PRIORITY)%3B%0A%09%2F*Setup%20Match*%2F%0A%09CTIMER_SetupMatch(PH_DRIVER_SDK_CTIMER%2C%20kCTIMER_Match_0%2C%20%26amp%3BmatchConfig0)%3B%0A%09%2F*Start*%2F%0A%09CTIMER_StartTimer(PH_DRIVER_SDK_CTIMER)%3B%0A%09while%20(true)%0A%09%7B%0A%09%09%2F*%20Check%20whether%20an%20interrupt%20occurred%20*%2F%0A%09%09if%20(true%20%3D%3D%20ctimerIsrFlag%20%26amp%3B%26amp%3B%20dwTimerExp)%0A%09%09%7B%0A%09%09%09%2F*%20Clear%20interrupt%20flag*%2F%0A%09%09%09ctimerIsrFlag%20%3D%20false%3B%0A%09%09%09break%3B%0A%09%09%7D%0A%09%7D%0A%0A%09return%20PH_DRIVER_SUCCESS%3B%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3EphStatus_t%20phDriver_TimerStart(phDriver_Timer_Unit_t%20eTimerUnit%2C%20uint32_t%20dwTimePeriod%2C%0ApphDriver_TimerCallBck_t%20pTimerCallBack)%0A%7B%0A%09uint64_t%20qwTimerCnt%3B%0A%09uint32_t%20dwTimerFreq%3B%0A%0A%09dwTimerFreq%20%3D%20PH_DRIVER_SDK_CTIMER_CLK_FREQ%3B%0A%0A%09qwTimerCnt%20%3D%20dwTimerFreq%3B%0A%09qwTimerCnt%20%3D%20(qwTimerCnt%20%2F%20eTimerUnit)%3B%0A%09qwTimerCnt%20%3D%20(dwTimePeriod%20*%20qwTimerCnt)%3B%0A%09%2F*%2032-bit%20timers.%20*%2F%0A%09if(qwTimerCnt%20%26gt%3B%20(uint64_t)MCXN947_TIMER_MAX_32BIT)%0A%09%7B%0A%09%09return%20PH_DRIVER_ERROR%20%7C%20PH_COMP_DRIVER%3B%0A%09%7D%0A%09if(pTimerCallBack%20%3D%3D%20NULL)%20%2F*%20Timer%20Start%20is%20blocking%20call.%20*%2F%0A%09%7B%0A%09%09dwTimerExp%20%3D%200%3B%0A%09%09pCTimerCallBack%20%3D%20phDriver_CTimerIsrCallBack%3B%0A%09%7D%0A%09else%20%2F*%20Call%20the%20Timer%20callback.%20*%2F%0A%09%7B%0A%09%09pCTimerCallBack%20%3D%20pTimerCallBack%3B%0A%09%7D%0A%09%2F*Configure%20%26amp%3B%20start%20CTIMER*%2F%0A%09%2F*Ctimer%20config%20structure*%2F%0A%09ctimer_config_t%20config%3B%0A%0A%09%2F*Timer%20mode%2C%20init*%2F%0A%09CTIMER_GetDefaultConfig(%26amp%3Bconfig)%3B%0A%09CTIMER_Init(PH_DRIVER_SDK_CTIMER%2C%20%26amp%3Bconfig)%3B%0A%09CTIMER_EnableInterrupts(PH_DRIVER_SDK_CTIMER%2C%20kCTIMER_Match0InterruptEnable%7CkCTIMER_Capture0InterruptEnable)%3B%0A%09%2F*%20Configuration%20match%200%20*%2F%0A%09matchConfig0.enableCounterReset%20%3D%20true%3B%0A%09matchConfig0.enableCounterStop%20%09%3D%20false%3B%0A%09matchConfig0.matchValue%20%09%20%09%3D%20(uint32_t)qwTimerCnt%3B%0A%09matchConfig0.outControl%20%09%09%3D%20kCTIMER_Output_NoAction%3B%0A%09matchConfig0.outPinInitState%20%09%3D%20false%3B%0A%09matchConfig0.enableInterrupt%20%09%3D%20true%3B%0A%0A%09EnableIRQ(PH_DRIVER_SDK_CTIMER_NVIC)%3B%0ANVIC_SetPriority(PH_DRIVER_SDK_CTIMER_NVIC%2C%20PH_DRIVER_SDK_CTIMER_PRIORITY)%3B%0A%09%2F*Setup%20Match*%2F%0A%09CTIMER_SetupMatch(PH_DRIVER_SDK_CTIMER%2C%20kCTIMER_Match_0%2C%20%26amp%3BmatchConfig0)%3B%0A%09%2F*Start*%2F%0A%09CTIMER_StartTimer(PH_DRIVER_SDK_CTIMER)%3B%0A%09while%20(true)%0A%09%7B%0A%09%09%2F*%20Check%20whether%20an%20interrupt%20occurred%20*%2F%0A%09%09if%20(true%20%3D%3D%20ctimerIsrFlag%20%26amp%3B%26amp%3B%20dwTimerExp)%0A%09%09%7B%0A%09%09%09%2F*%20Clear%20interrupt%20flag*%2F%0A%09%09%09ctimerIsrFlag%20%3D%20false%3B%0A%09%09%09break%3B%0A%09%09%7D%0A%09%7D%0A%0A%09return%20PH_DRIVER_SUCCESS%3B%0A%7D%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_7-1781201652469.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_7-1781201652469.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388747i76A07A96EF3C4194%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_7-1781201652469.png%22%20alt%3D%22Habib_MS_7-1781201652469.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3EphStatus_t%20phDriver_TimerStop(void)%0A%7B%0A%09%2F*Stop%20timer%20%26amp%3B%20disable%20interrupts*%2F%0A%09CTIMER_StopTimer(PH_DRIVER_SDK_CTIMER)%3B%0A%09CTIMER_DisableInterrupts(PH_DRIVER_SDK_CTIMER%2C%20kCTIMER_Match0InterruptEnable%7CkCTIMER_Capture0InterruptEnable)%3B%0A%0A%09%2F*%20Disable%20at%20the%20NVIC%20*%2F%0A%09DisableIRQ(PH_DRIVER_SDK_CTIMER_NVIC)%3B%0A%0A%09return%20PH_DRIVER_SUCCESS%3B%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3EphStatus_t%20phDriver_TimerStop(void)%0A%7B%0A%09%2F*Stop%20timer%20%26amp%3B%20disable%20interrupts*%2F%0A%09CTIMER_StopTimer(PH_DRIVER_SDK_CTIMER)%3B%0A%09CTIMER_DisableInterrupts(PH_DRIVER_SDK_CTIMER%2C%20kCTIMER_Match0InterruptEnable%7CkCTIMER_Capture0InterruptEnable)%3B%0A%0A%09%2F*%20Disable%20at%20the%20NVIC%20*%2F%0A%09DisableIRQ(PH_DRIVER_SDK_CTIMER_NVIC)%3B%0A%0A%09return%20PH_DRIVER_SUCCESS%3B%0A%7D%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EWe%20will%20also%20have%20definitions%20for%20the%20functions%20that%20configure%20and%20handle%20GPIOs%20of%20the%20MCXN947%20and%20enable%20interruptions.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1781201935240.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1781201935240.png%22%20style%3D%22width%3A%20799px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388748i35E1A9EDEC2A913D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1781201935240.png%22%20alt%3D%22Habib_MS_0-1781201935240.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3EphStatus_t%20phDriver_PinConfig(uint32_t%20dwPinNumber%2C%20phDriver_Pin_Func_t%20ePinFunc%2C%20phDriver_Pin_Config_t%20*pPinConfig)%0A%7B%0A%09gpio_pin_config_t%20sGpioConfig%3B%0A%09uint8_t%20bPinNum%3B%0A%09uint8_t%20bPortGpio%3B%0A%0A%09if((ePinFunc%20%3D%3D%20PH_DRIVER_PINFUNC_BIDIR)%20%7C%7C%20(pPinConfig%20%3D%3D%20NULL))%0A%09%7B%0A%09%09return%20PH_DRIVER_ERROR%20%7C%20PH_COMP_DRIVER%3B%0A%09%7D%0A%09%2F*%20Extract%20the%20Pin%2C%20Gpio%2C%20Port%20details%20from%20dwPinNumber%20*%2F%0A%09bPinNum%20%3D%20(uint8_t)(dwPinNumber%20%26amp%3B%200xFF)%3B%0A%09bPortGpio%20%3D%20(uint8_t)((dwPinNumber%20%26amp%3B%200xFF00)%26gt%3B%26gt%3B8)%3B%0A%0A%09sGpioConfig.pinDirection%20%3D%20(ePinFunc%20%3D%3D%20PH_DRIVER_PINFUNC_OUTPUT)%20%3F%20kGPIO_DigitalOutput%3AkGPIO_DigitalInput%3B%0A%09sGpioConfig.outputLogic%20%3D%20pPinConfig-%26gt%3BbOutputLogic%3B%0A%0A%09if(ePinFunc%20%3D%3D%20PH_DRIVER_PINFUNC_INTERRUPT)%0A%09%7B%0A%09%09gpio_interrupt_config_t%20intConfig%20%3D%20aInterruptTypes%5B(uint8_t)pPinConfig-%26gt%3BeInterruptConfig%5D%3B%0A%0A%09%09GPIO_GpioClearInterruptFlags((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2C%20bPinNum)%3B%0A%09%09GPIO_SetPinInterruptConfig((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2C%20bPinNum%2C%20intConfig)%3B%0A%09%09EnableIRQ(EINT_IRQn)%3B%0A%0A%09%09GPIO_PinInit((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2CbPinNum%2C%26amp%3BsGpioConfig)%3B%0A%09%7D%0A%09else%0A%09%7B%0A%09%09GPIO_PinInit((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2CbPinNum%2C%26amp%3BsGpioConfig)%3B%0A%09%7D%0A%0A%09return%20PH_DRIVER_SUCCESS%3B%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3EphStatus_t%20phDriver_PinConfig(uint32_t%20dwPinNumber%2C%20phDriver_Pin_Func_t%20ePinFunc%2C%20phDriver_Pin_Config_t%20*pPinConfig)%0A%7B%0A%09gpio_pin_config_t%20sGpioConfig%3B%0A%09uint8_t%20bPinNum%3B%0A%09uint8_t%20bPortGpio%3B%0A%0A%09if((ePinFunc%20%3D%3D%20PH_DRIVER_PINFUNC_BIDIR)%20%7C%7C%20(pPinConfig%20%3D%3D%20NULL))%0A%09%7B%0A%09%09return%20PH_DRIVER_ERROR%20%7C%20PH_COMP_DRIVER%3B%0A%09%7D%0A%09%2F*%20Extract%20the%20Pin%2C%20Gpio%2C%20Port%20details%20from%20dwPinNumber%20*%2F%0A%09bPinNum%20%3D%20(uint8_t)(dwPinNumber%20%26amp%3B%200xFF)%3B%0A%09bPortGpio%20%3D%20(uint8_t)((dwPinNumber%20%26amp%3B%200xFF00)%26gt%3B%26gt%3B8)%3B%0A%0A%09sGpioConfig.pinDirection%20%3D%20(ePinFunc%20%3D%3D%20PH_DRIVER_PINFUNC_OUTPUT)%20%3F%20kGPIO_DigitalOutput%3AkGPIO_DigitalInput%3B%0A%09sGpioConfig.outputLogic%20%3D%20pPinConfig-%26gt%3BbOutputLogic%3B%0A%0A%09if(ePinFunc%20%3D%3D%20PH_DRIVER_PINFUNC_INTERRUPT)%0A%09%7B%0A%09%09gpio_interrupt_config_t%20intConfig%20%3D%20aInterruptTypes%5B(uint8_t)pPinConfig-%26gt%3BeInterruptConfig%5D%3B%0A%0A%09%09GPIO_GpioClearInterruptFlags((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2C%20bPinNum)%3B%0A%09%09GPIO_SetPinInterruptConfig((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2C%20bPinNum%2C%20intConfig)%3B%0A%09%09EnableIRQ(EINT_IRQn)%3B%0A%0A%09%09GPIO_PinInit((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2CbPinNum%2C%26amp%3BsGpioConfig)%3B%0A%09%7D%0A%09else%0A%09%7B%0A%09%09GPIO_PinInit((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2CbPinNum%2C%26amp%3BsGpioConfig)%3B%0A%09%7D%0A%0A%09return%20PH_DRIVER_SUCCESS%3B%0A%7D%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_1-1781202317214.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_1-1781202317214.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388749iA7DCD9E2E87474B4%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_1-1781202317214.png%22%20alt%3D%22Habib_MS_1-1781202317214.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Euint8_t%20phDriver_PinRead(uint32_t%20dwPinNumber%2C%20phDriver_Pin_Func_t%20ePinFunc)%0A%7B%0A%09uint8_t%20bValue%3B%0A%09uint32_t%20intStatus%3B%0A%09uint8_t%20bGpioNum%3B%0A%09uint8_t%20bPinNum%3B%0A%0A%09%2F*%20Extract%20the%20Pin%2C%20Gpio%20details%20from%20dwPinNumber%20*%2F%0A%09bPinNum%20%3D%20(uint8_t)(dwPinNumber%20%26amp%3B%200xFF)%3B%0A%09bGpioNum%20%3D%20(uint8_t)((dwPinNumber%20%26amp%3B%200xFF00)%26gt%3B%26gt%3B8)%3B%0A%0A%09if(ePinFunc%20%3D%3D%20PH_DRIVER_PINFUNC_INTERRUPT)%0A%09%7B%0A%09%09%2F*Get%20value%20of%20pin%20interrupt%20status*%2F%0A%09%09intStatus%20%3D%20GPIO_PinGetInterruptFlag((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2C%20bPinNum)%3B%0A%09%09bValue%20%3D%20intStatus%20%3F%201%3A0%3B%0A%09%7D%0A%09else%0A%09%7B%0A%09%09%2F*Read%20pin%20value*%2F%0A%09%09bValue%20%3D%20(uint8_t)GPIO_PinRead((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2C%20bPinNum)%3B%0A%09%7D%0A%09return%20bValue%3B%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3Euint8_t%20phDriver_PinRead(uint32_t%20dwPinNumber%2C%20phDriver_Pin_Func_t%20ePinFunc)%0A%7B%0A%09uint8_t%20bValue%3B%0A%09uint32_t%20intStatus%3B%0A%09uint8_t%20bGpioNum%3B%0A%09uint8_t%20bPinNum%3B%0A%0A%09%2F*%20Extract%20the%20Pin%2C%20Gpio%20details%20from%20dwPinNumber%20*%2F%0A%09bPinNum%20%3D%20(uint8_t)(dwPinNumber%20%26amp%3B%200xFF)%3B%0A%09bGpioNum%20%3D%20(uint8_t)((dwPinNumber%20%26amp%3B%200xFF00)%26gt%3B%26gt%3B8)%3B%0A%0A%09if(ePinFunc%20%3D%3D%20PH_DRIVER_PINFUNC_INTERRUPT)%0A%09%7B%0A%09%09%2F*Get%20value%20of%20pin%20interrupt%20status*%2F%0A%09%09intStatus%20%3D%20GPIO_PinGetInterruptFlag((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2C%20bPinNum)%3B%0A%09%09bValue%20%3D%20intStatus%20%3F%201%3A0%3B%0A%09%7D%0A%09else%0A%09%7B%0A%09%09%2F*Read%20pin%20value*%2F%0A%09%09bValue%20%3D%20(uint8_t)GPIO_PinRead((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2C%20bPinNum)%3B%0A%09%7D%0A%09return%20bValue%3B%0A%7D%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_3-1781202436423.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_3-1781202436423.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388751i89D1FA9D51CE8DAE%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_3-1781202436423.png%22%20alt%3D%22Habib_MS_3-1781202436423.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Evoid%20phDriver_PinWrite(uint32_t%20dwPinNumber%2C%20uint8_t%20bValue)%0A%7B%0A%09uint8_t%20bGpioNum%3B%0A%09uint8_t%20bPinNum%3B%0A%0A%09%2F*%20Extract%20the%20Pin%2C%20Gpio%20details%20from%20dwPinNumber%20*%2F%0A%09bPinNum%20%3D%20(uint8_t)(dwPinNumber%20%26amp%3B%200xFF)%3B%0A%09bGpioNum%20%3D%20(uint8_t)((dwPinNumber%20%26amp%3B%200xFF00)%26gt%3B%26gt%3B8)%3B%0A%0A%09GPIO_PinWrite((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2C%20bPinNum%2C%20bValue)%3B%0A%7D%0A%0Avoid%20phDriver_PinClearIntStatus(uint32_t%20dwPinNumber)%0A%7B%0A%09uint8_t%20bGpioNum%3B%0A%09uint8_t%20bPinNum%3B%0A%0A%09%2F*%20Extract%20the%20Pin%2C%20Gpio%20details%20from%20dwPinNumber%20*%2F%0A%09bPinNum%20%3D%20(uint8_t)(dwPinNumber%20%26amp%3B%200xFF)%3B%0A%09bGpioNum%20%3D%20(uint8_t)((dwPinNumber%20%26amp%3B%200xFF00)%26gt%3B%26gt%3B8)%3B%0A%0A%09%2F*Clear%20interrupt%20flag*%2F%0A%09GPIO_GpioClearInterruptFlags((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2C%20(1U%20%26lt%3B%26lt%3B%20bPinNum))%3B%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3Evoid%20phDriver_PinWrite(uint32_t%20dwPinNumber%2C%20uint8_t%20bValue)%0A%7B%0A%09uint8_t%20bGpioNum%3B%0A%09uint8_t%20bPinNum%3B%0A%0A%09%2F*%20Extract%20the%20Pin%2C%20Gpio%20details%20from%20dwPinNumber%20*%2F%0A%09bPinNum%20%3D%20(uint8_t)(dwPinNumber%20%26amp%3B%200xFF)%3B%0A%09bGpioNum%20%3D%20(uint8_t)((dwPinNumber%20%26amp%3B%200xFF00)%26gt%3B%26gt%3B8)%3B%0A%0A%09GPIO_PinWrite((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2C%20bPinNum%2C%20bValue)%3B%0A%7D%0A%0Avoid%20phDriver_PinClearIntStatus(uint32_t%20dwPinNumber)%0A%7B%0A%09uint8_t%20bGpioNum%3B%0A%09uint8_t%20bPinNum%3B%0A%0A%09%2F*%20Extract%20the%20Pin%2C%20Gpio%20details%20from%20dwPinNumber%20*%2F%0A%09bPinNum%20%3D%20(uint8_t)(dwPinNumber%20%26amp%3B%200xFF)%3B%0A%09bGpioNum%20%3D%20(uint8_t)((dwPinNumber%20%26amp%3B%200xFF00)%26gt%3B%26gt%3B8)%3B%0A%0A%09%2F*Clear%20interrupt%20flag*%2F%0A%09GPIO_GpioClearInterruptFlags((GPIO_Type%20*)pGpiosBaseAddr%5BGPIO_PORT%5D%2C%20(1U%20%26lt%3B%26lt%3B%20bPinNum))%3B%0A%7D%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EIt%20is%20also%20necessary%20to%20add%20functions%20required%20for%20the%20library%20to%20function%20correctly.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_4-1781202506101.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_4-1781202506101.png%22%20style%3D%22width%3A%20914px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388752i7CFB270A2CE54EA0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_4-1781202506101.png%22%20alt%3D%22Habib_MS_4-1781202506101.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Evoid%20phDriver_EnterCriticalSection(void)%0A%7B%0A%20%20%20%20NVIC_DisableIRQ(EINT_IRQn)%3B%0A%7D%0A%0Avoid%20phDriver_ExitCriticalSection(void)%0A%7B%0A%09NVIC_EnableIRQ(EINT_IRQn)%3B%0A%7D%0A%0AphStatus_t%20phDriver_IRQPinRead(uint32_t%20dwPinNumber)%0A%7B%0A%09phStatus_t%20bGpioVal%20%3D%20false%3B%0A%0A%09bGpioVal%20%3D%20phDriver_PinRead(dwPinNumber%2C%20PH_DRIVER_PINFUNC_INPUT)%3B%0A%0A%09return%20bGpioVal%3B%0A%7D%0AphStatus_t%20phDriver_IRQPinPoll(uint32_t%20dwPinNumber%2C%20phDriver_Pin_Func_t%20ePinFunc%2C%20phDriver_Interrupt_Config_t%20eInterruptType)%0A%7B%0A%20%20%20%20uint8_t%20%20%20%20bGpioState%20%3D%200%3B%0A%0A%20%20%20%20if%20((eInterruptType%20!%3D%20PH_DRIVER_INTERRUPT_RISINGEDGE)%20%26amp%3B%26amp%3B%20(eInterruptType%20!%3D%20PH_DRIVER_INTERRUPT_FALLINGEDGE))%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20return%20PH_DRIVER_ERROR%20%7C%20PH_COMP_DRIVER%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20if%20(eInterruptType%20%3D%3D%20PH_DRIVER_INTERRUPT_FALLINGEDGE)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20bGpioState%20%3D%201%3B%0A%20%20%20%20%7D%0A%0A%09while(phDriver_PinRead(dwPinNumber%2C%20ePinFunc)%20%3D%3D%20bGpioState)%3B%0A%0A%20%20%20%20return%20PH_DRIVER_SUCCESS%3B%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3Evoid%20phDriver_EnterCriticalSection(void)%0A%7B%0A%20%20%20%20NVIC_DisableIRQ(EINT_IRQn)%3B%0A%7D%0A%0Avoid%20phDriver_ExitCriticalSection(void)%0A%7B%0A%09NVIC_EnableIRQ(EINT_IRQn)%3B%0A%7D%0A%0AphStatus_t%20phDriver_IRQPinRead(uint32_t%20dwPinNumber)%0A%7B%0A%09phStatus_t%20bGpioVal%20%3D%20false%3B%0A%0A%09bGpioVal%20%3D%20phDriver_PinRead(dwPinNumber%2C%20PH_DRIVER_PINFUNC_INPUT)%3B%0A%0A%09return%20bGpioVal%3B%0A%7D%0AphStatus_t%20phDriver_IRQPinPoll(uint32_t%20dwPinNumber%2C%20phDriver_Pin_Func_t%20ePinFunc%2C%20phDriver_Interrupt_Config_t%20eInterruptType)%0A%7B%0A%20%20%20%20uint8_t%20%20%20%20bGpioState%20%3D%200%3B%0A%0A%20%20%20%20if%20((eInterruptType%20!%3D%20PH_DRIVER_INTERRUPT_RISINGEDGE)%20%26amp%3B%26amp%3B%20(eInterruptType%20!%3D%20PH_DRIVER_INTERRUPT_FALLINGEDGE))%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20return%20PH_DRIVER_ERROR%20%7C%20PH_COMP_DRIVER%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20if%20(eInterruptType%20%3D%3D%20PH_DRIVER_INTERRUPT_FALLINGEDGE)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20bGpioState%20%3D%201%3B%0A%20%20%20%20%7D%0A%0A%09while(phDriver_PinRead(dwPinNumber%2C%20ePinFunc)%20%3D%3D%20bGpioState)%3B%0A%0A%20%20%20%20return%20PH_DRIVER_SUCCESS%3B%0A%7D%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EFinally%2C%20here%2C%20we%20will%20have%20the%20definition%20of%20the%20timer%20interrupt%20handler%20and%20ISR%20callback.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_5-1781202601491.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_5-1781202601491.png%22%20style%3D%22width%3A%20884px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388753iA8D78823BA2FE127%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_5-1781202601491.png%22%20alt%3D%22Habib_MS_5-1781202601491.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Evoid%20CTIMER0_IRQHandler(void)%0A%7B%0A%09%2F*%20Clear%20interrupt%20flag.*%2F%0A%09CTIMER_ClearStatusFlags(PH_DRIVER_SDK_CTIMER%2C%20kCTIMER_Match0Flag%7CkCTIMER_Capture0Flag)%3B%0A%09%2F*%20Single%20shot%20timer.%20Stop%20it.%20*%2F%0A%09CTIMER_StopTimer(PH_DRIVER_SDK_CTIMER)%3B%0A%09CTIMER_DisableInterrupts(PH_DRIVER_SDK_CTIMER%2C%20kCTIMER_Match0InterruptEnable%7CkCTIMER_Capture0InterruptEnable)%3B%0A%09pCTimerCallBack()%3B%0A%0A%09ctimerIsrFlag%20%3D%20true%3B%0A%7D%0A%0Astatic%20void%20phDriver_CTimerIsrCallBack(void)%0A%7B%0A%09dwTimerExp%20%3D%201%3B%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3Evoid%20CTIMER0_IRQHandler(void)%0A%7B%0A%09%2F*%20Clear%20interrupt%20flag.*%2F%0A%09CTIMER_ClearStatusFlags(PH_DRIVER_SDK_CTIMER%2C%20kCTIMER_Match0Flag%7CkCTIMER_Capture0Flag)%3B%0A%09%2F*%20Single%20shot%20timer.%20Stop%20it.%20*%2F%0A%09CTIMER_StopTimer(PH_DRIVER_SDK_CTIMER)%3B%0A%09CTIMER_DisableInterrupts(PH_DRIVER_SDK_CTIMER%2C%20kCTIMER_Match0InterruptEnable%7CkCTIMER_Capture0InterruptEnable)%3B%0A%09pCTimerCallBack()%3B%0A%0A%09ctimerIsrFlag%20%3D%20true%3B%0A%7D%0A%0Astatic%20void%20phDriver_CTimerIsrCallBack(void)%0A%7B%0A%09dwTimerExp%20%3D%201%3B%0A%7D%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EWith%20these%20additions%2C%20we%20have%20all%20the%20functions%20needed%20(based%20on%20the%20FRDM-MCXN947%20SDK)%20by%20the%20library%20to%20communicate%20with%20the%20PN5190.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1811580014%22%20id%3D%22toc-hId--1810927436%22%3EBoardSelection.h%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3EIn%20this%20header%20file%2C%20which%20is%20found%20at%20%E2%80%9CDAL%20%26gt%3B%20cfg%E2%80%9D%20we%20will%20add%20the%20definition%20set%20in%20the%20preprocessor%20settings%20to%20use%20the%20FRDM-MCXN947%20board%20as%20host%20by%20adding%20the%20following%20lines%20to%20the%20file%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_6-1781202691439.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_6-1781202691439.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388754iFD21AB77A7757886%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_6-1781202691439.png%22%20alt%3D%22Habib_MS_6-1781202691439.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%23ifdef%20PHDRIVER_FRDMMCXN947_PN5190_BOARD%0A%23%20%20%20%20include%20%3CBOARD_FRDM_MCXN947_PN5190.H%3E%0A%23endif%0A%3C%2FBOARD_FRDM_MCXN947_PN5190.H%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%23ifdef%20PHDRIVER_FRDMMCXN947_PN5190_BOARD%0A%23%20%20%20%20include%20%3CBOARD_FRDM_MCXN947_PN5190.H%3E%0A%23endif%0A%3C%2FBOARD_FRDM_MCXN947_PN5190.H%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CH3%20id%3D%22toc-hId-675932819%22%20id%3D%22toc-hId-676585397%22%3Eph_NxpBuild_App.h%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3EIn%20this%20header%20found%20at%20%E2%80%9Cintfs%E2%80%9D%20folder%2C%20we%20will%20add%20our%20board%20support%20to%20use%20it%20with%20the%20PN5190%20by%20adding%20the%20following%20change%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_7-1781202815632.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_7-1781202815632.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388755iD0DD061D8B845187%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_7-1781202815632.png%22%20alt%3D%22Habib_MS_7-1781202815632.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%23if%20defined(PHDRIVER_LPC1769PN5190_BOARD)%20%5C%0A%20%20%20%20%7C%7C%20defined(PHDRIVER_K82F_PNEV5190B_BOARD)%5C%0A%09%7C%7C%20defined(PHDRIVER_FRDMMCXN947_PN5190_BOARD)%0A%23%20%20%20define%20NXPBUILD__PHHAL_HW_PN5190%0A%23endif%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%23if%20defined(PHDRIVER_LPC1769PN5190_BOARD)%20%5C%0A%20%20%20%20%7C%7C%20defined(PHDRIVER_K82F_PNEV5190B_BOARD)%5C%0A%09%7C%7C%20defined(PHDRIVER_FRDMMCXN947_PN5190_BOARD)%0A%23%20%20%20define%20NXPBUILD__PHHAL_HW_PN5190%0A%23endif%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CH3%20id%3D%22toc-hId--1131521644%22%20id%3D%22toc-hId--1130869066%22%3EphApp_Init.h%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3EIn%20this%20header%20located%20at%20%E2%80%9Cintfs%E2%80%9D%20folder%20we%20will%20add%20the%20required%20include%20files%20for%20the%20initialization%20of%20our%20board%20and%20enable%20the%20correct%20debug%20interface.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_8-1781202847396.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_8-1781202847396.png%22%20style%3D%22width%3A%20866px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388756i696144B0F811428A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_8-1781202847396.png%22%20alt%3D%22Habib_MS_8-1781202847396.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%2F*Check%20for%20MCXN%20controller%20based%20boards*%2F%0A%23if%20defined%20(PHDRIVER_FRDMMCXN947_PN5190_BOARD)%0A%23define%20PHDRIVER_FRDM_MCXN947%0A%23endif%0A%23ifdef%20PHDRIVER_FRDM_MCXN947%0A%23include%20%3CFSL_DEBUG_CONSOLE.H%3E%0A%23include%20%3CSTDIO.H%3E%0A%23include%20%3CFSL_GPIO.H%3E%0A%23include%20%3CFSL_CTIMER.H%3E%0A%23include%20%3CFSL_CLOCK.H%3E%0A%23include%20%3CFSL_LPSPI.H%3E%0A%23endif%0A%3C%2FFSL_LPSPI.H%3E%3C%2FFSL_CLOCK.H%3E%3C%2FFSL_CTIMER.H%3E%3C%2FFSL_GPIO.H%3E%3C%2FSTDIO.H%3E%3C%2FFSL_DEBUG_CONSOLE.H%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CBR%20%2F%3EPlease%20replace%20this%20line.%3C%2FP%3E%0A%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%2F*Check%20for%20MCXN%20controller%20based%20boards*%2F%0A%23if%20defined%20(PHDRIVER_FRDMMCXN947_PN5190_BOARD)%0A%23define%20PHDRIVER_FRDM_MCXN947%0A%23endif%0A%23ifdef%20PHDRIVER_FRDM_MCXN947%0A%23include%20%3CFSL_DEBUG_CONSOLE.H%3E%0A%23include%20%3CSTDIO.H%3E%0A%23include%20%3CFSL_GPIO.H%3E%0A%23include%20%3CFSL_CTIMER.H%3E%0A%23include%20%3CFSL_CLOCK.H%3E%0A%23include%20%3CFSL_LPSPI.H%3E%0A%23endif%0A%0APlease%20replace%20this%20line.%0A%3C%2FFSL_LPSPI.H%3E%3C%2FFSL_CLOCK.H%3E%3C%2FFSL_CTIMER.H%3E%3C%2FFSL_GPIO.H%3E%3C%2FSTDIO.H%3E%3C%2FFSL_DEBUG_CONSOLE.H%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%0A%3CBR%20%2F%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%23if%20defined(PHDRIVER_KINETIS_K82)%7C%7C%20defined(PHDRIVER_FRDM_MCXN947)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%0A%26nbsp%3B%0A%23if%20defined(PHDRIVER_KINETIS_K82)%7C%7C%20defined(PHDRIVER_FRDM_MCXN947)%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CH3%20id%3D%22toc-hId-1355991189%22%20id%3D%22toc-hId-1356643767%22%3EphApp_Init.c%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3EFinally%2C%20in%20this%20source%20file%20we%20will%20add%20the%20initialization%20code%20for%20the%20MCXN947%20to%20complement%20the%20initialization%20macros%20defined%20in%20the%20previous%20phApp_Init.h%20file%20modification.%20Here%20we%20will%20call%20functions%20to%20initialize%20clocks%20and%20UART%20pins.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1781205399694.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1781205399694.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388760i5B2650FF10896E0B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1781205399694.png%22%20alt%3D%22Habib_MS_0-1781205399694.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%23ifdef%20PHDRIVER_FRDM_MCXN947%0A%23include%20%22fsl_common.h%22%0A%23include%20%22pin_mux.h%22%0A%23include%20%22clock_config.h%22%0A%23include%20%22board.h%22%0Astatic%20void%20phApp_MCXN947_Init(void)%7B%0A%09BOARD_InitBootPins()%3B%0A%09BOARD_InitBootClocks()%3B%0A%09BOARD_InitDebugConsole()%3B%0A%7D%0A%23endif%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%23ifdef%20PHDRIVER_FRDM_MCXN947%0A%23include%20%22fsl_common.h%22%0A%23include%20%22pin_mux.h%22%0A%23include%20%22clock_config.h%22%0A%23include%20%22board.h%22%0Astatic%20void%20phApp_MCXN947_Init(void)%7B%0A%09BOARD_InitBootPins()%3B%0A%09BOARD_InitBootClocks()%3B%0A%09BOARD_InitDebugConsole()%3B%0A%7D%0A%23endif%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CBR%20%2F%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%23elif%20defined(PHDRIVER_FRDM_MCXN947)%0A%20%20%20%20phApp_MCXN947_Init()%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%23elif%20defined(PHDRIVER_FRDM_MCXN947)%0A%20%20%20%20phApp_MCXN947_Init()%3B%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EThese%20functions%20are%20used%20to%20initialize%20the%20correspondent%20clocks%20of%20each%20peripheral%20such%20as%20CTIMER%2C%20the%20input%20pins%20multiplexor%20for%20selecting%20GPIO%20functionality%20and%20FLEXCOMM%20for%20SPI.%20In%20here%20we%20also%20set%20the%20GPIO%20functionality%20for%20pins%20P0_31%20and%20P0_28%20(IRQ%20and%20RESET)%2C%20as%20well%20as%20UART3%20for%20printing%20the%20tag%20information%20on%20the%20serial%20port%20connected%20to%20the%20computer.%3C%2FP%3E%0A%3CP%3EAdditionally%2C%20we%20need%20to%20set%20the%20NVIC%20priority%20to%20ensure%20that%20interrupts%20can%20occur.%20Add%20the%20NVIC_SetPriority()%20function%20to%20phApp_Configure_IRQ().%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_1-1781205512787.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_1-1781205512787.png%22%20style%3D%22width%3A%20806px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388761iF5AE07010A7131E0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_1-1781205512787.png%22%20alt%3D%22Habib_MS_1-1781205512787.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%23ifdef%20PH_PLATFORM_HAS_ICFRONTEND%0A%23if%20!(defined(PH_OSAL_LINUX)%20%26amp%3B%26amp%3B%20defined(NXPBUILD__PHHAL_HW_PN5190))%0A%20%20%20%20phDriver_Pin_Config_t%20pinCfg%3B%0A%20%20%20%20NVIC_SetPriority(EINT_IRQn%2C%20EINT_PRIORITY)%3B%0A%20%20%20%20pinCfg.bOutputLogic%20%3D%20PH_DRIVER_SET_LOW%3B%0A%20%20%20%20pinCfg.bPullSelect%20%3D%20PHDRIVER_PIN_IRQ_PULL_CFG%3B%0A%0A%20%20%20%20pinCfg.eInterruptConfig%20%3D%20PIN_IRQ_TRIGGER_TYPE%3B%0A%20%20%20%20phDriver_PinConfig(PHDRIVER_PIN_IRQ%2C%20PH_DRIVER_PINFUNC_INTERRUPT%2C%20%26amp%3BpinCfg)%3B%0A%0A%23endif%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%23ifdef%20PH_PLATFORM_HAS_ICFRONTEND%0A%23if%20!(defined(PH_OSAL_LINUX)%20%26amp%3B%26amp%3B%20defined(NXPBUILD__PHHAL_HW_PN5190))%0A%20%20%20%20phDriver_Pin_Config_t%20pinCfg%3B%0A%20%20%20%20NVIC_SetPriority(EINT_IRQn%2C%20EINT_PRIORITY)%3B%0A%20%20%20%20pinCfg.bOutputLogic%20%3D%20PH_DRIVER_SET_LOW%3B%0A%20%20%20%20pinCfg.bPullSelect%20%3D%20PHDRIVER_PIN_IRQ_PULL_CFG%3B%0A%0A%20%20%20%20pinCfg.eInterruptConfig%20%3D%20PIN_IRQ_TRIGGER_TYPE%3B%0A%20%20%20%20phDriver_PinConfig(PHDRIVER_PIN_IRQ%2C%20PH_DRIVER_PINFUNC_INTERRUPT%2C%20%26amp%3BpinCfg)%3B%0A%0A%23endif%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CH3%20id%3D%22toc-hId-246698667%22%20id%3D%22toc-hId-247351245%22%3Epin_mux.c%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3EInside%20the%20function%20%E2%80%9CBOARD_InitBootPins()%E2%80%9D%20which%20is%20defined%20in%20board%20-%26gt%3B%20pin_mux.c%20file%2C%20the%20following%20initializations%20need%20to%20be%20added%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_3-1781205793803.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_3-1781205793803.png%22%20style%3D%22width%3A%20702px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388763i5B7ACF345A759ACC%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_3-1781205793803.png%22%20alt%3D%22Habib_MS_3-1781205793803.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Evoid%20BOARD_InitBootPins(void)%0A%7B%0A%20%20%20%20%2F*%20Use%20FRO%20HF%20clock%20for%20some%20of%20the%20Ctimers%20*%2F%0A%20%20%20%20CLOCK_SetClkDiv(kCLOCK_DivCtimer0Clk%2C%201u)%3B%0A%20%20%20%20CLOCK_AttachClk(kFRO_HF_to_CTIMER0)%3B%0A%0A%20%20%20%20CLOCK_EnableClock(kCLOCK_Gpio0)%3B%0A%20%20%20%20CLOCK_EnableClock(kCLOCK_Gpio1)%3B%0A%20%20%20%20BOARD_InitPins()%3B%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3Evoid%20BOARD_InitBootPins(void)%0A%7B%0A%20%20%20%20%2F*%20Use%20FRO%20HF%20clock%20for%20some%20of%20the%20Ctimers%20*%2F%0A%20%20%20%20CLOCK_SetClkDiv(kCLOCK_DivCtimer0Clk%2C%201u)%3B%0A%20%20%20%20CLOCK_AttachClk(kFRO_HF_to_CTIMER0)%3B%0A%0A%20%20%20%20CLOCK_EnableClock(kCLOCK_Gpio0)%3B%0A%20%20%20%20CLOCK_EnableClock(kCLOCK_Gpio1)%3B%0A%20%20%20%20BOARD_InitPins()%3B%0A%7D%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EAdditionally%2C%20within%20the%20%E2%80%9CBOARD_InitPins()%E2%80%9D%20function%20available%20in%20the%20same%20file%2C%20we%20will%20replace%20the%20initializations%20of%20the%20GPIO%20and%20UART%20pins.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_4-1781205847058.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_4-1781205847058.png%22%20style%3D%22width%3A%20715px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388764i85E62525A38B82D7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_4-1781205847058.png%22%20alt%3D%22Habib_MS_4-1781205847058.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_5-1781205872354.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_5-1781205872354.png%22%20style%3D%22width%3A%20704px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388765i5E9AE3784306C5BF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_5-1781205872354.png%22%20alt%3D%22Habib_MS_5-1781205872354.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_6-1781205919494.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_6-1781205919494.png%22%20style%3D%22width%3A%20690px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388766iA804BE8BD80E0A73%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_6-1781205919494.png%22%20alt%3D%22Habib_MS_6-1781205919494.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Evoid%20BOARD_InitPins(void)%0A%7B%0A%20%20%20%20%2F*%20Enables%20the%20clock%20for%20PORT0%20controller%3A%20Enables%20clock%20*%2F%0A%20%20%20%20CLOCK_EnableClock(kCLOCK_Port0)%3B%0A%20%20%20%20%2F*%20Enables%20the%20clock%20for%20PORT1%3A%20Enables%20clock%20*%2F%0A%20%20%20%20CLOCK_EnableClock(kCLOCK_Port1)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port0_19_config%20%3D%20%7B%2F*%20Internal%20pull-up%2Fdown%20resistor%20is%20disabled%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PullDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Low%20internal%20pull%20resistor%20value%20is%20selected.%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Fast%20slew%20rate%20is%20configured%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Passive%20input%20filter%20is%20disabled%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Open%20drain%20output%20is%20disabled%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Low%20drive%20strength%20is%20configured%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt0%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Digital%20input%20enabled%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Digital%20input%20is%20not%20inverted%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20Control%20Register%20fields%20%5B15%3A0%5D%20are%20not%20locked%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_10%20(pin%20B12)%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2019U%2C%20%26amp%3Bport0_19_config)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port1_0_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PullDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt0%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_10%20(pin%20B12)%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT1%2C%200U%2C%20%26amp%3Bport1_0_config)%3B%0A%20%20%20%20const%20port_pin_config_t%20port1_1_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PullDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt0%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_10%20(pin%20B12)%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT1%2C%201U%2C%20%26amp%3Bport1_1_config)%3B%0A%20%20%20%20const%20port_pin_config_t%20port0_31_pinB12_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PullDown%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt0%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_10%20(pin%20B12)%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2031U%2C%20%26amp%3Bport0_31_pinB12_config)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port0_28_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PullDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20PIO0_6%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt0%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_6%20(pin%20C14)%20is%20configured%20as%20PIO0_6%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2028U%2C%20%26amp%3Bport0_28_config)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port0_2_pinB16_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.pullSelect%20%3D%20kPORT_PullDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.pullValueSelect%20%3D%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.slewRate%20%3D%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.passiveFilterEnable%20%3D%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.openDrainEnable%20%3D%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.driveStrength%20%3D%20kPORT_HighDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20SWO%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.mux%20%3D%20kPORT_MuxAlt1%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.inputBuffer%20%3D%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.invertInput%20%3D%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.lockRegister%20%3D%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_2%20(pin%20B16)%20is%20configured%20as%20SWO%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%202U%2C%20%26amp%3Bport0_2_pinB16_config)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port1_8_pinA1_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.pullSelect%20%3D%20kPORT_PullUp%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.pullValueSelect%20%3D%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.slewRate%20%3D%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.passiveFilterEnable%20%3D%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.openDrainEnable%20%3D%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.driveStrength%20%3D%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20FC4_P0%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.mux%20%3D%20kPORT_MuxAlt2%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.inputBuffer%20%3D%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.invertInput%20%3D%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.lockRegister%20%3D%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT1_8%20(pin%20A1)%20is%20configured%20as%20FC4_P0%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT1%2C%208U%2C%20%26amp%3Bport1_8_pinA1_config)%3B%0A%20%20%20const%20port_pin_config_t%20port1_9_pinB1_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.pullSelect%20%3D%20kPORT_PullDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.pullValueSelect%20%3D%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.slewRate%20%3D%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.passiveFilterEnable%20%3D%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.openDrainEnable%20%3D%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.driveStrength%20%3D%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20FC4_P1%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.mux%20%3D%20kPORT_MuxAlt2%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.inputBuffer%20%3D%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.invertInput%20%3D%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.lockRegister%20%3D%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT1_9%20(pin%20B1)%20is%20configured%20as%20FC4_P1%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT1%2C%209U%2C%20%26amp%3Bport1_9_pinB1_config)%3B%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3Evoid%20BOARD_InitPins(void)%0A%7B%0A%20%20%20%20%2F*%20Enables%20the%20clock%20for%20PORT0%20controller%3A%20Enables%20clock%20*%2F%0A%20%20%20%20CLOCK_EnableClock(kCLOCK_Port0)%3B%0A%20%20%20%20%2F*%20Enables%20the%20clock%20for%20PORT1%3A%20Enables%20clock%20*%2F%0A%20%20%20%20CLOCK_EnableClock(kCLOCK_Port1)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port0_19_config%20%3D%20%7B%2F*%20Internal%20pull-up%2Fdown%20resistor%20is%20disabled%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PullDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Low%20internal%20pull%20resistor%20value%20is%20selected.%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Fast%20slew%20rate%20is%20configured%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Passive%20input%20filter%20is%20disabled%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Open%20drain%20output%20is%20disabled%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Low%20drive%20strength%20is%20configured%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt0%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Digital%20input%20enabled%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Digital%20input%20is%20not%20inverted%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20Control%20Register%20fields%20%5B15%3A0%5D%20are%20not%20locked%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_10%20(pin%20B12)%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2019U%2C%20%26amp%3Bport0_19_config)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port1_0_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PullDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt0%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_10%20(pin%20B12)%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT1%2C%200U%2C%20%26amp%3Bport1_0_config)%3B%0A%20%20%20%20const%20port_pin_config_t%20port1_1_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PullDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt0%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_10%20(pin%20B12)%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT1%2C%201U%2C%20%26amp%3Bport1_1_config)%3B%0A%20%20%20%20const%20port_pin_config_t%20port0_31_pinB12_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PullDown%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt0%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_10%20(pin%20B12)%20is%20configured%20as%20PIO0_10%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2031U%2C%20%26amp%3Bport0_31_pinB12_config)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port0_28_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PullDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20PIO0_6%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_MuxAlt0%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_6%20(pin%20C14)%20is%20configured%20as%20PIO0_6%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%2028U%2C%20%26amp%3Bport0_28_config)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port0_2_pinB16_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.pullSelect%20%3D%20kPORT_PullDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.pullValueSelect%20%3D%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.slewRate%20%3D%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.passiveFilterEnable%20%3D%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.openDrainEnable%20%3D%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.driveStrength%20%3D%20kPORT_HighDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20SWO%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.mux%20%3D%20kPORT_MuxAlt1%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.inputBuffer%20%3D%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.invertInput%20%3D%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.lockRegister%20%3D%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT0_2%20(pin%20B16)%20is%20configured%20as%20SWO%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT0%2C%202U%2C%20%26amp%3Bport0_2_pinB16_config)%3B%0A%0A%20%20%20%20const%20port_pin_config_t%20port1_8_pinA1_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.pullSelect%20%3D%20kPORT_PullUp%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.pullValueSelect%20%3D%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.slewRate%20%3D%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.passiveFilterEnable%20%3D%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.openDrainEnable%20%3D%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.driveStrength%20%3D%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20FC4_P0%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.mux%20%3D%20kPORT_MuxAlt2%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.inputBuffer%20%3D%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.invertInput%20%3D%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.lockRegister%20%3D%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT1_8%20(pin%20A1)%20is%20configured%20as%20FC4_P0%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT1%2C%208U%2C%20%26amp%3Bport1_8_pinA1_config)%3B%0A%20%20%20const%20port_pin_config_t%20port1_9_pinB1_config%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.pullSelect%20%3D%20kPORT_PullDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.pullValueSelect%20%3D%20kPORT_LowPullResistor%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.slewRate%20%3D%20kPORT_FastSlewRate%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.passiveFilterEnable%20%3D%20kPORT_PassiveFilterDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.openDrainEnable%20%3D%20kPORT_OpenDrainDisable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.driveStrength%20%3D%20kPORT_LowDriveStrength%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pin%20is%20configured%20as%20FC4_P1%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.mux%20%3D%20kPORT_MuxAlt2%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.inputBuffer%20%3D%20kPORT_InputBufferEnable%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.invertInput%20%3D%20kPORT_InputNormal%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.lockRegister%20%3D%20kPORT_UnlockRegister%7D%3B%0A%20%20%20%20%2F*%20PORT1_9%20(pin%20B1)%20is%20configured%20as%20FC4_P1%20*%2F%0A%20%20%20%20PORT_SetPinConfig(PORT1%2C%209U%2C%20%26amp%3Bport1_9_pinB1_config)%3B%0A%7D%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3EAt%20the%20same%20time%2C%20add%20the%20following%20includes%20to%20the%20file%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1781207973118.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1781207973118.png%22%20style%3D%22width%3A%20475px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388769i93189C2F35CC0A79%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1781207973118.png%22%20alt%3D%22Habib_MS_0-1781207973118.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%23include%20%22fsl_common.h%22%0A%23include%20%22fsl_port.h%22%0A%23include%20%22board.h%22%0A%23include%20%22clock_config.h%22%0A%23include%20%22pin_mux.h%22%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%23include%20%22fsl_common.h%22%0A%23include%20%22fsl_port.h%22%0A%23include%20%22board.h%22%0A%23include%20%22clock_config.h%22%0A%23include%20%22pin_mux.h%22%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CH3%20id%3D%22toc-hId--1560755796%22%20id%3D%22toc-hId--1560103218%22%3EAdding%20include%20paths%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3ESince%20we%20are%20including%20header%20files%20into%20the%20project%2C%20we%20must%20specify%20which%20directories%20to%20search%20in%20order%20to%20find%20the%20required%20files.%20To%20do%20this%3A%3C%2FP%3E%0A%3CP%3E1.%20Open%20project%20properties%20(right-click%20on%20project%20%26gt%3B%20Properties).%3C%2FP%3E%0A%3CP%3E2.Click%20on%20the%20drop%20menu%20%E2%80%9CC%2FC%2B%2B%20Build%E2%80%9D%2C%20then%20%E2%80%9CSettings%E2%80%9D.%3C%2FP%3E%0A%3CP%3E3.Click%20on%20%E2%80%9CIncludes%E2%80%9D%20option.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_1-1781208012765.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_1-1781208012765.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388770iC7170D3C00726892%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_1-1781208012765.png%22%20alt%3D%22Habib_MS_1-1781208012765.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E4.Click%20on%20the%20%E2%80%9CAdd..%E2%80%9D%20button%20at%20the%20top%20right%20corner%20of%20the%20%E2%80%9CInclude%20paths%20(-l)%E2%80%9D%20menu.%3C%2FP%3E%0A%3CP%3E5.%20Click%20on%20%E2%80%9CWorkspace%E2%80%A6%E2%80%9D%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_2-1781208068003.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_2-1781208068003.png%22%20style%3D%22width%3A%20716px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388771i8FB673F0C1C8F9B1%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_2-1781208068003.png%22%20alt%3D%22Habib_MS_2-1781208068003.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E6.%20Add%20the%20following%20highlighted%20directories%20from%20FRDM-MCXN%20project%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_3-1781208097487.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_3-1781208097487.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388772iA667CC8B3C5662E1%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_3-1781208097487.png%22%20alt%3D%22Habib_MS_3-1781208097487.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E7.%20Accept%20the%20changes%20and%20click%20on%20%E2%80%9CApply%20and%20Close%E2%80%9D.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-926757037%22%20id%3D%22toc-hId-927409615%22%3EAdd%20%E2%80%9Croot%20folder%E2%80%9D%20to%20source%20location%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3E1.Open%20project%20properties.%3C%2FP%3E%0A%3CP%3E2.%20Click%20on%20the%20drop%20menu%20%E2%80%9CC%2FC%2B%2B%20General%E2%80%9D%2C%20then%20%E2%80%9CPaths%20and%20Symbols%E2%80%9D.%3C%2FP%3E%0A%3CP%3E3.%20Click%20on%20the%20%E2%80%9CSource%20Location%E2%80%9D%20tab.%3C%2FP%3E%0A%3CP%3E4.Click%20on%20%E2%80%9CAdd%20Folder%E2%80%A6%E2%80%9D%20and%20add%20the%20%E2%80%9C%3CROOT%20folder%3D%22%22%3E%E2%80%9D.%3C%2FROOT%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_4-1781208199983.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_4-1781208199983.png%22%20style%3D%22width%3A%20760px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388773iA4EC1D5BE4265E3C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_4-1781208199983.png%22%20alt%3D%22Habib_MS_4-1781208199983.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--880697426%22%20id%3D%22toc-hId--880044848%22%3EDelete%20phOsal%20files%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3EWe%20must%20delete%20from%20the%20path%20%E2%80%9CphOsal%20%26gt%3B%20src%20%26gt%3B%20NullOs%20%26gt%3B%20portable%E2%80%9D%20the%20files%3A%20%E2%80%9CphOsal_Port_CM3.c%E2%80%9D%2C%E2%80%9CphOsal_Port_PN76xx.c%E2%80%9D%20and%20%E2%80%9CphOsal_Port_PN74xxxx.c%E2%80%9D.%20This%20has%20the%20purpose%20of%20avoiding%20any%20multiple%20definition%20errors%20when%20compiling%20the%20final%20project.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1606815407%22%20id%3D%22toc-hId-1607467985%22%3EAdd%20_DSB%20and%20_ISB%20support%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3EAs%20final%20modification%20step%2C%20please%20include%20in%20NxpNfcRdLib-%26gt%3Bcomps-%26gt%3BphhalHw-%26gt%3Bsrc-%26gt%3BPN5190-%26gt%3B%20phhalHw_Pn5190_Int.c%20the%20%26nbsp%3B%E2%80%9Ccmsis_gcc.h%E2%80%9D%20to%20support%20of%20_DSB%20and%20_ISB%20functions.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_5-1781208264265.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_5-1781208264265.png%22%20style%3D%22width%3A%20584px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388774i6698D1A69C7036BE%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_5-1781208264265.png%22%20alt%3D%22Habib_MS_5-1781208264265.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--200639056%22%20id%3D%22toc-hId--199986478%22%3ETesting%20Final%20Project%20Without%20OS%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3EAfter%20making%20all%20the%20previous%20changes%20and%20modifications%2C%20the%20migration%20is%20now%20complete%2C%20and%20we%20can%20proceed%20to%20compile%20and%20flash%20the%20example%20to%20MCXN947.%3C%2FP%3E%0A%3CP%3EPlease%20%E2%80%9Cclean%E2%80%9D%20the%20project%20before%20building%20by%20right%20clicking%20on%20the%20project%20as%20follows%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_6-1781208329457.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_6-1781208329457.png%22%20style%3D%22width%3A%20382px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388775i15288D682ADE15B2%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_6-1781208329457.png%22%20alt%3D%22Habib_MS_6-1781208329457.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ETo%20run%20the%20project%2C%20we%20will%20need%20a%20serial%20terminal%20like%20Tera%20Term%20with%20the%20following%20settings%3A%3C%2FP%3E%0A%3CP%3E-%20115200%20baud%20rate.%3C%2FP%3E%0A%3CP%3E-%208%20data%20bits.%3C%2FP%3E%0A%3CP%3E-%20No%20parity.%3C%2FP%3E%0A%3CP%3E-%20One%20stop%20bit%2C%3C%2FP%3E%0A%3CP%3E-%20No%20flow%20control.%3C%2FP%3E%0A%3CP%3EOnce%20the%20program%20is%20flashed%20and%20the%20serial%20terminal%20configured%2C%20we%20can%20reset%20the%20board%20and%20power%20the%20PNEV5190BP.%20You%20should%20see%20an%20output%20similar%20to%20the%20following%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_7-1781208358485.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_7-1781208358485.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388776i6B95B0CF38F05792%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_7-1781208358485.png%22%20alt%3D%22Habib_MS_7-1781208358485.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ENow%20if%20any%20NFC%20tag%20is%20close%20to%20the%20PNEV5190BP%E2%80%99s%20antenna%2C%20you%20should%20see%20the%20information%20displayed%20as%20shown%20in%20the%20image%20below%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_8-1781208378570.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_8-1781208378570.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388777i5B8F9310D9BC0305%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_8-1781208378570.png%22%20alt%3D%22Habib_MS_8-1781208378570.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--2008093519%22%20id%3D%22toc-hId--2007440941%22%3EAdding%20FreeRTOS%20support%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThis%20section%20presents%20the%20steps%20to%20follow%20to%20add%20FreeRTOS%20support%20to%20the%20current%20project%20with%20the%20possibility%20of%20easily%20choosing%20either%20to%20have%20OS%20support%20or%20not.%3C%2FP%3E%0A%3CP%3E1.%20Open%20the%20%E2%80%9CManage%20SDK%20Components%E2%80%9D%20in%20properties-%26gt%3BSDK%20Management.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_9-1781208421419.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_9-1781208421419.png%22%20style%3D%22width%3A%20926px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388778iE3772122AC9A3F96%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_9-1781208421419.png%22%20alt%3D%22Habib_MS_9-1781208421419.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E2.%26nbsp%3BSearch%20the%20FreeRTOS%20kernel%20component%20(NXP%20integration%20layer)%2C%20heap%204%20and%20add%20it%20to%20your%20project.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1785533111303.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1785533111303.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F393556iB55F637F5F2A440C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1785533111303.png%22%20alt%3D%22Habib_MS_0-1785533111303.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ENote%3A%20If%20this%20option%20does%20not%20appear%2C%20you%20will%20have%20to%20download%20the%20SDK%20with%20the%20FreeRTOS%20stack%20included.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-479419314%22%20id%3D%22toc-hId-480071892%22%3EAdding%20porting-specific%20files%20to%20FreeRTOS%20folder%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3EWe%20need%20to%20set%20the%20core-specific%20files%20which%20define%20core%20register%20addresses%20and%20the%20assembly%20instructions%20that%20integrate%20the%20FreeRTOS%20kernel%20functions.%20The%20core%20integrating%20the%20MCXN947%20IC%20is%20the%20Cortex%20M33%20with%20Trust%20Zone%2C%20therefore%2C%20the%20folder%20that%20we%20will%20use%20to%20add%20the%20port%20files%20will%20be%20from%20the%20folder%20%E2%80%9CARM_CM33_NTZ%E2%80%9D%20as%20explained%20below%3A%3C%2FP%3E%0A%3CP%3E1.%20Import%20the%20SDK%20example%20called%20%E2%80%9Cfreertos_hello_cm33_core0%E2%80%9D%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_11-1781208505026.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_11-1781208505026.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388783iA41678E0B49B0977%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_11-1781208505026.png%22%20alt%3D%22Habib_MS_11-1781208505026.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E2.%26nbsp%3BInside%20this%20example%2C%20you%20will%20see%20the%20folder%20%E2%80%9CGCC%E2%80%9D%20from%20the%20path%20freertos%26gt%3Bfreertoskernel%26gt%3Bportable%26gt%3BGCC%2C%20please%20copy%20and%20paste%20this%20folder%20into%20the%20same%20path%20of%20the%20project.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_2-1785533633824.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_2-1785533633824.png%22%20style%3D%22width%3A%20278px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F393558iE51D1AB952DCA9F1%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Habib_MS_2-1785533633824.png%22%20alt%3D%22Habib_MS_2-1785533633824.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_3-1785533645497.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_3-1785533645497.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F393559iE221691C5D47FF06%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Habib_MS_3-1785533645497.png%22%20alt%3D%22Habib_MS_3-1785533645497.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CH3%20id%3D%22toc-hId--1328035149%22%20id%3D%22toc-hId--1327382571%22%3EAdding%20port-specific%20created%20folder%20to%20include%20path.%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3ENow%20we%20need%20to%20tell%20the%20compiler%20where%20to%20find%20the%20port-specific%20files%20we%20just%20added%20to%20the%20project%2C%20to%20accomplish%20this%3A%3C%2FP%3E%0A%3CP%3E1.%20Open%20the%20project%20properties%20(right-click%20on%20project%20%26gt%3B%20Properties)%20and%20click%20on%20%E2%80%9CC%2FC%2B%2B%20General%E2%80%9D%20and%20on%20%E2%80%9CPaths%20and%20symbols%E2%80%9D.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_14-1781208609258.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_14-1781208609258.png%22%20style%3D%22width%3A%20790px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388786i3F56EB7348FE3BF2%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_14-1781208609258.png%22%20alt%3D%22Habib_MS_14-1781208609258.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E2.%20Here%20we%20will%20click%20on%20%E2%80%9CAdd%E2%80%A6%E2%80%9D%20and%20then%20%E2%80%9CWorkspace%E2%80%9D.%20In%20the%20new%20tab%20we%20will%20search%20the%20last%20folder%20of%20the%20path%20we%20created%20(freertos%2Ffreertoskernel%2Fportable%2FGCC%2FARM_CM33_NTZ%2Fnon-secure)%2C%20select%20it%20and%20click%20on%20%E2%80%9COK%E2%80%9D%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_1-1785533523574.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_1-1785533523574.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F393557i8BA0FC0D0AC7F593%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_1-1785533523574.png%22%20alt%3D%22Habib_MS_1-1785533523574.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E3.%20Repeat%20this%20step%20in%20project%20%26gt%3B%20Properties%20%26gt%3B%20%E2%80%9CC%2FC%2B%2B%20Build%E2%80%9D%20%26gt%3BSettings%20%26gt%3B%E2%80%9CIncludes%E2%80%9D.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_16-1781208764822.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_16-1781208764822.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388788i61C07B81E894178C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_16-1781208764822.png%22%20alt%3D%22Habib_MS_16-1781208764822.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1159477684%22%20id%3D%22toc-hId-1160130262%22%3EChanging%20OS%20preprocessor%20macro%3C%2FH3%3E%0A%3CBR%20%2F%3E%0A%3CP%3EFinally%2C%20we%20just%20need%20to%20tell%20the%20compiler%20that%20we%20want%20to%20run%20the%20example%20with%20FreeRTOS%2C%20to%20do%20this%3A%3C%2FP%3E%0A%3CP%3E1.%20Open%20the%20project%20properties%20(right-click%20on%20project%20%26gt%3B%20Properties)%20and%20click%20on%20%E2%80%9CC%2FC%2B%2B%20Build%E2%80%9D%2C%20then%20on%20%E2%80%9CSettings%E2%80%9D%20and%20on%20%E2%80%9CPreprocessor%E2%80%9D.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_17-1781208849806.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_17-1781208849806.png%22%20style%3D%22width%3A%20860px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388789i0E094E902094CA3E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_17-1781208849806.png%22%20alt%3D%22Habib_MS_17-1781208849806.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E2.%20Now%20find%20the%20previous%20macro%20named%20%E2%80%9CPH_OSAL_NULLOS%E2%80%9D%2C%20double%20click%20on%20it%20and%20change%20it%20to%20%E2%80%9CPH_OSAL_FREERTOS%E2%80%9D%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_18-1781209097027.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_18-1781209097027.png%22%20style%3D%22width%3A%20913px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F388790iB32B3C1698C1397D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_18-1781209097027.png%22%20alt%3D%22Habib_MS_18-1781209097027.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E3.%20Click%20on%20%E2%80%9CApply%20and%20Close%E2%80%9D%20and%20click%20on%20%E2%80%9CRebuild%20Index%E2%80%9D.%3C%2FP%3E%0A%3CP%3E4.%20To%20avoid%20multiple%20definition%20issues%20when%20we%20change%20between%20NULLOS%20and%20FREERTOS%2C%20we%20will%20discard%20the%20SysTickHandler%20for%20FREERTOS%20side%20located%20in%20port.c%20when%20the%20NULLOS%20macro%20is%20defined%2C%20as%20shown%20the%20following%20image%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1781896206808.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1781896206808.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F389480iDC3DEBB435BC3922%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1781896206808.png%22%20alt%3D%22Habib_MS_0-1781896206808.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E%20(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%23ifndef%20PH_OSAL_NULLOS%0Avoid%20SysTick_Handler(%20void%20)%20%2F*%20PRIVILEGED_FUNCTION%20*%2F%0A%7B%0A%20%20%20%20uint32_t%20ulPreviousMask%3B%0A%0A%20%20%20%20ulPreviousMask%20%3D%20portSET_INTERRUPT_MASK_FROM_ISR()%3B%0A%20%20%20%20traceISR_ENTER()%3B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F*%20Increment%20the%20RTOS%20tick.%20*%2F%0A%20%20%20%20%20%20%20%20if(%20xTaskIncrementTick()%20!%3D%20pdFALSE%20)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20traceISR_EXIT_TO_SCHEDULER()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pend%20a%20context%20switch.%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20portNVIC_INT_CTRL_REG%20%3D%20portNVIC_PENDSVSET_BIT%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20traceISR_EXIT()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20portCLEAR_INTERRUPT_MASK_FROM_ISR(%20ulPreviousMask%20)%3B%0A%7D%0A%23endif%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3E%23ifndef%20PH_OSAL_NULLOS%0Avoid%20SysTick_Handler(%20void%20)%20%2F*%20PRIVILEGED_FUNCTION%20*%2F%0A%7B%0A%20%20%20%20uint32_t%20ulPreviousMask%3B%0A%0A%20%20%20%20ulPreviousMask%20%3D%20portSET_INTERRUPT_MASK_FROM_ISR()%3B%0A%20%20%20%20traceISR_ENTER()%3B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F*%20Increment%20the%20RTOS%20tick.%20*%2F%0A%20%20%20%20%20%20%20%20if(%20xTaskIncrementTick()%20!%3D%20pdFALSE%20)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20traceISR_EXIT_TO_SCHEDULER()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F*%20Pend%20a%20context%20switch.%20*%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20portNVIC_INT_CTRL_REG%20%3D%20portNVIC_PENDSVSET_BIT%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20traceISR_EXIT()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20portCLEAR_INTERRUPT_MASK_FROM_ISR(%20ulPreviousMask%20)%3B%0A%7D%0A%23endif%0A%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3E5.%20Finally%2C%20copy%20and%20paste%20the%20FreeRTOSConfig_Gen.h%2C%26nbsp%3BFreeRTOSConfig.h%20and%26nbsp%3Bfreertos_tasks_c_additions.h%20files%20from%20the%20freertos_hello%20example%20as%20shown%20the%20following%20image%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_0-1785536616039.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_0-1785536616039.png%22%20style%3D%22width%3A%20189px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F393561i24DB56298E85F320%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Habib_MS_0-1785536616039.png%22%20alt%3D%22Habib_MS_0-1785536616039.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Habib_MS_1-1785536639784.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Habib_MS_1-1785536639784.png%22%20style%3D%22width%3A%20237px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F393562i3D0D489E36BFD5E8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Habib_MS_1-1785536639784.png%22%20alt%3D%22Habib_MS_1-1785536639784.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3ENow%20you%20are%20able%20to%20build%20and%20debug%20following%20the%20chapter%26nbsp%3BTesting%20Final%20Project%20Without%20OS%20but%20now%20with%20FreeRTOS.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2379726%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3ENFC%20Reader%20Library%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
yesterday
Updated by: