cancel
Showing results for 
Search instead for 
Did you mean: 

Code jumping unexpectedly to 0xfffffffe

RBT-ES
Associate III

Hi, 

After successful coding, I suddenly stumbled on this error. I'm simply running this code:

 

 

HAL_Init();

  /* USER CODE BEGIN Init */

  /* USER CODE END Init */

  /* Configure the system clock */
  SystemClock_Config();

  /* USER CODE BEGIN SysInit */

  /* USER CODE END SysInit */

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_DMA_Init();
  MX_I2C1_Init();
  MX_USART2_UART_Init();

 

 

 And at the point of  MX_USART2_UART_Init(); it crashes and goes to 0xfffffffe. Any guesses why? It seems like as soon as it tries to do something with the GPIO, it instantly crashes. First it seemed like my linker file offset was wrong, and after changing it worked again, but the next day it was just stuck again. Any guesses?

Edit: It's time related. A 10ms delay makes it crash instantly after the delay

1 ACCEPTED SOLUTION

Accepted Solutions

Okay I was being ***. You need to change your start address in both your linker file, and in your sysmem file. Otherwise your vector table is located at the wrong place and results in hard fault.

View solution in original post

3 REPLIES 3

Which STM32?

What hardware, is it a "known good" board like Nucleo or Disco?

JW

Totally forgot to add this info. It's a STM32L452RE. It's resoldered on a nucleo l476rg board because we switched processors. I have two boards doing exactly the same. It should be my code that's faulty, because I also have a bootloader and that's running just fine.

Okay I was being ***. You need to change your start address in both your linker file, and in your sysmem file. Otherwise your vector table is located at the wrong place and results in hard fault.