ATtiny1616 SPI Driver from Atmel Start

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

Maybe someone out there can help me figure out Atmel Start.  I'm trying to instantiate the SPI_0_Init driver using the SPI buffers and interrupts.  At one point Atmel was generating the code for SPI_0_write_block(), SPI_0_read_block(), ... etc.  But now Atmel Start will only generate SPI_init() function.  What am I doing wrong?

 

James.

This topic has a solution.
Last Edited: Mon. Jan 27, 2020 - 07:53 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I suggest to take a look at this thread:

 

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

 

 

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


 

jm2morri wrote:
But now Atmel Start will only generate SPI_init() function. 
I just did what you said - went to the start site. elected to create a project, picked 1616, added "SPI". I see:

 

 

Surely those are the functions you are talking about? 

 

How does your experience differ from mine?

 

PS the config:

 

 

Nothing is changed from default - I simply selected "Driver: SPI" and it delivered all the above as you see it.

Last Edited: Mon. Jan 27, 2020 - 04:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Moe123, that is useful information for sure.  I'll use that once I get past this step.

 

But right now, Atmel Start will not even generate the SPI driver, the only function it generates is SPI_0_Init().  At one point it was generating the read_block, write_block, etc functions, but it isn't doing that anymore.  I think I have all the settings the same and I've played with them.  I even tried completely deleting the SPI driver and adding it to the project again.  But I can't get all those functions to be generated by Atmel Start.

 

James.

 

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

PS I wonder why anyone would ever elect to do SPI with interrupts (the time in/out of an ISR is likely more than sitting in a block on transfer completion!)? But ours is not to reason why!

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

Thank you very much for looking at this.

 

I just duplicated what you did and yes, I do now see those functions in the .h file.  Maybe they were always there, I was using the Doxygen output to look for them and there they were not being generated for some reason.  Even now, the write_block and read_block functions are missing from the doxygen output.  And yes, I regenerate it after each update.

 

Anyways I seem to have what I need now.

 

James.

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jm2morri wrote:
I was using the Doxygen output to look for them and there they were not being generated for some reason. 

 

Just to be fair....I do NOT like START.  I learned from the good folks here I can create what I need simply by reading the datasheets and some experimentation.

 

with regards to START and the TINY series there is a thread from me a while ago with LARRYVC regarding issues with START and the Tiny's.  Don't know where it is.

 

Lastly.  I too have found the Doxygen output to be somewhat lacking as well.  Is what it is maybe?

 

I also tried what you asked for and I also obtained the same results as Cliff so based on that and your ability to also replicate the results I am guessing pilot error?

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

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

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

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

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

jm2morri wrote:
I seem to have what I need now.

See Tip #5 in my signature (below, may not work on mobile.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...