PDB0 and ADC0

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

PDB0 and ADC0

3,338 Views
pietrodicastri
Senior Contributor II

Good morning

I am trying to configure the PDB0 and ADC0 to work in hardware trigger. I am interested in sampling only two channels, using only ADC0.

I want to assign the Pretrigger 0 to ADC0 without delay, the pretrigger 1 to ADC0 in back to back.

The continuous mode is disabled.

The PDB0 interrupt is fired at 8KHz.

The interrupt of the ADC0 is fired at approx 400 KHz. No synch between the PDB0 and ADC0.

The PDB0 detect a sequence error interrupt.

I do not follow the logic. Attached are the registers for PDB0 and ADC0.

Please ad advice.

Best thanks

Labels (1)
0 Kudos
Reply
2 Replies

3,041 Views
perlam_i_au
Senior Contributor I

Hi Pietro:

I have been reading your question and at this moment I just want to confirm with you what you have described, sometimes is difficult for me to understand, please see below and let me know if I have understand everything.

  • You want to trigger an action from PDB0 and ADC0, correct?
  • You want to sample two channels using ADC0, you mean 2 ADC channels?
  • What you mean with pretrigger?
  • You want to use ADC0 for trigger in two different configurations for two different channels?
  • You mention frequency rates for ADC0 and PDB0, those are the module frequency input (for each module)?
  • You mention "The PDB0 detect a sequence error interrupt." but I do not understand, what you mean with sequence?

I just want to be sure before trying something, could you please answer this questions?, I would be glad to help once I got everything clear.

3,041 Views
pietrodicastri
Senior Contributor II

Hi Perla

Thank You for attention.

I have digged hardly to understand the problem and it seems appearing a solution now. I want to trigger the the ADC0 two times to sample two inputs in back to back.

The configuration is the same for both channels of the ADC0. In my understanding the problem was the sampling time of the ADC0 with the averaging chosen was too long

for the PDB0 period. In such condition there was no way of avoiding the sequence error with both ADC0 channels activated.

I have now placed a fair sampling time and average to stay in time, everything is working fine.

Best regards

0 Kudos
Reply