PORT configuration in MCAL

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

PORT configuration in MCAL

2,684件の閲覧回数
shudhamatinarha
Contributor II

Hello everyone,

I am using Tresos 24.0.1 and S32K14X_MCAL_4.3_RTM_P1_HF2_1.0.1 for MCAL configurations

We will be using two different configurations of particular microcontroller pin for two different modes in same project.
 
Our approach was to create two container for two modes in PORT Module in EB Tresos project but we are not able to do the same as its showing error.(error: We cant configure one pin twice)
 
Can somebody help me to achieve different configuration of same pin in same project?
 
Thank you in advance.
0 件の賞賛
返信
2 返答(返信)

2,668件の閲覧回数
hungnguyenphi
NXP Employee
NXP Employee

Hello @shudhamatinarha 

I would like to answer your question:

- In the Port autosar specification have mentioned that the Multiplicity of PortConfigSet is one, so user cannot add one more PortConfigSet.

 
 

Untitled.png

- Anyway, user can use PostbuildVariants and create multiple variants. Please follow these steps below(these step is for ADC, but user can do the same with PORT) to have it.

 

 

By referring to multiple variants, I mean a project can generate code with different variants, configured in EcuC. Here is the steps in GUI:

 

1. In Sidebar tab, choose Edit Selectable PostbuildVariants

 

hungnguyenphi_0-1601368762817.jpeg

 

2. Add a new PredefinedVariant

 

hungnguyenphi_1-1601368762902.jpeg

 

3. In Variant Criterion, add criterion and value representation

 

hungnguyenphi_2-1601368762983.jpeg

 

4. Close the Edit Selectable PostbuildVariants. In Ecuc, enable the EcucPostBuildVariant, then choose the reference variant selected

 

hungnguyenphi_3-1601368763037.png

 

5. In Adc -> AdcHwUnit, add a new HwUnit, then edit the Variant condition in Adc Hardware Unit

 

hungnguyenphi_4-1601368763188.jpeg

 

6. For each variant, choose the corresponding Value:

hungnguyenphi_5-1601368763221.png

 

7. After that, for each variant, different Adc Hardware Unit value can be chosen.

 

hungnguyenphi_6-1601368763296.jpeg

 

hungnguyenphi_7-1601368763366.jpeg

 

 

Code generated are different between each files:

 

hungnguyenphi_8-1601368763573.jpeg

 

 

Best regards,

Hung. 

2,649件の閲覧回数
shudhamatinarha
Contributor II

Thank you hungnguyenphi.

0 件の賞賛
返信