ADC usage S32K3xx with s32 design studio without AUTOSAR

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

ADC usage S32K3xx with s32 design studio without AUTOSAR

1,461件の閲覧回数
SAL_111
Contributor II

Hello, I'm a beginner in embedded systems programming. In my current project I want to read the voltage at an analog input pin and print it somewhere to check the reading, I use the S32K311. I would need some examples because I don't know how to initialise the ADC i already routed the pin in the PINS section and updated the code, but I can't find functions to read the analg input. Please provide me some help.

0 件の賞賛
返信
3 返答(返信)

1,428件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @SAL_111,

The RTD packages include various examples for the modules. Have you used the ADC example as reference?

Julin_AragnM_0-1727366447247.png

It shows how to use the APIs to configure, calibrate and start a conversion for the ADC:

Julin_AragnM_1-1727366486928.png

Best regards,
Julián

 

0 件の賞賛
返信

1,407件の閲覧回数
SAL_111
Contributor II

Thanks for the reply, but I can't do much with this example, I just need an example where one analog input pin is used and where I see how to init the adc and how to get the readings.

タグ(2)
0 件の賞賛
返信

1,387件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @SAL_111,

I'm not sure I understand, why is this example not valid for you? The example configures one ADC channel and reads the value for it in the notification function. You can simply modify the channel used for whichever channel you need to read.

For example, in the S32K344 EVB board, the included potentiometer is wired to ADC1_S10 (channel 34). You can simply modify the example to measure ADC1_S10 instead:

Julin_AragnM_0-1727467555093.png

Julin_AragnM_1-1727467559602.png

Julin_AragnM_2-1727467591085.png

Best regards,
Julián

 

0 件の賞賛
返信