Custom boot loader with SDRAM configuration not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom boot loader with SDRAM configuration not working

108 Views
sandeepc
Contributor IV

Hi,

we are developing custom bootloader, we are facing some issues when we configured SDRAM its not jumping to the specified address.

Working:

let us consider: 

application two start address: 0x3022a000

Application one start address: 0x30025000

Binary file created with below memory configuration , and this file is writing respective Application one,

and its jumping to APP1 address it executing successfully.

 

sandeepc_0-1717151851502.png

 

 

Not working:

when We Configured SDRAM for storing string and sending through UART1 its not working.

When i configured SDRAM application not jumping to the specified location. its getting halt

code:

void JumpApplicationOne(void)

{

 

/*! @brief Jump to application function pointer datatype. */

typedef void (*F_Bootloader_Jump_t)(void);

PRINTF("jump_application1\n\r");

 

//NOTE: Don't modify the below code and no Debug printf

 

 

// Disable both D and I caches, Application will enable them back.

SCB_DisableDCache();

SCB_DisableICache();

// Data memory barrier.

__DMB();

DisableGlobalIRQ();

 

// Relocate vector table.

SCB->VTOR = (__IOM uint32_t)APP1_BASE_ADDRESS;

 

 

// Define Application function.

uint32_t jumpAddress = *(uint32_t*)(APP1_BASE_ADDRESS + 4U );

F_Bootloader_Jump_t jump = (F_Bootloader_Jump_t)jumpAddress;

 

// Set stack pointers to the Application stack pointer.

__set_MSP(*(uint32_t*)APP1_BASE_ADDRESS);

__set_PSP(*(uint32_t*)APP1_BASE_ADDRESS);

// Jump to Application.

jump();

 

}

 

 

 

image (1).png

 

 

How to resolve this issue.

if any further information required let me know.

@kerryzhou @RT1170 @bootloader 

Regards,

Sandeep C

 
 
 
0 Kudos
1 Reply

52 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello

How are you configuring the SDRAM, is it initialized through the application or DCD?
Is the SDRAM only storing data or it also contains executable functions? Could you lower the SDRAM so it is alias different from RAM?

Best regards,
Omar

0 Kudos