Forum: ARM programming with GCC/GNU tools problem in PIT init for mp3 project.

Author: nader (Guest)
Posted on:

Rate this post
0 useful
not useful
i have a problem about PIT interrupt in mp3 project

In the systime.c

#define TCK  1000                           /* Timer Clock  */
#define PIV  ((MCK/TCK/16)-1)               /* Periodic Interval Value

in the board:

#define MCK   48054857

so the PIV value is 3003.7 hz so interrupt will be
at every about 0.3 ms not 1 ms that mention it in comment.

/*  TIME.C:  Time Functions for 1000Hz Clock Tick

is comment is true?
or did i go in fulse?

also in systime_isr:
  if (systime_value % 16 == 0)

is it true for 10 ms run the process_keys()?(comment 10 ms in control.c)
i want to know how run process_keys() for every 10 ms?


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.