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.

MCU-PLUS-SDK-AM263PX: Dual unhalting of cores R5FSS0-1 and R5FSS1-1

Part Number: MCU-PLUS-SDK-AM263PX

Tool/software:

Hello, question for the SDK experts for AM263P.

Background is that I'm having issues with core1-1 failing to start after jump to application, whereas after a CPU reset the core works as expected.

I'm using SDK version 10_01_00_31. Have noticed this is also the case for version 10_02_00_15.

Before image sections are loaded into their respective sections for each core in the various SBLs (e.g. sbl_ospi_multicore_elf) through function Bootloader_parseAndLoadMultiCoreELF(), we need to initialise lockstep/dual core config for each r5f island. To achieve this, Bootloader_initCpu() is run for each core (if sections are present for that core).

Through initCpu, Bootloader_socCpuPowerOnReset() is run for each core. If dual core mode is selected for either RFSS0 or RFSS1, a core unhalt is added in (through Bootloader_socCpuResetRelease) for core1 for the respective island:

RFSS0:

RFSS1:

However, the initCpu functions are run before any sections are loaded in for the respective core. As such, for dual core mode, this seems to be unhalting core0-1 and core1-1 prematurely, as the core might try access particular code before it's loaded to the relevant tcma/ocram section.

Unhalts for all cores happen as well as part of Bootloader_runCpu functions, at end of the SBL, just before core self reset. This seems to be the proper place for the unhalt to occur.

What's the reason for the unhalt for cores0-1 and 1-1 before this point, at initCpu?

Thanks, Rens

  • Can confirm that this was causing an issue on a Launchpad application for a HS-SE device. The premature unhalt was causing core3 to go into exception as code was not loaded to the correct regions yet. With the calls to Bootloader_socCpuResetRelease() commented out and only relying on the final SBL individual core unhalt, core3 runs as expected.

    The unhalt call must be some kind of legacy code?

    Thanks, Rens

  • Hi Rens,

    Yes, you're right. The CPUs need to be unhalted only after the memories are loaded with instructions. Else, it can result in an exception as observed by you. Let me file an internal bug to fix this in the next SDK release.

    Thanks,

    Sahana

  • Ok, thanks for the confirmation Sahana.