SAMA5D-EK: Correct system timer frequency. Input clock is MCK/2, not MCK
This commit is contained in:
parent
1b6eec572d
commit
53930d5531
@ -52,11 +52,16 @@
|
||||
#include "chip/sam_pit.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
/* The PIT counter runs at a rate of the main clock (MCK) divided by 16 */
|
||||
/* The PIT counter runs at a rate of the main clock (MCK) divided by 16.
|
||||
*
|
||||
* On the SAMA5D4, the clocking to the PIC may be divided down from MCK.
|
||||
* Perhaps because of H32MXDIV? We will let the board.h tell us the correct
|
||||
* PIT include clock by defining BOARD_PIT_FREQUENCY.
|
||||
*/
|
||||
|
||||
#define PIT_CLOCK (BOARD_MCK_FREQUENCY >> 4)
|
||||
#define PIT_CLOCK (BOARD_PIT_FREQUENCY >> 4)
|
||||
|
||||
/* The desired timer interrupt frequency is provided by the definition
|
||||
* CLK_TCK (see include/time.h). CLK_TCK defines the desired number of
|
||||
|
@ -170,6 +170,7 @@
|
||||
* but not for the SAMA5D3.
|
||||
*/
|
||||
|
||||
#define BOARD_PIT_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
#define BOARD_USART_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
|
||||
/* HSMCI clocking
|
||||
|
@ -128,6 +128,7 @@
|
||||
* but not for the SAMA5D3.
|
||||
*/
|
||||
|
||||
#define BOARD_PIT_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
#define BOARD_USART_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
|
||||
#if defined(CONFIG_SAMA5_EHCI) || defined(CONFIG_SAMA5_OHCI) || \
|
||||
|
@ -127,6 +127,7 @@
|
||||
* but not for the SAMA5D3.
|
||||
*/
|
||||
|
||||
#define BOARD_PIT_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
#define BOARD_USART_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
|
||||
#if defined(CONFIG_SAMA5_EHCI) || defined(CONFIG_SAMA5_OHCI) || \
|
||||
|
@ -66,6 +66,7 @@
|
||||
* but not for the SAMA5D3.
|
||||
*/
|
||||
|
||||
#define BOARD_PIT_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
#define BOARD_USART_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
|
||||
#if defined(CONFIG_SAMA5_EHCI) || defined(CONFIG_SAMA5_OHCI) || \
|
||||
|
@ -170,6 +170,7 @@
|
||||
* but not for the SAMA5D3.
|
||||
*/
|
||||
|
||||
#define BOARD_PIT_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
#define BOARD_USART_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
|
||||
/* HSMCI clocking
|
||||
|
@ -128,6 +128,7 @@
|
||||
* but not for the SAMA5D3.
|
||||
*/
|
||||
|
||||
#define BOARD_PIT_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
#define BOARD_USART_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
|
||||
#if defined(CONFIG_SAMA5_EHCI) || defined(CONFIG_SAMA5_OHCI) || \
|
||||
|
@ -127,7 +127,9 @@
|
||||
* but not for the SAMA5D3.
|
||||
*/
|
||||
|
||||
#define BOARD_PIT_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
#define BOARD_USART_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
|
||||
#if defined(CONFIG_SAMA5_EHCI) || defined(CONFIG_SAMA5_OHCI) || \
|
||||
defined(CONFIG_SAMA5_UDPHS)
|
||||
|
||||
|
@ -66,6 +66,7 @@
|
||||
* but not for the SAMA5D3.
|
||||
*/
|
||||
|
||||
#define BOARD_PIT_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
#define BOARD_USART_FREQUENCY BOARD_MCK_FREQUENCY
|
||||
|
||||
#if defined(CONFIG_SAMA5_EHCI) || defined(CONFIG_SAMA5_OHCI) || \
|
||||
|
@ -169,6 +169,7 @@
|
||||
* REVISIT: I am not sure why this is. Perhaps because of H32MXDIV?
|
||||
*/
|
||||
|
||||
#define BOARD_PIT_FREQUENCY (BOARD_MCK_FREQUENCY >> 1)
|
||||
#define BOARD_USART_FREQUENCY (BOARD_MCK_FREQUENCY >> 1)
|
||||
|
||||
/* HSMCI clocking
|
||||
|
@ -127,6 +127,7 @@
|
||||
* REVISIT: I am not sure why this is. Perhaps because of H32MXDIV?
|
||||
*/
|
||||
|
||||
#define BOARD_PIT_FREQUENCY (BOARD_MCK_FREQUENCY >> 1)
|
||||
#define BOARD_USART_FREQUENCY (BOARD_MCK_FREQUENCY >> 1)
|
||||
|
||||
#if defined(CONFIG_SAMA5_EHCI) || defined(CONFIG_SAMA5_OHCI) || \
|
||||
|
@ -126,6 +126,7 @@
|
||||
* REVISIT: I am not sure why this is. Perhaps because of H32MXDIV?
|
||||
*/
|
||||
|
||||
#define BOARD_PIT_FREQUENCY (BOARD_MCK_FREQUENCY >> 1)
|
||||
#define BOARD_USART_FREQUENCY (BOARD_MCK_FREQUENCY >> 1)
|
||||
|
||||
#if defined(CONFIG_SAMA5_EHCI) || defined(CONFIG_SAMA5_OHCI) || \
|
||||
|
@ -67,6 +67,7 @@
|
||||
* REVISIT: I am not sure why this is. Perhaps because of H32MXDIV?
|
||||
*/
|
||||
|
||||
#define BOARD_PIT_FREQUENCY (BOARD_MCK_FREQUENCY >> 1)
|
||||
#define BOARD_USART_FREQUENCY (BOARD_MCK_FREQUENCY >> 1)
|
||||
|
||||
#if defined(CONFIG_SAMA5_EHCI) || defined(CONFIG_SAMA5_OHCI) || \
|
||||
|
Loading…
Reference in New Issue
Block a user