ATtiny817, unstable output on TCD

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

I have found a strange issue with a ATtiny817 Xplained Pro development board. I wanted to get a delayed pulse, so the idea was to use the event system to trigger a TCD fault from TCA which then starts a TCD sequence. This works "mostly", i.e. with at least one combination of TCA and TCD input frequencies I get a jumpy output signal. With an ATtiny3217 I do NOT observe these issues.

 

I have attached a ZIP file with the Atmel studio project and some screenshots to explain what I observe. A short explanation of the necessary changes to get stable or unstable output is in main.c, line 68. I think the rest is self-explaining.

 

Could someone with the same type of development board check if the same behaviour can be observed? Or is it just an issue with my board? Any help is appreciated.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

I missed your post, but I'm looking into the issue now, since I have 817 XPro around. I'll update the post with info in a while, I think I'm getting somewhere...

 

edit: updated...

 

This is the wave I get from

	             | TCD_CNTPRES_DIV4_gc   /* DIV32/DIV4, Sync clock divided by 4 */
	             | TCD_SYNCPRES_DIV4_gc; /* DIV1/DIV8 */

 

 

The yellow trace is WO1 from TCA0 and the blue trace is WOB from TCD0. I'm triggering the scope from the blue trace. I'm guessing WO1 is the trigger (sorry, I'm not going to read your code in detail to find out).

So in this case we observe a clean triggering of TCD by TCA every cycle.

 

 

Now from

	             | TCD_CNTPRES_DIV4_gc   /* DIV32/DIV4, Sync clock divided by 4 */
	             | TCD_SYNCPRES_DIV8_gc; /* DIV1/DIV8 */

 

 

In this case I observe that TCD is triggered only every other TCA pulse, so the TCD frequency is 1/2 of TCA frequency. Note that my scope is triggering from the blue pulse (TCD), so it is stable; if I trigger the scope from TCA, I observe jumping of TCD, of course, because it may be at 0º phase or at 180º phase when TCA triggers the scope.

Maybe this is what you are observing? You are triggering your scope from TCA?

 

 

 

Last Edited: Tue. Jul 23, 2019 - 01:32 PM