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.

AM263P4: R5FSS0-1 TCMB problem of SBL OSPI multicore elf and HS-SE state

Part Number: AM263P4
Other Parts Discussed in Thread: UNIFLASH, SYSCONFIG

Hi, TI experts.

The first phase of my AM263P4 development work is almost complete in HS-FS state.

 

Before product test in customer site, I am trying to changing my board to secure mode.

(1) I made one of my custom boards to HS-SE device.

(2) I made HSMRt firmware for my HS-SE device.

(3) I modified devconfig.mak from the original file below

    DEVICE_TYPE?=HS
    KD_SALT={somewhere}/kd_salt.txt
    CUST_MPK={somewhere}/mcu_custMpk.pem
    CUST_MEK={somewhere}/mcu_custMek.key
    ENC_ENABLED?=yes

(3) I built SBL_UART_UNIFLASH and SBL_OSPI again for my HS-SE device with modified devconfig.mak and HSMRt firmware.

(4) I built my application again for my HS-SE device with modified devconfig.mak.

 

Then I boot the result in OSPI boot mode but the progress is stopped at SBL_OSPI program.

After some inspection of SBL_OSPI program progress, I found the stop point below.

status = Bootloader_parseAndLoadMultiCoreELF(bootHandle, &bootImageInfo);

 

Instead of my application, I tested empty system project in the same process and succeeded in operation of the program.

After changing and modification of project files, I conclude that if TCMB of R5FSS0-1 is used in HS-SE state, SBL OSPI stops in Bootloader_parseAndLoadMultiCoreELF function.

  • SBL OSPI program had no problem in HS-FS state.
  • Only R5FSS0-1 TCMB made a problem in SBL OSPI boot.
  • When I removed initialized variable and executable code in R5FSS0-1 TCMB, SBL OSPI had no problem.

 

I attached my simple test codes for R5FSS0-1 of empty system project.

empty.c (a modified file)

#include <stdio.h>
#include "ti_drivers_config.h"
#include "ti_drivers_open_close.h"
#include "ti_board_open_close.h"


volatile float temp_data;

// case 1 : initialized data in TCMB
float data_preset __attribute__((section(".data.TCMB"))) = {0};

// case 2 : place code in TCMB
void __attribute__((section(".text.TCMB"))) background_variable(void)
{
    // make this function size not too small in order not to make this function optimized
    temp_data = data_preset;    temp_data = data_preset+1;  temp_data = data_preset+2;
    temp_data = data_preset+3;  temp_data = data_preset+4;  temp_data = data_preset+5;
    temp_data = data_preset+6;  temp_data = data_preset+7;  temp_data = data_preset+8;
    temp_data = data_preset+9;  temp_data = data_preset+10;
}

void empty_main(void *args)
{
    Drivers_open();
    Board_driversOpen();

    while(1)
    {
        background_variable();
    }

    Board_driversClose();
    Drivers_close();
}

user.cmd (an additional file)

SECTIONS
{
    .data.TCMA : {} > R5F_TCMA, palign(8)
    .data.TCMB : {} > R5F_TCMB, palign(8)
    .data.OCRAM : {} > OCRAM, palign(8)

    .text.TCMA : {} > R5F_TCMA, palign(8)
    .text.TCMB : {} > R5F_TCMB, palign(8)
    .text.OCRAM : {} > OCRAM, palign(8)
}

MEMORY
{
}

Case 1 or Case 2 make the memory usage in TCMB.

(Not-initialized data defined in TCMB did not make a problem.)

 

My application must use TCMB memory due to its size and execution speed limitations.

May I get the solution for this problem as soon as possible?

 

Regard,

Jeeuk Chang