This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F28m35x C28 boot from c28-ram using C-Boot ROM MTOC IPC Command

Other Parts Discussed in Thread: CONTROLSUITE

----------------------------------------------------------------------------------------------------------------------------------------------------------

1. Develope Board : H52C1 Concerto Experimenter Kit

http://www.ti.com/tool/tmdsdockh52c1

2. Concerto F28M35x Technical Reference Manual

http://www.ti.com/lit/ug/spruh22f/spruh22f.pdf

6.6.9 C-Boot ROM MTOC IPC Commands

3. controlSUITE

C:\ti\controlSUITE\device_support\f28m35x\v201\MWare\driverlib

----------------------------------------------------------------------------------------------------------------------------------------------------------

Hi

I want to boot c28 by using "C-Boot ROM MTOC IPC Commands" referenced form "Concerto F28M35x TRM - 6.6.9 "

So I make code m3 side that below add.

----------------------------------------------------------------------------------------------------------------------------------------------------------

... some intialize code first

// Define Local Variables
unsigned short ErrorCount = 0;
unsigned short usWWord16;
unsigned short *pWord16;
unsigned long ulWWord32;
unsigned long *pWord32;
unsigned short usRWord16;
unsigned long ulRWord32;
unsigned long *pulMsgRam;

unsigned long ulAddress=0;

unsigned int i,j,k,m,n;
unsigned char *pc;

ErrorFlag = 0;
usWWord16 = 0x1234;
ulWWord32 = 0xABCD5678;
usRWord16 = 0;
ulRWord32 = 0;

//-------------------------------------------------------------------------------------------------------

RAMControlInitM1MsgRam();// defined ram.h
RAMControlInitL0L3Ram();

//-------------------------------------------------------------------------------------------------------

UART_printf("sizeof(bootloader_c28)= %d\n\n",sizeof(bootloader_c28));
ulAddress=0x00;
for(i=0,k=0; i<(sizeof(bootloader_c28)/2); ++i,++ulAddress, k+=2)
{
      pWord16=&bootloader_c28[k];
      IPCLiteMtoCDataWrite(IPC_FLAG1, ulAddress,(unsigned long)(*pWord16), IPC_LENGTH_16_BITS, IPC_FLAG32);
      UART_printf("IPCLiteMtoCDataWrite: 0x%x = \t0x%x\n",ulAddress,(*pWord16));
      //SimpleDelay();


      while (IPCLiteMtoCGetResult(&usRWord16, IPC_LENGTH_16_BITS, IPC_FLAG32) != STATUS_PASS)
      {
      }
      if ((*pWord16) != usRWord16)
      {
            ErrorCount++;
            UART_printf("\tError #1\n");
      }
      UART_printf("\tIPCLiteMtoCGetResult: \t0x%x\n",usRWord16);

      usRWord16 = 0;
      UART_printf("IPCLiteMtoCDataRead: 0x%x\n",ulAddress);
      while (IPCLiteMtoCDataRead(IPC_FLAG1, ulAddress, IPC_LENGTH_16_BITS, IPC_FLAG32) != STATUS_PASS)
      {
      }
      // Result of Read will be read into usRWord16 variable.
      while (IPCLiteMtoCGetResult(&usRWord16,IPC_LENGTH_16_BITS, IPC_FLAG32) != STATUS_PASS)
      {
      }
      if ((*pWord16) != usRWord16)
      {
            ErrorCount++;
            UART_printf("\tError #2\n");
      }
      UART_printf("\tIPCLiteMtoCGetResult: \t0x%x\n\n",usRWord16);
      SimpleDelay();
}

----------------------------------------------------------------------------------------------------------------------------------------------------------

Result from UART

----------------------------------------------------------------------------------------------------------------------------------------------------------


sizeof(bootloader_c28)= 760

IPCLiteMtoCDataWrite: 0x0 = 0x40
IPCLiteMtoCGetResult: 0x40
IPCLiteMtoCDataRead: 0x0
IPCLiteMtoCGetResult: 0x40

IPCLiteMtoCDataWrite: 0x1 = 0x3af
IPCLiteMtoCGetResult: 0x3af
IPCLiteMtoCDataRead: 0x1
IPCLiteMtoCGetResult: 0x3af

IPCLiteMtoCDataWrite: 0x2 = 0x3af
IPCLiteMtoCGetResult: 0x3af
IPCLiteMtoCDataRead: 0x2
IPCLiteMtoCGetResult: 0x3af

IPCLiteMtoCDataWrite: 0x3 = 0x0
IPCLiteMtoCGetResult: 0x0
IPCLiteMtoCDataRead: 0x3
IPCLiteMtoCGetResult: 0x0

IPCLiteMtoCDataWrite: 0x4 = 0x761b
IPCLiteMtoCGetResult: 0x761b
IPCLiteMtoCDataRead: 0x4
Error #2
IPCLiteMtoCGetResult: 0x1

IPCLiteMtoCDataWrite: 0x5 = 0xfff0
IPCLiteMtoCGetResult: 0xfff0
IPCLiteMtoCDataRead: 0x5
IPCLiteMtoCGetResult: 0xfff0

IPCLiteMtoCDataWrite: 0x6 = 0xe200
IPCLiteMtoCGetResult: 0xe200
IPCLiteMtoCDataRead: 0x6
Error #2
IPCLiteMtoCGetResult: 0x7

IPCLiteMtoCDataWrite: 0x7 = 0xbd
IPCLiteMtoCGetResult: 0xbd
IPCLiteMtoCDataRead: 0x7
Error #2
IPCLiteMtoCGetResult: 0x0

IPCLiteMtoCDataWrite: 0x8 = 0xe630
IPCLiteMtoCGetResult: 0xe630
IPCLiteMtoCDataRead: 0x8
IPCLiteMtoCGetResult: 0xe630

...

...

IPCLiteMtoCDataWrite: 0x2d = 0xfff0
IPCLiteMtoCGetResult: 0xfff0
IPCLiteMtoCDataRead: 0x2d
IPCLiteMtoCGetResult: 0xfff0

IPCLiteMtoCDataWrite: 0x2e = 0xe200
IPCLiteMtoCGetResult: 0xe200
IPCLiteMtoCDataRead: 0x2e

Reboot hear and repeat first code

sizeof(bootloader_c28)= 760

IPCLiteMtoCDataWrite: 0x0 = 0x40
IPCLiteMtoCGetResult: 0x40
IPCLiteMtoCDataRead: 0x0
IPCLiteMtoCGetResult: 0x40

IPCLiteMtoCDataWrite: 0x1 = 0x3af
IPCLiteMtoCGetResult: 0x3af
IPCLiteMtoCDataRead: 0x1
IPCLiteMtoCGetResult: 0x3af

...

...

----------------------------------------------------------------------------------------------------------------------------------------------------------

Question

1.  Why the writed value is different at adress 0x04, 0x06, 0x07 ?

      My code is really wirte c28 ram adress 0x00000 ?

2.  Why reboot at adress 0x2e ?

Thank you for reading and i really need your help! 

  • if you are not running on REV0 of F28M35x then you need not do the below

    choi siyoung said:

    //-------------------------------------------------------------------------------------------------------

    RAMControlInitM1MsgRam();// defined ram.h
    RAMControlInitL0L3Ram();

    //-------------------------------------------------------------------------------------------------------

    Second thing is make sure you don't send IPC commands to write into the RESERVED RAM for the C-Boot ROM stack, this is documented in the TRM section 6.6.3

    Hope this helps.

     

    Best Regards

    Santosh