SBSFU issue with SysTick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-06 12:28 PM
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:
- 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).
- 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."
- Increased all NVIC priorities so to higher than 1 and the systick to 1 and it did not make any difference.
- 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.
- 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.
- 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.
Solved! Go to Solution.
- Labels:
-
STM32L4 series
-
SysTick
-
X-Cube-SBSFU
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-07 12:26 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-06 10:33 PM
Hi ,
Find the HAL_IncTick function in stm32xxxx_it.c probably and disable it and try running like that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-07 12:26 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-09 11:37 AM
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.
