AnsweredAssumed Answered

booting issue

Question asked by McRock on Mar 3, 2014
Latest reply on Mar 3, 2014 by McRock

here is my code.

apprently what i am trying to do is to pull DPI_08 to GND when the program starts.

in emulation it works, but when i download it to flash nothing happens after power on..

so i need help locating the problem..

ps : i've set the AMI User Boot mode already.

 

#include <21489.h>

#include <Cdef21489.h>

#include <def21489.h>

#include <sru21489.h>

#include <signal.h>

#define INDIV0 0

#define ADSP_2147x_2148x_PLL_Init(Multiplier, Divider,Input_Divider, CCLK_SDCLK_ratio)\

          int cs_temp,cs_i;\

          cs_temp=*pPMCTL;\

          cs_temp&=~PLLD16

          cs_temp|= PLLD4 | DIVEN

          *pPMCTL = cs_temp;\

          for(cs_i=0;cs_i<16;cs_i++);\

          cs_temp&=~DIVEN;\

          cs_temp|=(INDIV | PLLBP);\

          *pPMCTL = cs_temp;\

          for(cs_i=0;cs_i<4096;cs_i++);\

          cs_temp=*pPMCTL;\

          cs_temp&=~PLLBP;\

          *pPMCTL = cs_temp;\

          for(cs_i=0;cs_i<16;cs_i++);\

          cs_temp = *pPMCTL;\

          cs_temp&=~(INDIV | PLLM63);\

          cs_temp|= (PLLM##Multiplier | INDIV##Input_Divider | PLLBP);\

          *pPMCTL = cs_temp;\

          for(cs_i=0;cs_i<4096;cs_i++);\

          cs_temp = *pPMCTL;\

          cs_temp&=~PLLBP;\

          *pPMCTL=cs_temp;\

          for(cs_i=0;cs_i<16;cs_i++);\

          cs_temp=*pPMCTL;\

          cs_temp&=~(PLLD16 | SDCKR3_5 | SDCKR4 );\

          cs_temp|= (PLLD##Divider | SDCKR##CCLK_SDCLK_ratio | DIVEN);\

          *pPMCTL=cs_temp;\

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

 

int main( int argc, char *argv[] )

{

          /* Begin adding your custom code here */

           ADSP_2147x_2148x_PLL_Init(16,2,0,4);

          AMI_Init();

          SRU(HIGH,DPI_PBEN08_I);

 

          SRU2(LOW,DPI_PB08_I);

          //SRU2(HIGH,DPI_PB08_I);

 

          for(;;)

          {

          asm("nop;");

          }

          return 0;

}

Outcomes