Post Go back to editing

Simple program to test ADSP-21488

Hello, could any one show example how to test my setup ?
( i made flash programmer, and development board,25MHz CLK, Boot config SPI_MASTER (01), and CLK konfig is 00)
In loader setup, should i sue SPI_FLASH, or SPI_MASTER ?

my program looks like this:

#include <def21488.h>

#include <cdef21488.h>

#include <math.h>

#include <SRU.h>

#include <asm_sprt.h>

asm("#include <def21489.h>");

#define NOP asm volatile("nop;")

void initPLL(void);

void Mandelbrot(float zoom);

int main( void )

{

    initPLL();

    asm("bit clr FLAGS FLG1;"); //CS LOW

    asm("bit set FLAGS FLG1;");//CS HIGH”

   

     while(1)

     {

        asm("bit clr FLAGS FLG1;"); //CS LOW

        asm("bit set FLAGS FLG1;");//CS HIGH”

      }

   

}

void initPLL(){

int i, pmctlsetting;

    // Set INDIV bit in PMCTL register

    pmctlsetting = *pPMCTL;

    pmctlsetting |= INDIV;

    *pPMCTL= pmctlsetting;

    // Program PLL multiplier to same value as CLK_CFGx pins/previously programmed value in software……

    *pPMCTL = pmctlsetting;

    // then place PLL in bypass mode

    pmctlsetting |= PLLBP;

    *pPMCTL = pmctlsetting;

    //Wait for recommended number of cycles

    for (i=0; i<4096; i++)

          NOP;

    // Bring PLL out of bypass mode by clearing PLLBP bit

    *pPMCTL ^= PLLBP;

    for (i=0; i<16; i++)

          NOP;

    pmctlsetting = *pPMCTL;

    // Clear the previous PLL multiplier

    pmctlsetting &= ~PLLM63;

    // Clear the INDIV bit

    pmctlsetting &= ~INDIV;

    // or set the INDIV bit

    // *pMCTL |= INDIV;

    *pPMCTL= pmctlsetting;

   

    // CLKIN= 25 MHz, Multiplier= 16, Divisor= 2, CCLK_SDCLK_RATIO 2.5.

    // Fcclk = (CLKIN * 2 * M) / (N * D)

    // VCO frequency = 2*fINPUT*PLLM = 2*25*16 = 800 <= fVCOmax (800 MHz)

    // M = 1 to 64, N = 2,4,8,16 and D = 1 if INDIV = 0, D = 2 if INDIV = 1

  

    pmctlsetting=SDCKR2_5|PLLM16|DIVEN|PLLD2;

    *pPMCTL= pmctlsetting;

    pmctlsetting|= PLLBP;    //Setting the Bypass bit

    pmctlsetting^= DIVEN;    //Clearing the DIVEN bit

    *pPMCTL= pmctlsetting;    // Putting the PLL into bypass mode

    //Wait for around 4096 cycles for the pll to lock.

    for (i=0; i<5000; i++)

          NOP;

       pmctlsetting = *pPMCTL;

    pmctlsetting ^= PLLBP;          //Clear Bypass Mode

    *pPMCTL = pmctlsetting;

     for (i=0; i<16; i++)

          NOP;

  

}
Problem, i don't get any FLAG1 toggle, and i really don't know why,  (Photo of home made board for ADSP-21488, later it will be used in my master degree work, in university)