WDog1_deviceData does not created by PE (KDS 3.0)

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

WDog1_deviceData does not created by PE (KDS 3.0)

ソリューションへジャンプ
2,466件の閲覧回数
gschelotto
Contributor V

Hi,

Just to report something I think is a little bug. When Wdog1 component is created by PE (KDS 3.0) the WDog1_DeviceData define is not created so I have to add it in order to use the component Methods as shown

#define WDog1_DeviceData  ((LDD_TDeviceData *)PE_LDD_GetDeviceStructure(PE_LDD_COMPONENT_WDog1_ID))

Could someone confirm this PE issue?

regards,

gaston

0 件の賞賛
返信
1 解決策
2,218件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hi gaston,

yes, you can do this at runtime. the return value of the Init() function returns you that device handle otherwise.

Erich

元の投稿で解決策を見る

0 件の賞賛
返信
11 返答(返信)
2,218件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello gaston,

Please see the file of "WDog1.h" , it have define the "WDog1_DeviceData" .

pastedImage_0.png

If still have any question , please contact me !


Have a great day,

Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
2,218件の閲覧回数
gschelotto
Contributor V

Strange, here's my WDog1.h generated by PE

Selection_020.png

I'm using KDS 3.0 for Linux 64-bit (DEB)

regards,

gaston

0 件の賞賛
返信
2,218件の閲覧回数
marek_neuzil
NXP Employee
NXP Employee

Hello Gaston,

It seems that you have not enabled the Auto Initialization in the WatchDog_LDD component.

In the WatchDog_LDD component, set the Initialization/Auto Initialization property to the "yes" value and generate Processor Expert Code. The following definition will be generated in the WDog1.h header file:

pastedImage_0.png

Best Regards,

Marek Neuzil

0 件の賞賛
返信
2,218件の閲覧回数
gschelotto
Contributor V

Yes Marek, I have to set the Initialization/Auto Initialization property to the "yes" to generate the definition. Anyway I think that it has to be created if the property is set or not. Don't you think so?

regards,

gaston

0 件の賞賛
返信
2,218件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hi Gaston,

that WDog1_DeviceData is only created and present if you enable that 'auto initialization' option. What happens is that during PE_Low_Level_Init() it calls the Init function of the component to create that handle for you.

Otherwise: You can call the Init() function yourself to create that handle.

So if you really have that option set in the component, and it does not create that define and initialization for you, then this is clearly a bug for me.

Erich

0 件の賞賛
返信
2,218件の閲覧回数
gschelotto
Contributor V

Hello Erich,

Imagine I don't want to auto-initialize the component because I like to do it during runtime for disabling , enabling or re-configuring the component. In this escenario WDog1_DeviceData is not created and I cannot use the WDog1 methods.

Are you saying that after calling the Init() function the WDog1_DeviceData is created and hence I can use it?

regards,

gaston

0 件の賞賛
返信
2,219件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hi gaston,

yes, you can do this at runtime. the return value of the Init() function returns you that device handle otherwise.

Erich

0 件の賞賛
返信
2,218件の閲覧回数
gschelotto
Contributor V

Great!

Erich/Alice, thank you for your help

regards,

gaston

0 件の賞賛
返信
2,218件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Gaston,

Which chip do you use ?

BR

Alice

0 件の賞賛
返信
2,218件の閲覧回数
gschelotto
Contributor V

Hello Alice,

I use the MKE02Z64VQH2. The same as FRDM-KE02Z.

regards,

gaston

0 件の賞賛
返信
2,218件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello gaston,

About this chip , on Wind7 KDS3.0 , it  have the definition.

Sorry on my side there is not have the Linux,  hope some one else can test it on the Linux.

And can you test on other computer which is also Linux system ? If it also have not this definition, this maybe a bug .

BR

Alice

0 件の賞賛
返信