PORTCFG_CLKEVOUT EXPERTS, anyone?

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

Hi.

Yes, I've read AVR100.

I just STILL don't get it!

(Xmega64a4u/ studio 6,2)

 

Need to get the clock out of pin 4 of Port C because I think I've blown Pin 7....
This seems logical - using what's offerd to me as I type in Atmel Studio suggests what I reckon should work - except the last one PORTCFG_CLKOUT_PC_gc, I made that up following the logic... or otherwise....

I got all these from pp 154-155 of the AU-Manual, and searching iox64a4u.h

/PORTCFG_CLKEVOUT = (PORTCFG_CLKOUTSEL_CLK1X_gc | PORTCFG_CLKEVPIN_PIN4_gc | PORTCFG_CLKOUTSEL_CLK2X_gc | PORTCFG_CLKOUT_PC_gc); 

But it throws out PORTCFG_CLKEVPIN_PIN4_gc

 

Using

 PORTCFG_CLKEVOUT = (0x81);

works fine - clock appears on my freq. counter on Pin 4 (Why am I typing all that crap, anyway?...).

 

However, in an attempt to be 'proper' I tried the lengthy way first.

My includes are:

 

#include <avr/io.h> ( in iox64a4u.h, it makes sense)
#include <util/delay.h>
#include <asf.h>
#include <conf_clock.h>
#include <sysclk.h>
#include <rtc_driver.h>
#include <clksys_driver.h>

 

What have I missed???

Last Edited: Fri. May 1, 2015 - 09:25 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't know.  Are you sure you told Studio you are using a 64a4u?  That "thrown out" symbol is defined in my copy of the iox64a4u.h file.

 

Is the symbol you made up defined somewhere?   Why do you need that symbol?

 

 

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

Hi. Thanks for reply.

S'funny, but after a restart of the computer, PORTCFG_CLKEVPIN_PIN4_gc was found....Maybe iox64a4u.h was open in Notepad++...?)

The 'made-up' symbol was for getting the clock out on PortC. I guess I just haven't figured out the synax yet. I'd print out iox64a4u.h, but it comes to around 140 pages if opened in Libre Office writer...Lot to learn.

-Andy

Last Edited: Sun. May 3, 2015 - 06:24 AM