Part Number: TMS320F280039
Hi,
I want to understand the calculation of CPU_RATE macro used in <device>_examples.h for example: F2837xD_Examples.h.
// Take into account the input clock frequency and the PLL multiplier
// selected in step 1.
//
// Use one of the values provided, or define your own.
// The trailing L is required tells the compiler to treat
// the number as a 64-bit value.
//
// Only one statement should be uncommented.
//
// Example: 200 MHz devices:
// CLKIN is a 10 MHz crystal or internal 10 MHz oscillator
//
// In step 1 the user specified the PLL multiplier = 40 for a
// 200 MHz CPU clock (SYSCLKOUT = 200 MHz).
//
// In this case, the CPU_RATE will be 5.000L
// Uncomment the line: #define CPU_RATE 5.000L
/
#define DELAY_US(A) F28x_usDelay(((((long double) A * 1000.0L) / (long double)CPU_RATE) - 9.0L) / 5.0L)
- Does the CPU_RATE remian same for internal and external oscillator?
- Will it not change if I use external oscillator of a frequency other than 10MHz?
- How is CPU_RATE dependent on PLL multiplier and crystal clock frequency?
Looking forward to your response.
Thanks,
Mukul