S32 Design Studio

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

S32 Design Studio

1,043 Views
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.

Tags (3)
0 Kudos
Reply
3 Replies

1,039 Views
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 Kudos
Reply

1,008 Views
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 Kudos
Reply

1,000 Views
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 Kudos
Reply