S32 Design Studio

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

S32 Design Studio

2,384 次查看
sarwath
Contributor IV

Hello Community,

I am converting the data from the ADC0_SE12 (Pot input) using ADC and I used the while loop to continuous data read from ADC.

In S32DS I am not able to read the ADC data without breakpoint, if I add breakpoint I can able to see the change in Registers and data also coming from ADC. If I run the code without breakpoint no register update or ADC data read. 

can anyone please help on this.

Thanks in advance.

标记 (3)
0 项奖励
回复
3 回复数

2,380 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi sarwath,

When a conversion is complete, the SC1n[COCO] flag is set. You can read it with the ADC_DRV_GetConvCompleteFlag.

Your while loop call ADC_DRV_GetChanResult too frequency. The ADC may not have finished converting.

ADC_DRV_GetChanResult ADC_DRV_GetConvCompleteFlag.png

Have you refer to those ADC examples in SDK? In addition, this example is also recommended for your reference: Example S32K144 PDB ADC DMA S32DS.ARM.2018.R1


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复

2,349 次查看
sarwath
Contributor IV

Hello Robin,

 

Yes you're correct. It is just to understand the ADC flow. My question is regarding the S32DS why the registers are not updating in debug mode. If I use the breakpoint the registers are updating otherwise all the register value are Zero.

 

Thanks,

Sarwath 

0 项奖励
回复

2,341 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Sorry. Regarding the phenomenon caused by breakpoint when debugging S32K in S32DS, I am afraid you need to submit the question in https://community.nxp.com/t5/S32-Design-Studio/bd-p/s32ds

0 项奖励
回复