How to initialise peripherals

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

How to initialise peripherals

ソリューションへジャンプ
663件の閲覧回数
ArkAndyFraser
Contributor III

Having got frustrated with RTD, I have dropped back to S32DS 3.4 and SDK for my project.

One thing that I have not figured out with the SDK is how to configure the hardware drivers given the code automatically generated. Where is it documented how you initialise the drivers in your code?

As an example, I have assigned an FTM channel as input capture and generated the code. I now have peripherals_flexTimer_ic_1.c and peripherals_flexTimer_ic_1.h. 

In the peripherals_flexTimer_ic_1.c file I can see:

ftm_user_config_t flexTimer_ic_1_InitConfig = ...
ftm_input_param_t flexTimer_ic_1_InputCaptureConfig = ...
ftm_input_ch_param_t flexTimer_ic_1_InputCaptureChannelConfig[1] = ...

Where is it documented how I use these configuration structures?

I can see in SDK/platform/drivers/src/ftm/ftm_common.c the FTM_DRV_Init function which takes ftm_user_config_t which is defined in the generated code but also takes ftm_state_t which does not appear to exist in the generated code!

I also see FTM_DRV_InitInputCapture in ftm_ic_driver.c which takes ftm_input_param_t which is in the generated code.

So, where is it documented which of these initialisation functions need to be called?

Andy

0 件の賞賛
返信
1 解決策
646件の閲覧回数
ArkAndyFraser
Contributor III

I guess the example code is the primary documentation for using the SDK.

A

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
657件の閲覧回数
ArkAndyFraser
Contributor III

Okay, I think I have figured out that ftm_state_t is returned *from* FTM_DRV_Init.

But again, where is this documented?

Andy

0 件の賞賛
返信
647件の閲覧回数
ArkAndyFraser
Contributor III

I guess the example code is the primary documentation for using the SDK.

A

0 件の賞賛
返信