Skip to main content
MHoss.1
Associate III
July 6, 2020
Solved

SBSFU issue with SysTick

  • July 6, 2020
  • 2 replies
  • 1445 views

Hi,

I'm trying to port SBSFU example (L476 Nucleo) to L475 MCU for a custom board. My user app works fine without the SBSFU but when I combine them the clock breaks and HAL_Delay gets stuck. The UserApp of the example project however works fine. I have tried the following:

  1. Compared the clock settings in both of them (in stm32l4xx_hal_conf.h) and all the settings are the same (the SysTickPriority in the example is 0x0F which I changed to 0x0 to be like mine and it works fine).
  2. All the arguments and parameters of SysTick_Config() is the same for both cases however in the provided example I cannot watch the SysTick in eclipse expressions, it says "No symbol "SysTick" in current context."
  3. Increased all NVIC priorities so to higher than 1 and the systick to 1 and it did not make any difference.
  4. In the hal_conf.h of the example all the peripheral callback registers are set to zero using defines such as `#define USE_HAL_ADC_REGISTER_CALLBACKS 0U`. My code doesn't have anything like that but since it is generated with CubeMX I have assumed that it should be fine.
  5. My user app is larger than the example so I thought it might be dual ram issue as another question but defining two bank ram did not help either.
  6. I'm using the LL_CRC in my user app but the example has HAL_CRC. I don't think this makes any problem since I face the issue before any of the peripherals are initialized, just worth mentioning in case.

I'm not sure where to proceed from here so I appreciate any hints or ideas.

This topic has been closed for replies.
Best answer by Jocelyn RICARD

Hello,

did you relocate the vector table of your application like it is done in system_stm32l4xx.c in the original UserApp ?

#if defined(__ICCARM__)||defined(__GNUC__)

extern uint32_t __ICFEDIT_intvec_start__;

#define INTVECT_START ((uint32_t)& __ICFEDIT_intvec_start__)

#elif defined(__CC_ARM)

extern uint32_t Image$$vector_start$$Base;

#define INTVECT_START ((uint32_t)& Image$$vector_start$$Base)

#endif 

void SystemInit(void)

{

...

 SCB->VTOR = INTVECT_START; 

Best regards

Jocelyn

2 replies

Arno1
Senior
July 7, 2020

Hi ,

Find the HAL_IncTick function in stm32xxxx_it.c probably and disable it and try running like that

Jocelyn RICARD
Jocelyn RICARDBest answer
ST Employee
July 7, 2020

Hello,

did you relocate the vector table of your application like it is done in system_stm32l4xx.c in the original UserApp ?

#if defined(__ICCARM__)||defined(__GNUC__)

extern uint32_t __ICFEDIT_intvec_start__;

#define INTVECT_START ((uint32_t)& __ICFEDIT_intvec_start__)

#elif defined(__CC_ARM)

extern uint32_t Image$$vector_start$$Base;

#define INTVECT_START ((uint32_t)& Image$$vector_start$$Base)

#endif 

void SystemInit(void)

{

...

 SCB->VTOR = INTVECT_START; 

Best regards

Jocelyn

MHoss.1
MHoss.1Author
Associate III
July 9, 2020

Thanks, I had forgot to do it. Wish I had asked this sooner instead of spending a couple of weeks trying to debug the issue.