Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

[ARM] Bootloader for stm32f103rb

Status
Not open for further replies.

behnam9200

Newbie level 2
Joined
Apr 29, 2015
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
14
Hi guyz,

I've programmed a bootloader for STM32f103rbt6 and runs my application at address 0x8009000

bootloader jumps to app address and works fine.

but when I add RCC_Init() and initialize MicroSd memory in my bootloader project, the bootloader can not jump to 0x8009000

note that Initializing MicroSd send some commands via spi to configure it, not initializing SPI.

here's jumping code:
Code:
typedef void __attribute__((noreturn)) (*exec)();
			uint32_t *start ;
				
				/* Initialize user application's Stack Pointer */
				__set_MSP(*(__IO uint32_t*) APPLICATION_START_ADDRESS);
		
					// jump to the new binary
			start = (uint32_t*) (APPLICATION_START_ADDRESS + 4); // address of the reset vector for the new binary
			((exec)(*start))();
P.S: I dont know why below jump code doesnt work:

Code:
typedef  void (*pFunction)(void);
pFunction Jump_To_Application;
uint32_t JumpAddress;

JumpAddress = *(__IO uint32_t*) (APPLICATION_START_ADDRESS + 4);
      /* Jump to user application */
      Jump_To_Application = (pFunction) JumpAddress;
      /* Initialize user application's Stack Pointer */
      __set_MSP(*(__IO uint32_t*) APPLICATION_START_ADDRESS);
      Jump_To_Application();
any idea?

best regards
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top