multiple (identical) code creation of components

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

multiple (identical) code creation of components

Jump to solution
854 Views
om
Contributor III

Hello

In the PE there are 3 components that can be "shared drivers" - Serial_LDD, CAN_LDD and Ethernet_LDD.

I need two timers and 5 leds in my application.

If I add 2 timers components and 5 led components, I end up with different file, for each component, that contain the same code.

How can I avoid this ?

The issue is even more complicated for GPIO, BitIO, BitsIO, ByteIO, ...

which component should I select, in order to avoid the problem mentioned above ?

Thanks a lot

OM

0 Kudos
1 Solution
637 Views
vfilip
NXP Employee
NXP Employee

Hello,

sorry for my confusing previus reply. The shared mode is currenlty supported for the Serial_LDD, CAN_LDD and Ethernet_LDD components. But as wokraround you can for example use TimerUnit and 2 channels of FTM or GPIO and

5 pins from 1 port to allocata less program code.

If you would provide HW resource you need to use, I could provide better support.

Best regards

Vojtech Filip

Processor Expert Support Team


View solution in original post

0 Kudos
7 Replies
637 Views
vfilip
NXP Employee
NXP Employee

Hello,

could you please specify all HW resources for your use case + MCU you use.

I mean e.g.

PTA0, PTA1, etc. FTM0 ch 1, FTM0 ch2

Allows you your design for exmaple use FTM0, ch0,1 for timing and pins from one port?

Best regards

Vojtech Filip

Processor Expert Support Team

0 Kudos
637 Views
om
Contributor III

Hi

I didn't understand your answer.

Can you explain what you mean ?

(I assume you answered the second part)

I want to have 5 LEDS, but not have 5 almost IDENTICAL files, for each LED.

I want 1 file, for all the leds.  (with enum of the led)

Am I more clear now?

0 Kudos
638 Views
vfilip
NXP Employee
NXP Employee

Hello,

sorry for my confusing previus reply. The shared mode is currenlty supported for the Serial_LDD, CAN_LDD and Ethernet_LDD components. But as wokraround you can for example use TimerUnit and 2 channels of FTM or GPIO and

5 pins from 1 port to allocata less program code.

If you would provide HW resource you need to use, I could provide better support.

Best regards

Vojtech Filip

Processor Expert Support Team


0 Kudos
637 Views
om
Contributor III

Hello Pilip

By FTM, you mean the Flex Timer Module ?

I looked at PEXDRVSPEX.pdf and found 2 occurrences of it, but nothing meaningful.

(only in K60P144M100SF2V2RM.pdf, reference_manual)

The question is in Processor Expert forum, so I thought that there is component called FTM_Ldd, but found nothing.

Is there a document that describe all the components that PE has, for a given processor ?

For example, till today, I don't know why to use ExtInt high level component, and not ExtInt_LDD component.

Thanks a lot

OM

0 Kudos
637 Views
vfilip
NXP Employee
NXP Employee

Hello,

regarding FTM (Flex Timer issue) - I would recommend to use TimerUnit_LDD component, it can work with PIT, FTM, LPTMR and SysTick. When you use this component you get for all listed devices unified API and you should be able to handle for exmaple 2 channels of FTMx in one file (component).

In case you need the list of the components available for selected device, I would recommend to open Processor View and right click on the requested component. Opened pop-up menu will show the list of supported components for selected device.

In case you start new project on Kinetis I would always recommend to use components with LDD suffix (Logical Device Driver components) + ConcoleIO, Freemaster, and TSS_Library (they do not have LDD suffix but they are not migraiton components). ExtInt component on Kinetis represents migration component and is usefull for example if you migrate from HCS08 -> Kinetis.

Best regards

Vojtech Filip

Processor Expert Support Team

637 Views
om
Contributor III

Hi Filip

Sorry for the late response.

I was not near a computer.

The previous answers and this one almost "close the loop" for me.

I undersdand that I don't use the PE as I should, from choosing the right componenets perspctive.

Is there a book / PDF that covers all the possible components, depply ?

(I searched and didn't find what is Freemaster, and TSS_Library. What it is ??)

I really need to get a ful list that "specify all HW resources for your use case + MCU you use" as  you asked.

Thanks a lot

  OM

0 Kudos
637 Views
vfilip
NXP Employee
NXP Employee

Hello,

TSS_Library is component encapsulating TSS Library - it is for touch sensing, for details please - http://www.freescale.com/tss or tutorial http://mcuoneclipse.com/2012/09/30/tutorial-touching-the-freedom-kl25z-board/

FreeMaster is component for debugging/measurement/analyzis purposes http://www.freescale.com/freemaster

Best regards

Vojtech Filip

Processor Expert Support Team