2020-09-02 03:41 PM
I am trying to adapt an existing project that uses Keil RTX5 (RTOS2) which was written in C++ to include SBSFU functionality.
So far I have got the project to build. However I am not sure about the integrity of the build as Micro-lib does not support C++ so I had to exclude it in other to get the project to build.
Although the UserApp project that was part of the SBSFU example code had Micro-Lib enabled by default so not sure what impact this might have on the whole project.
When I run the code I get the following error
WARNING: A Reboot has been triggered by a Watchdog reset!
My question has anyone been able to use any RTOS preferably the Keil RTX5 the with SBSFU and if so how did you go integrating.
On enabling the RTOS it adds the following 3 function which conflicts with the default generated one in stm32h7xx_it.c.
/**
* @brief This function handles SVCall exception.
* @param None
* @retval None
*/
void SVC_Handler(void)
{
}
/**
* @brief This function handles PendSVC exception.
* @param None
* @retval None
*/
void PendSV_Handler(void)
{
}
/**
* @brief This function handles SysTick Handler.
* @param None
* @retval None
*/
void SysTick_Handler(void)
{
HAL_IncTick();
}
Below is some code fragment showing how I have adapted the existing UserApp to be used by the OS.
#ifdef __cplusplus
extern "C" {
#endif
extern void FW_APP_Run(void); // declared in the main.c file
void FwAppRunTask(void *argument)
{
FW_APP_Run(); // User App firmware runs and never returns
}
/*----------------------------------------------------------------------------
* Application main thread
*---------------------------------------------------------------------------*/
void app_main(void)
{
// System Initialization
SystemCoreClockUpdate(); // Initialize CMSIS-RTOS
osKernelInitialize();
osThreadNew(FwAppRunTask, NULL, NULL);
osKernelStart();
for (;;) {}
}
#ifdef __cplusplus
}
#endif
The function FwAppRunTask() is responsible for kicking the IWDG with the following line of code WRITE_REG(IWDG1->KR, IWDG_KEY_RELOAD);
but for some reason I am not convenience that the system tick timer is working hence the reason the watchdog is causing the board to reset.
2020-09-08 03:53 AM
Hi @Community member ,
You said in this thread "The issue reported in this thread has now been solved Thanks." when speaking about this current issue with @alister .
If it wasn't a misunderstood from my side and your SBSFU related problem was solved, could you please update us on the solution you find or the root cause of the problem?
Thanks.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2020-09-09 01:46 PM
Hi Amel,
Yes that particular issue was solved by the suggestion made by @M.Hajji . The problem was the power supply option that I selected for the STM32H7B3i-DK board. I was using PWR_LDO_SUPPLY option but in the board user manual UM2569 page 17, suggested to use PWR_DIRECT_SMPS_SUPPLY.
Talking about SBSFU related problem. No they are not all solved as I seemed to hit another problem one as soon as I get past the current. I am just about to send another post.