cancel
Showing results for 
Search instead for 
Did you mean: 

SBSFU issue with SysTick

MHoss.1
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Jocelyn RICARD
ST Employee

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

View solution in original post

3 REPLIES 3
Arno1
Senior

Hi ,

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

Jocelyn RICARD
ST Employee

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

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.