Post Go back to editing

secondary boot ldr from a different spot in flash

Thread Summary

The user is trying to boot a different LDR from a different starting address in SPI flash on the ADSP-21593, similar to a previous solution for ADSP-21565 and 21569. The final answer provides a reference to an ADSP-21593 SSL example on Ezone, suggesting the user modify the code accordingly. The solution involves configuring the SPU secureP registers and using the ROM API call `adi_rom_Boot` with the correct boot image starting address.
AI Generated Content
Category: Software
Product Number: ADSP-21593
Software Version: 2.10

I have been working with ADSP-21593 and I can generate ldr files that properly boot from the start of a spi flash.   My question is how can I boot a different ldr that is saved from a different starting address of the spi flash. 

In a previous inquiry years back, I have been asking how to do this same step with ADSP-21565 and 21569. I got the following code from ADI. 

// This is a formula provided by ADI.

// For SSL make sure that stack of the primary application does not coincide with that of secondary booting application.
// One way to do this is to remap the stack of the primary application to Boot ROM stack space dynamically before calling the ROM API.
// This is done in the following code snippet. Also cache is disabled for the 8KB region used by the ROM.

*pREG_SHL1C0_CFG2|=0xF00 ;
*pREG_SHL1C0_RANGE_START4 = 0x200FE000 ;
*pREG_SHL1C0_RANGE_END4 = 0x200FFFFF ;

asm("#include <sys/def215xx_core.h>");
asm("IRPTL = 0;");
asm("MMASK = BITM_REGF_MMASK_BR8|BITM_REGF_MMASK_BR0|BITM_REGF_MMASK_IRPTEN|BITM_REGF_MMASK_ALUSAT|BITM_REGF_MMASK_TRUNCATE|BITM_REGF_MMASK_PEYEN|BITM_REGF_MMASK_BDCST9|BITM_REGF_MMASK_BDCST1;");
asm("IMASK = BITM_REGF_IMASK_EMUI|BITM_REGF_IMASK_RSTI|BITM_REGF_IMASK_PARI|BITM_REGF_IMASK_ILOPI|BITM_REGF_IMASK_CB7I|BITM_REGF_IMASK_IICDI|BITM_REGF_IMASK_SOVFI| BITM_REGF_IMASK_ILADI; nop;");
asm("B7 = 0x200FF400;\
I7 = ((0x200FF400 + 0xc00 - 1)-((0x200FF400 + 0xc00 - 1) % 4) );\
L7 = (( 0xc00 - ((0x200FF400 + 0xc00 - 1) % 4) )/4);\
B6 = B7;\
I6 = I7; \
L6 = L7;");

// Configuring the SPU secureP registers for boot peripheral to do secure access to memory

*pREG_SPU0_SECUREP110= 0x3; //MDMA0_SRC
*pREG_SPU0_SECUREP111= 0x3; //MDMA0_DST

*pREG_SPU0_SECUREP77 = 0x3;
*pREG_SPU0_SECUREP78 = 0x3;
*pREG_SPU0_SECUREP81 = 0x3;

// ROM API Call which can be invoked based on some conditions /


// boot_image_starting_address = 0x030000;
adi_rom_Boot( boot_image_starting_address,0,0,0,0x10202);//

NOP;
while(1); // at this point it should have booted from flash memory.

Note that the code above works and thank you again for that. 

Now I am trying to translate it to 21593 code base and if I use the same code, it would not boot a tested ldr placed on a known spi address offset. 

Please let me know if there are adjustments in the code that I should add knowing that the memory boundaries might be a little different since

21593 is dual core and other aspects that I may not know.

Thank you in advance. 

EE

Parents Reply Children
No Data

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.