Post Go back to editing

Send a Second Stage SSL via SPI in Slave mode

Category: Software
Product Number: ADSP-2156x
Software Version: Custom board first draft.

Dear all,

Following the adsp-2156x_hdwr .pdf, I am loading the loader application, located at offset 0x000000 from the SPI external flash (IS25lp064A).


Before loading the application loader, I created a Second Stage Loader (SSL) that is sent via SPI2 Slave Select 1 (DSP SPI2 SLAVE BOOT MODE) from an STM32 configured as master SPI to an ADSP-21565.


The ADSP-21565 has SYS_BMODE0 set to 0 (SPI2 slave).


Please find below a graphical description of the process:

I am unable to boot my application via spi external flash.

In the table 40-17, the SSL is unable to configure the SPI2 as master and change the ROM_BCMD_SPIM_SSEL to 001 to select slave select 2.

Here is my SSL source code:

    *pREG_SPU0_SECUREP77 = 0x3;	/* SPI2TX DDE */
	*pREG_SPU0_SECUREP78 = 0x3; /* SPI2RX DDE */
	*pREG_SPU0_SECUREP81 = 0x3; /* SPI2 */

			/* SPI Boot (Legacy peripheral
			DMA) */	
	BootCmd = (2 << BITP_ROM_BCMD_DEVICE)
			 |(1 << BITP_ROM_BCMD_SPIM_ADDR) 	/* 24-bit */
			 |(0 << BITP_ROM_BCMD_SPIM_DUMMY) 	/* No dummy byte */
			 |(2 << BITP_ROM_BCMD_DEVENUM) 		/* SPI2 */
			 |(0 << BITP_ROM_BCMD_SPIM_NOAUTO) 	/* Automatic device detection disable. */
			 |(0 << BITP_ROM_BCMD_SPIM_HOST) 	/* Master boot mode */

	/* No call to ROM_BOOT_HOOK_FUNC1 ! */
	adi_rom_Boot((unsigned int *)SPI_FLASH_START_ADDRESS, 0, 0, 0, BootCmd);

Would it be possible to load the SSL via SPI2 using Slave Select 1 then switch via SSL adi_rom_Boot() to SPI2 Master Mode and Slave Select 2 and load my final code application loader from external flash?
I would appreciate it if you could let me know if I missed anything in my SSL or if it is not possible.