how to start programming AST

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

I'm a beginner i'm trying to program AST module of  "AT32UC3C0512C"  I've gone through data sheet several times couldn't find any clue. basically i need a start and i couldn't do it really depressed kindly someone help me out .  

This topic has a solution.

#beginner

Last Edited: Sat. Apr 22, 2017 - 05:03 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Atmel have "application notes" for most of the peripherals in most of their micros. When I google "avr32 ast application note" (which may not be the right search terms) one of the hits is:

 

http://www.atmel.com/images/doc3...

 

Chapter 5.2 in that certainly seems to be about the AST.

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

#include <avr32/io.h>
#define AST_OSC_RC   0
#define AST_MODE_COUNTER   0
bool ast_init_counter    (    volatile avr32_ast_t *     ast, uint8_t     osc_type, uint8_t     psel, uint32_t     ast_counter)
{
ast=&AVR32_AST;
osc_type=0;
psel=0;
ast_counter=0;
}
    

int main(void)
{
   
ast_init_counter();
    
    while (1) 
    {
    }
}

 

i found this error how to resolve it?

 

Error        expected '=', ',', ';', 'asm' or '__attribute__' before 'ast_init_counter'   

 

#beginner

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

That is saying that "bool" is not recognized. Try adding:

#include <stdbool.h>

But the invocation of the function is not using the return value anyway - so it might as well be "void" anyway.

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

thanks alot 

#beginner