S32 デザインスタジオ

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

S32 Design Studio

2,320件の閲覧回数
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,316件の閲覧回数
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,285件の閲覧回数
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,277件の閲覧回数
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 件の賞賛
返信