using the UART

Post here first, or if you can't find a relevant section!
Post Reply
yldzmuhammed
Posts: 5
Joined: Mon Feb 06, 2017 9:55 am

using the UART

Post by yldzmuhammed » Mon Feb 06, 2017 2:03 pm

I have another question. But not like before.

If i want to use full modem uart, how can i do it? Is it same as arduino (i dont know yet, if arduino can do or cant do it)?

User avatar
RogerClark
Posts: 7137
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: How to flash STM32_F4VE

Post by RogerClark » Mon Aug 07, 2017 9:07 pm

Perhaps @danieleff has already put this code into his STM32 GENERIC core, but in case it's not...

I found this.

https://community.st.com/thread/40238-s ... m-software

Code: Select all

typedef  void (*pFunction)(void);
pFunction JumpToApplication;
uint32_t JumpAddress;

HAL_RCC_DeInit();

SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;


/**
 * Step: Disable all interrupts
 */
__disable_irq();

/* ARM Cortex-M Programming Guide to Memory Barrier Instructions.*/
__DSB();
       
__HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH();

/* Remap is bot visible at once. Execute some unrelated command! */
__DSB();
__ISB();

JumpToApplication = (void (*)(void)) (*((uint32_t *)(0x1FFF0000 + 4)));
          
/* Initialize user application's Stack Pointer */
__set_MSP(*(__IO uint32_t*) 0x1FFF0000);

JumpToApplication();


Post Reply