SAMC21 - Cannot Use TC Capture Inputs in PPW or PW Modes

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

After wasting enough time on this, I've about convinced myself it can't be done, but has anyone had any success using any TC Capture Inputs (WO[0,1]) for any of the PWP, PPW, or PW modes?

 

I was able to get them to work using EIC and the Event system, but the datasheet seems to say you can use Event Inputs or Capture Inputs for any of these modes (depending on whether or not CTRLA.COPENx is set). They even list specific Event Actions that can only be triggered by Event Inputs (not including PPW, etc...). So far, setting EVACT to anything just stops the timer (unless I'm using the EVENT system). This seems to imply these modes only work with the Event System, but that seems strangely limited and misleading in the datasheet. I've even tried feeding the MC0 output event back into the TC0 event input since it was working with the EIC event input, but that didn't work either. 

 

The only thing I've been able to do with the Capture Inputs is save the COUNT value in CC0 with the rising edge of WO[0]. Since I need to measure pulse-width, I can't even use interrupts because I can't flip the edge-sensing direction without disabling the timer first. Currently I can't use the EIC method without a new PCB since EXTINT12 happens to be in use already as I thought I could use the WO[0] input for what I needed. I will probably make another PCB rev anyway, but I wanted some kind of confirmation that this can or cannot be done...

 

I'm using SAMC21J18A Rev D. No ASF.

 

Thanks for your input.

 

Last Edited: Sun. Sep 24, 2017 - 01:26 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tried it and unfortunately I can only confirm your result (I finally have a Rev D C21, no point testing this with my Xplained Pro which is Rev B where capture from input pins is in the errata).

/Lars