How to use PDD macros in CW V10.4 step by step

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

How to use PDD macros in CW V10.4 step by step

1,877 Views
vfilip
NXP Employee
NXP Employee

Physical Device Drivers (PDD) macros is a software layer that provides set of methods for accessing microcontroller peripheral configuration registers.

PDD macros are a good companion to Peripheral Initialization components (like Init_GPIO, Init_TPM etc..) that provide complete initialization code for a peripheral so the user can then just use PDD macros for runtime control of the peripheral.

1. Add corresponding Peripheral Initialization component for your task and configure it ( they are named Init_{peripheral} ).

2. In the Components view, the Peripheral Initialization components contain a PDD sub-folder with a list of macros only relevant for the selected peripheral. Unfold the component to get the PDD sub folder visible.

pastedImage_0.png

3. Unfold the PDD folder and drag and drop macro you need to use (add semilcolon and optinaly a parametr):

pastedImage_12.png

The first parameter of all macros is base address of the peripheral and is filled automaticaly with the _DEVICE constant generated for the component if you drag it from Init_  component.

4. Include the corresponding header file. PDD macros are located wihtin the following folder:

{CodeWarrior}\MCU\ProcessorExpert\lib\Kinetis\pdd\inc\

pastedImage_13.png

For details please go to the PEx documentation. Available through "Help Contents" command under "Help" menu of CW and then select the following section CodeWarrior for Microcontrollers V10.x > Processor Expert Manuals > Processor Expert User Manual > Application Design > Low-level Access to Peripherals.

Best Regards

Vojtech Filip

Processor Expert Support Team

3 Replies

903 Views
Amit_Kumar1
Senior Contributor II

Hi

0 Kudos
Reply

903 Views
BlackNight
NXP Employee
NXP Employee

This one might be helpful: Low-Level Coding with PDD (Physical Device Driver) | MCU on Eclipse

As for documentation: I click on the function/macro in the source and press F3, this gets me to the macro definition which has example/documentation for it. Not like a manual, but helped me to use the PDD macros.

903 Views
Amit_Kumar1
Senior Contributor II

Thanks Erich , The post is helpful :smileyhappy:

0 Kudos
Reply