Port Initialization in run time

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

Port Initialization in run time

851件の閲覧回数
rijil_kp
Contributor III

I want initialize the Port configuration in run time.

1. I have 2 different Hardware variants with different port configurations.

2. I have enabled post build selectable option for Port config and created 2 different Port_<variant>_PBcfg files.

3. Now how can i integrate these file to my project?

4. How can call port init with different configuration set during run time?.

タグ(1)
0 件の賞賛
3 返答(返信)

769件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hi,

1. To integrate these files into your projects, just add these files to your list of source files.

2. You can pass the pointer to the configuration as the parameter to Port_Init() function, then call it again when you want to switch the variant.

E.g., there are 2 generated Port configuration structures (Port_ConfigType) named as PortConfigSet_VS_0 and PortConfigSet_VS_1. At the beginning, you want to use PortConfigSet_VS_0, then you will call:

...

Port_Init(&PortConfigSet_VS_0);

...

When you want to switch to PortConfigSet_VS_1, simply call Port_Init again:

...

Port_Init(&PortConfigSet_VS_1);

...

0 件の賞賛

769件の閲覧回数
rijil_kp
Contributor III

I am using s32k148_lqfp144 controller.

0 件の賞賛

769件の閲覧回数
FelipeGarcia
NXP Employee
NXP Employee

Hello,

Could you please confirm the device you are using so we can assign the right engineer to help you?

Regards

0 件の賞賛