How to configure ADC PAL in S32K118

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure ADC PAL in S32K118

Jump to solution
1,319 Views
wei_w_he
Contributor IV

Dear Officer,

I am using ADC from S32K118 for battery detection in Sunroof project. I can successfully run the adc_pal_s32k118 example. But when I configure or even copy the adc pal setting from example to my project. It always crashed on at ADC_StartGroupConversion()->PDB_Init() as below; I verify all the setting and can't find any wrong with my setting. I attached my simple code (LedBink.zip), Can you help to have a quick look?

wei_w_he_0-1600751872886.png

 

Thanks and best regard

He Wei

 

0 Kudos
1 Solution
1,314 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi wei_w_he,

You can find out this line caused fault.

cause fault.png

Operating peripheral register trigger fault are usually caused by not enabling the peripheral clock.

enable clock PDB0.png

Best Regards,
Robin

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

 

View solution in original post

2 Replies
1,304 Views
wei_w_he
Contributor IV

Dear Robin,

Thanks a lot.

Best regards

He Wei

 

 

0 Kudos
1,315 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi wei_w_he,

You can find out this line caused fault.

cause fault.png

Operating peripheral register trigger fault are usually caused by not enabling the peripheral clock.

enable clock PDB0.png

Best Regards,
Robin

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