Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

OMAPL L137 BOOTING OPTION FROM SLAVE

$
0
0

HiI am trying to Boot omapl-137 using slave configuration(spi0)

I am able to achieve START  WORD SYNC AND OP CODE SYNC as mentioned in the booting document of bootloader of omapl137

I am using MCU as the master and DSP acts as slave .

I have attached my code for reference.

I have created a hex file out of binary file that is generated from AIS . I have attached that for reference.

I am trying to send each byte from the array mentioned below and appropriate format of 16 bit transferring through spi

void localb2uint(unsigned char *buf) ///unsigned char buf[]
{
   // unsigned  short int value1,value2,value3;
    unsigned  short int *value_pointer;
    static int counter =0;
    int i,k;
    int val;
    static int count;
           
    for(k=0 ; k<=8844 ;k+=2)  ////8646   8782
     {        
      value1=0x0000;
      value2=0x0000;
      value3=0x0000;
      counter++;
      value1=(int)*buf++;
      value2=(int)*buf++;
    //value_pointer = (short int *)&buf[k];
    //*value_pointer=((*value_pointer>>8) + (*value_pointer << 8));
      value3=( value1 + (value2 << 8) );
    

      switch(value3)
     {
         case DISABLE_CRC :
         send_char(' ');
         send_str("********************DISABLE_CRC********************");
         send_str("\n\r");
         send_char(' ');
         send_int(value1);
         send_char(' ');
         send_int(value2);
         send_char(' ');
         
         case SECT_LOAD:
         send_char(' ');
         send_str("********************SECT_LOAD********************");
         send_str("\n\r");
        
         ///opcode_sync();                                           //function call for opcode sync    
         ///send_receive_dummy_check(11,0x000A);                     //function call for dummy values write and read the same value
         send_char(' ');
         send_int(value1);
         //send_char(' ');
         //send_int(value2);
         //send_char(' ');
         break;
         
         case JUMP_CLOSE:
         send_char(' ');  
         send_str("*******************JUMP_CLOSE**********************");
         send_str("\n\r");
         send_char(' ');
         send_int(value1);
         send_char(' ');
         send_int(value2);
         send_char(' '); 
         send_char(' ');
         send_int(k);  
         opcode_sync();                                           //function call for opcode sync    
         send_receive_dummy_check(11,0x000A);                     //function call for dummy values write and read the same value
  
         break;
         
         case SEQ_READ:
         send_char(' ');
         send_str("********************SEQ_READ***********************");
         send_str("\n\r");
         send_char(' ');
         break;
         
         case FUNCTION_EXEC:
         send_char(' ');  
         send_str("********************FUNCTION_EXEC******************");
         send_str("\n\r");
         send_char(' ');
         send_int(value1);
         send_char(' ');
         send_int(value2);
         send_char(' ');
        //opcode_sync();                                           //function call for opcode sync    
        //send_receive_dummy_check(11,0x000A);                     //function call for dummy values write and read the same value
         
         break;
         case BOOT_TABLE :
         send_char(' ');
         send_str("********************BOOT_TABLE********************");
         send_str("\n\r");
         send_char(' ');
         send_int(value1);
         send_char(' ');
         send_int(value2);
         send_char(' ');
         //opcode_sync();                                           //function call for opcode sync    
         //send_receive_dummy_check(11,0x000A);                     //function call for dummy values write and read the same value
         break;
         case ENABLE_CRC :
         send_char(' ');
         send_str("********************ENABLE_CRC********************");
         send_str("\n\r");
         send_char(' ');
         break;
         case PING_DEVICE :
         send_char(' ');
         send_str("******************** PING_DEVICE********************");
         send_str("\n\r");
         send_char(' ');
         break;
        
    }
     
   
  
  sleep(50);
 /// sleep(5);
 
      sws_send_synchronisaton_spi2(value3);
      
      //sleep(1);
      //send_char(' ');
      //send_int(value1);
      //send_char(' ');
      //send_int(value2);
      //send_char(' '); 
      if(counter == 1000)
      {
         send_char(' ');
         send_str("****************BYTES WRITTEN***********************");
         send_str("\n\r");
         send_char(' ');
         send_int(k);
         send_char(' ');
         counter=0;
      }
     }    
   
     send_str("DONE"); 
     send_char(' ');
     send_int(k);
} 

and its called from the mcu application 

sws_sync(1); //function call for sws sync 
opcode_sync(); //function call for opcode sync 
send_receive_dummy_check(11,0x000A); //function call for dummy values write and read the same value

localb2uint(toggle_buffer);

Here I am able to get sws and opcode i i transfer all the content of hex file to DSP using SPI But iam not able to get the application running!

My hex file reference is as like

unsigned char toggle_buffer[8844]={0X54,0X49,0X50,0X41,0X63,0X59,0X53,0X58,0X0d,0X59,0X53,0X58,0X5,0X0,0X3,0X0
,0X2,0X2,0X1,0X16,0Xcb,0X1,0X5,0X0,0X3,0X0,0X0,0X0,0X7,0X59,0X53,0X58
,0X4,0X0,0X2,0X0,0X88,0X41,0Xc1,0X1,0X5,0X0,0X0,0X0,0X0,0X0,0X0,0X0
,0X0d,0X59,0X53,0X58,0X2,0X0,0X4,0X0,0X21,0Xc4,0X1,0X0,0Xc8,0X29,0X91,0X0e
,0X5,0X0,0X8,0X78,0X10,0X4,0X0,0X0,0X0d,0X59,0X53,0X58,0X6,0X0,0X1,0X0
,0X3,0X0,0X0,0X0,0X0d,0X59,0X53,0X58,0X6,0X0,0X1,0X0,0X3,0X0,0X1,0X0
,0X0d,0X59,0X53,0X58,0X6,0X0,0X1,0X0,0X3,0X0,0X2,0X0,0X0d,0X59,0X53,0X58
,0X6,0X0,0X1,0X0,0X3,0X0,0X3,0X0,0X0d,0X59,0X53,0X58,0X6,0X0,0X1,0X0
,0X3,0X0,0X4,0X0,0X0d,0X59,0X53,0X58,0X6,0X0,0X1,0X0,0X3,0X0,0X5,0X0
,0X0d,0X59,0X53,0X58,0X6,0X0,0X1,0X0,0X3,0X0,0X6,0X0,0X0d,0X59,0X53,0X58
,0X6,0X0,0X1,0X0,0X3,0X0,0X7,0X0,0X0d,0X59,0X53,0X58,0X6,0X0,0X1,0X0
,0X3,0X0,0X8,0X0,0X0d,0X59,0X53};

Have attached few elements for refernce where hex file has all the values relating to AIS commands
Kindly let me know what could to dodne to sync ,Kindly do not refer to the existing link. i have gone through the those stuff !








 

 


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>