How to configure ADC PAL in S32K118

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to configure ADC PAL in S32K118

跳至解决方案
2,305 次查看
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 项奖励
回复
1 解答
2,300 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

 

在原帖中查看解决方案

2 回复数
2,290 次查看
wei_w_he
Contributor IV

Dear Robin,

Thanks a lot.

Best regards

He Wei

 

 

0 项奖励
回复
2,301 次查看
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!
-----------------------------------------------------------------------------------------------------------------------