Vojtech Filip

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

Discussion created by Vojtech Filip Employee on May 11, 2013
Latest reply on Apr 23, 2014 by Amit Kumar

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.

 

 

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

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\

 

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

Outcomes