Custom boot loader with SDRAM configuration not working

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Custom boot loader with SDRAM configuration not working

382 次查看
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 项奖励
回复
1 回复

326 次查看
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 项奖励
回复