How to configure ADC PAL in S32K118

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure ADC PAL in S32K118

Jump to solution
172 Views
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
166 Views
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
156 Views
Contributor IV

Dear Robin,

Thanks a lot.

Best regards

He Wei

 

 

0 Kudos
167 Views
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