cancel
Showing results for 
Search instead for 
Did you mean: 

ADC synchronization problem.

ADian
Associate

I have ADC synchronized with PWM and it saves data to buffer. PWM is set to be stopped at debugging. It works well until stop at breakpoint.

​When I debug program and start from breakpoint, the ADC generates incorrect sequence.

How can I fix it?

Can I stop ADC at debugging?

Thank you.

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
4 REPLIES 4
Erwan YVIN
ST Employee

Hello Anton ,

I am going to check with experts.

Best regards

Erwan

Erwan YVIN
ST Employee

Which SPC5 family do you use ?

ADian
Associate

Hello Erwan,

Thank you for your reply.

I use SPC560P34​

Erwan YVIN
ST Employee

Hello Anton ,

When the SW is stopped,if PWM HW triggers are still active,ADC will go on to convert which HW trigger event.

Therefore, to debug 2 solution :

-         no HW trigger group active (call Adc_DisableHardwareTrigger for each active group)

Or

-         Disable all PWM signals which trigger the CTU for ADC

Best regards

Erwan