Can't find struct usart_async_descriptor

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

Hi,

I am (of course) new to ASF & Atmel Start and I am trying to register callbacks. I download Start code for the Sam D20 USART sercom4, which writes "hello world" to sercom/PB08. I am now trying to add callbacks so I can receive. 

 

Now, I may be missing something but it looks like Amtel did not provide me with the #include files to do this. Furthermore the studio does not recognize usart_async_register_callback and I also can't find struct usart_async_descriptor. struct usart_async_descriptor is needed as a

parameter of to the actual callback function. 

 

 

How can I add the functionality to my program. 

 

 

Thanks.

Tony

Stay Calm and Listen to the Grateful Dead

Last Edited: Mon. Sep 30, 2019 - 10:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TonyS wrote:
for the Sam D20

Not AVR-related, then.

 

Try:  https://community.atmel.com/forums/atmel-software-framework-asf-and-atmel-start-asfv4-arm-related

 

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...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Without looking at the code I can only guess you have selected the wrong driver, it needs to be USART_Async. If I add that to a new project for SAMD20 I get what you mention including a callback example in examples/driver_examples.c

/Lars

 

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

I added the code using  Start that adds USART support. I have only got the transmission working far but it works. How to I add to a start project?

Stay Calm and Listen to the Grateful Dead

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

+ Add software component in the dashboard (but if you already added USART I guess you know that). The question is if the "Driver:" setting is correct in your USART, it's under COMPONENT SETTINGS.

/Lars

 

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

Yes I reconfiguration my project to use async rather than sync USART. Thanks everyone 

Stay Calm and Listen to the Grateful Dead