Atmel START and Xmega...not so simple

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

This thread is an offshoot of this one:

https://www.avrfreaks.net/forum/x...

 

I have been trying for a few days off and on to get teh USART running on an Xmega32e5.  So far I can make the ports do what I want and the TC4 works fine as well but the USARTC0 refuses to output anything.  I have been able to get teh USART going using the CodeVision Wizard and a small program so I know the Xmega is ok.  The device is mounted in an STK600 so teh platform is pretty stable with no power supply connection issues.

 

One thing mentioned in the other thread is the Re-mapping of the pins.  there was a spot in the CV wizard about this, but nothing I could find in START.  Since I picked the PortC pin 7 for teh TX pin and PortC pin 6 for RX I am guessing this re-mapping is done in the background.  Anyone able to confirm this?

 

So, my question is has anyone run into an issue with START not configuring the XMEGA USART(s) properly?

 

Cheers,

JIm

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

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

I find START lacking in the Xmega department.  I think I would try ASF 3.x (ASF Wizard) for an Xmega before I'd try ASF 4 (START).  Be forewarned that the XMEGA32E5 USART is different from the other XMEGA USARTs.  It has a loopback/One-Wire mode that the others do not and some other differences I can't remember at the moment.

 

I don't know if this applies to START, but with ASF 3.x, if you're using the System Clock Service, all peripheral clocks are turned off by sysclk_init().  ASF calls to init peripherals will enable these clocks.  If you're not using the ASF to init the peripherals, you'll need to use sysclk_enable_module() to turn on the peripheral clocks on a per peripheral basis.

 

Greg Muth

Portland, OR, US

Xplained/Pro/Mini Boards mostly

 

Make Xmega Great Again!

 

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

I will not use AtmelStart, but since I was interested, I tried it.
Sure it did not work properly.

When examining the register in detail, I found two problems.

 

1: Remap setting is not valid even though pin assignment default is remapped position.
(PORTC.REMAP = PORT_USART0_bm; // this instruction is missing)

The default position on the device is PC2, PC3.

 

2: It is 4800 even though 9600 is selected for the baud rate.

 

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

Yes, I am aware of this and it is in my list for the report I am generating.  the baud rate issue might be because the MODE is set for ASYC POLLED mode.  Change the driver to INIT and select ASYNCHRONOUS MODE

 

Jim

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

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

Oh, it's a complaint thread, not a question thread.

Excuse me.

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

jgmdesign wrote:

Yes, I am aware of this and it is in my list for the report I am generating.  the baud rate issue might be because the MODE is set for ASYC POLLED mode.  Change the driver to INIT and select ASYNCHRONOUS MODE

 

Jim

From the other thread, I thought you want to learn the xmega.

From this one it appears you want to debug the Atmel START.

What are you trying to do? Both? surprise

 

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

kabasan wrote:
Oh, it's a complaint thread, not a question thread. Excuse me.

This thread is a little of both I guess LOL.  

 

rammon wrote:
From the other thread, I thought you want to learn the xmega.

Correct

 

rammon wrote:
From this one it appears you want to debug the Atmel START.

Yes and No

 

rammon wrote:
What are you trying to do? Both?  

Sometimes one leads into another. smiley

 

In this case - via the other thread with the help of LarryVC and JS it appears that there are a couple of bugs in Atmel START.  When I stumbled across the issue of Re-Mapping with John and Larry it had nothing to do with what I was trying to accomplish in that thread and in effort to keep that thread on topic I started this thread as the issue is START related not the confusion with the XMEGAS USART.  As it turns out there are a few other things that were unearthed in getting the USART working that are a caused by START as well. 

 

Along the way I thought maybe I need to update my version of AS7 ans downloaded the new Gallery, and the latest ASF.  Found an ugly and very irritating 'feature'  where a new version of ASF will go through your project and if it sees something it does not like it CHANGES it without your permission rather than ask you about changing it.  It also invokes other new 'features' automatically without asking as well.  I have a thread about Updates as well going and will post this there as it has nothing to do with this thread, or the other one although all three interact, they are inherently different situations.  My intent is to address the issues with START separately from the learning of the XMEGA.

 

Jim 

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

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

it appears that there are a couple of bugs in Atmel START.

A couple..?  ROTFLMAO!!!  

Greg Muth

Portland, OR, US

Xplained/Pro/Mini Boards mostly

 

Make Xmega Great Again!

 

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

Greg_Muth wrote:

it appears that there are a couple of bugs in Atmel START.

A couple..?  ROTFLMAO!!!  

Snorted my coffee reading that!  But to be fair we already knew that about ASF too.

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius