TI DSP f28335 HISPCLK is set automatically, why? And how to obtain the maximum ADC sampling frequency with this restriction?

5 views (last 30 days)
Hi, does somebody know if it is possible to set the High speed clock of a TI f28335 DSP using embedded coder?
From Matlab Help:
Note HISPCLK is set automatically for the user, and it is not possible to change the rate. For more information, see High-Speed Peripheral Clock
High-Speed Peripheral Clock:
By default, this clock is always selected in Embedded Coder software.
So can I select this clock? Where? What is the non default option?
Why would the clock be set automatically? According to the processor's data manual ( http://www.ti.com/lit/ds/symlink/tms320f28335.pdf) [page 57], the High Speed Clock (HISPCLK) only drives the ADC peripheral.
Given the 150 MHz clock frequency of my TI f28335 processor, the default value of HISPCLK = 75MHz.
TI's ADC documentation ( http://www.ti.com/lit/ug/spru812a/spru812a.pdf ) mentions that the ADC clock should be 25MHz to obtain the maximal sampling frequency of 12.5 MHz. [page 26] shows the ADCLKPS and CPS clock pre-scaler setup which is able to scale the clock by powers of 2. In other words, it seems impossible to achieve the maximal sampling frequency without setting the HISCLK to 25 or 50 MHz (divide main clock by 3 or 6).
Am I allowed to rewrite SysCtrlRegs.HISPCP.all in a custom initialisation function?
Piece of generated code:
void InitPeripheralClocks(void)
{
EALLOW;
// HISPCP/LOSPCP prescale register settings, normally it will be set to default values
SysCtrlRegs.HISPCP.all = 0x0001;
SysCtrlRegs.LOSPCP.all = 0x0002;
...
...
}
Thanks in advance.

Answers (0)

Categories

Find more on DSP System Toolbox Supported Hardware in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!