Skip to main content
Explorer II
November 13, 2023
Solved

STM32L4 JTAG + interrupt => Break at address "0x1fff2d58" outside of program code + overcurrent

  • November 13, 2023
  • 2 replies
  • 1736 views

Hello,

I am using a sTM32L430 with a JTAG access throgh ST LINK V2 and STM32CubeIDE. The project has a few GPIO to debug and an USART to generate interrupts:

mich35_0-1699882454696.png

 

To try to undersand my problem I build a small project with STM32CubeMX to have code genrated by STM and not by me.

I added a few code to remove data from the USART BX buffer and to toggle debug pins.

 

 

void USART3_IRQHandler(void)
{
 /* USER CODE BEGIN USART3_IRQn 0 */
 int val;

 /* USER CODE END USART3_IRQn 0 */
 /* USER CODE BEGIN USART3_IRQn 1 */
 LL_GPIO_TogglePin(GPIOH, LL_GPIO_PIN_0);
	val = LL_USART_ReceiveData8(USART3); //read byte to clear RXNE flag
 val++;
 /* USER CODE END USART3_IRQn 1 */
}
int main(void)
{
 /* USER CODE BEGIN 1 */

 /* USER CODE END 1 */

 /* MCU Configuration--------------------------------------------------------*/

 /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
 LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_SYSCFG);
 LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR);

 /* System interrupt init*/
 NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);

 /* SysTick_IRQn interrupt configuration */
 NVIC_SetPriority(SysTick_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(),15, 0));

 /* 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_USART3_UART_Init();
 /* USER CODE BEGIN 2 */

 /* USER CODE END 2 */

 /* Infinite loop */
 /* USER CODE BEGIN WHILE */
 while (1)
 {
 /* USER CODE END WHILE */

 /* USER CODE BEGIN 3 */
 __delay_cycles(1000000);
 LL_GPIO_TogglePin(GPIOH, LL_GPIO_PIN_1); // Green led
 }
 /* USER CODE END 3 */
}

 

 

I load and run the program. If an interrupt occurs during debugging I have the following issue:

Program stops (led do not toggles) and current consumption increases from 2mA to 14mA. If I click on the suspend button I have the following message:

Break at address "0x1fff3f36" with no debug information available, or outside of program code.

This address is inside the System memory.

When I have interrupts while not in debugging mode there is no issue at all.

Do you have any suggestion for this issue which prevents me of debugging capabilities?

Best regards

Mich

 

 

 

    This topic has been closed for replies.
    Best answer by mich35

    It seems to be linked to a solder issue around the LSE quartz.

    The microC reacts differently when started from JTAG or from power on...

    2 replies

    Super User
    November 13, 2023

    boot0 pin (PH3 ?) needs pulldown. or gnd . otherwise jumping to system bootloader mode...

    mich35Author
    Explorer II
    November 13, 2023

    PH3 has a pull-down

    mich35AuthorAnswer
    Explorer II
    November 16, 2023

    It seems to be linked to a solder issue around the LSE quartz.

    The microC reacts differently when started from JTAG or from power on...