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.

Infinite loop in CommonROM_Init()?

I am trying to compile and run the SimpleBleBroadcaster project in found in c:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble.  I am using a SmartRF06 evaluation board.

The code never returns from the call to CommonROM_Init().  I found the source code, and I suspect the while( !i ) loop is getting me:

void CommonROM_Init( void )
{
volatile uint8 i;

// verify the Controller ROM image
i = validChecksum(&__checksum_begin_CommonROM, &__checksum_end_CommonROM);

// trap a checksum failure - what now?
while( !i );

// execute the Common ROM C runtime initializion
// Note: This is the ROM's C Runtime initialization, not the flash's, which
// has already taken place.
RT_Init_CommonROM();

// initialize ICall function pointers for Common ROM
// Note: The address of these functions is determined by the Application, and
// is passed to the Stack image via startup_entry.
*icallCmnRomDispatchPtr = (uint32)ICall_dispatcher;
*icallCmnRomEnterCSPtr = (uint32)ICall_enterCriticalSection;
*icallCmnRomLeaveCSPtr = (uint32)ICall_leaveCriticalSection;

// initialize RAM pointer to R2F Flash JT for Common ROM code
*r2fCmnRomPtr = (uint32)R2F_Flash_JT_CommonROM;

// initialize RAM pointer to R2R Flash JT for Common ROM code
*r2rCmnRomPtr = (uint32)R2R_Flash_JT_CommonROM;

return;
}

So, my question is, what is being checksumed, and how do I make it correct?

  • Hi Todd,

    Something is not right, this shouldn't fail here. Are you using pre-production silicon (obtained prior to Feb 2015)?

    Best wishes
  • Hi Todd,

    Can you provide details on tool versions and chip revision (check with SmartRF Flash Programmer)?

    This should work out of the box and it does on my installation at least by using a new (rev 2.2) device and doing the following:
    - Compile the stack, download, quit debugging (ignore warning on interrupt vector table. This is found in application image)
    - Compile the application, download, run.

    The checksum calculation simply performs a one-shot CRC check of the ROM contents and compares it to the CRC checksum stored in ROM.

    If you are using IAR it should be possible to set a breakpoint at CommonROM_Init() -after- you have initiated a debug session of the application to make sure this is actually where it stops.

    .:svend
  • Todd,

    An update here:

    ROM verification in SW was put in place in pre-release software before we verified ROM contents in production. Parts of ROM are verified in two places: ROM_init.c and CommonROM_init.c (from the stack project).
    These checks could be removed to reduce startup time from boot and initialization.

    .:svend