software reset for STM32f302vb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-12 11:40 PM
i have flashed RTOS firmware at location 0x8000000. i have another firmware(led blink) at location 0x8001e00. i am unable to jump from 0x8001e00 to 0x8000000 location. but i am able to jump from 0x8000000 to 0x8001e00(led bllink) and it is working.
please suggest.
- Labels:
-
RESET
-
STM32F3 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-13 12:30 AM
NVIC_SystemReset() should do the trick.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-13 12:32 AM
NVIC_SystemReset() is not working in my case. that is why i am using jump for that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-13 12:40 AM
So neither a jump nor a software reset works, what does work then?
- Does it start on power-on?
- Does it start when the reset pin is grounded?
- Can you start it from a debugger?
- What does it do when you attempt to start it? Does it end up in the reset handler, or somewhere else? Where?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-13 12:46 AM
working conditions:
- jumping from RTOS firmware to NON-RTOS firmware is working.
- jumping from NON-RTOS firmware to NON-RTOS firmware is working.
- jumping from NON-RTOS firmware to RTOS firmware is not working.
answer to the Q
- Does it start on power-on?
- yes
- Does it start when the reset pin is grounded?
- yes
- Can you start it from a debugger?
- yes, but with timing issue
- What does it do when you attempt to start it? Does it end up in the reset handler, or somewhere else? Where?
- power on time, it is starting normally
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-13 12:55 AM
And what happens when you jump to the application at 0x08000000?
- Via NVIC_SystemReset()
- Via jump instruction
What address should it jump to, where does it jump to instead?
By the way, how do you jump to it?
What are the first 8 bytes at 0x08000000?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-13 1:06 AM
there is two different firmware available in flash .
- PROJ1_FLASHADDR
- PROJ2_FLASHADDR
below are the codes which is used for jump:
#define PROJ1_FLASHADDR 0x08000000U
#define PROJ2_FLASHADDR 0x0801E000U
__disable_irq();
/* Get the main application start address */
uint32_t jump_address = *(__IO uint32_t *)(PROJ1_FLASHADDR + 4);
/* Set the main stack pointer to to the application start address */
__set_MSP(*(__IO uint32_t *)PROJ1_FLASHADDR);
/* Create function pointer for the main application*/
void (*pmain_app)(void) = (void (*)(void))(jump_address);
/* Now jump to the main application*/
pmain_app();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-13 1:07 AM
after jumping at location 0x08000000. firmware getting stuck.
may be program counter is not increasing(just guess)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-13 1:26 AM
Where does the above code actually jump to?
What are the first 8 bytes at 0x08000000?
You disable interrupts with __disable_irq(), does the other application enable them?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-13 1:56 AM
below are details of first 8 byte :
after jump when i am trying to enable irq in called firmware then system is not reponding.
