Is Luos for me? 🤔

My board crashes when a detection occurs

Symptom(s)

When you run a detection by adding a gate to your network or from your application, your board crashes and the MCU goes into a Default_Handler:Infinite_Loop.

Possible explanation

You may change the definition of Luos HAL in node_config.h to fit with your design and your MCU. Luos HAL uses macro to define IRQ handler. However, in the case of pinout in some MCUs, the declarations of IRQ handler are in the a special file IT.c.

Resolution

Luos uses IRQ for the PTP pin, so if you redefine the PTP pin to fit with your design, check if there is an IT.c file and adapt the redefinition in the IRQ Handler.

Example and Solution

Example for STM32 in the file STM32f0xx_it.c:

default configuration :

void EXTI4_15_IRQHandler(void)
{
    HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_8);//PTPA
    HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_13);//PTPB
}

after redefinition:

void EXTI3_IRQHandler(void)
{
    HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_3);//PTPB

}

void EXTI4_15_IRQHandler(void)
{
    HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_9);//PTPA
}

Associated documentation page(s):