ΣSigmaStudio Ask AI Русский Log in

Booting Flash

Processors & DSP SVA Sep 18, 2019 00:00 3 replies Original on forum ↗
Subscribe
SVA Question
Sep 18, 2019 00:00

Hi,

Can anyone verify that the main structure is correct?, or if not, what is the correct way.

I want to write/read the .ldr into flash, and then boot the flash to run the application. Here is my main structure:

void main(void)
{
Init_pinmux();
Init_SPI2();
Verify_flash_codes();

Erase_flash(WR_Block_ID, sizeof(Write_BUFF));
Write_flash(WR_Block_ID, Write_BUFF, sizeof(Write_BUFF));
Read_flash (RD_Block_ID, Read_BUFF, sizeof(Read_BUFF));

//Boot command

uint32_t spimBootCommand = ((ENUM_ROM_BCMD_DEVICE_SPI) |
(0x2 << BITP_ROM_BCMD_SPIM_SPEED) |
(0x2 << BITP_ROM_BCMD_SPIM_ADDR) |
(0x1 << BITP_ROM_BCMD_SPIM_BCODE) |
(ENUM_ROM_BCMD_DEVENUM_2));

adi_rom_Boot(SPIADDR,BITM_ROM_BFLAG_HOOK,0,&ConfigureForSecureBoot, spimBootCommand);

}

Can I use the adi_rom_Boot() just after flash read is finished?. Anyway, I am not able to boot the flash and it is hanging in adi_rom_Boot().

Thanks

Anand Selvaraj Reply
Sep 30, 2019 00:00

Hello,

This issue is handled through private support. To avoid duplication of efforts, you can continue the discussions through private support and we will post the final resolution here.

Regards,
Anand Selvaraj.

Maximliano_Z Reply
Feb 25, 2020 00:00

Hi Anand Selvaraj,

I would like to know what is the answer for that question: "Can I use the adi_rom_Boot() just after flash read is finished?"

I am trying to do the same and it doesn&acute;t work for me . I need two different memory maps for some reason. (.ld files one allows me to boot the other one to open the SPI object. but not both at the same time)
I have sent plenty of email and I have posted here as well but still don&acute;t have any replay.

wanna know at least if that is possible to orientate my work.

thanks
Regards

Anand Selvaraj Reply
Mar 25, 2020 00:00

Hello ,

This case has been already answered by the following Ezone thread, link

Regards,
Anand Selvaraj.