2022-08-31 09:46 PM
Hi,
I have an issue with calling Timer13 from model.cpp. For instance, htim13.Instance->CCR1 = 95. for instance fails to load. Wasn't a problem for CM7.
c:\st\stm32cubeide_1.7.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: ./Application/User/gui/Model.o: in function `Model::PWM_DELTA(int)':
C:/TouchGFXProjects/AUGV.08.30.2002/CM7/TouchGFX/gui/src/model/Model.cpp:23: undefined reference to `htim13'
#include <gui/model/Model.hpp>
#include <gui/model/ModelListener.hpp>
#include "stm32h7xx_hal.h"
extern TIM_HandleTypeDef htim13;
Model::Model() : modelListener(0)
{
}
void Model::tick()
{
}
void Model:: PWM_DELTA(int value)
{
value = value * 9.70; //constant to allow 0-100 percent
htim13.Instance->CCR1 = 95; //change dutyclycle
}
I've written this code multiple times without issue utilizing one processor (CM7). Now I'm using CM4 for PWM, I have a handler failure that I can't resolve.
I just downloaded RM0399 Reference manual so, I still need help. Anyone?
One thing I forgot to mention is that I do have the PWM signal on the scope. So the timer has started.
Hiram
Solved! Go to Solution.
2022-09-01 12:03 AM
All,
I found the answer! I'm so used to working with a single processor that I just didn't think that I need to just add TIM_HandleTypeDef htim13; and not extern TIM_HandleTypeDef htim13;
Thanks anyway!
Hiram
2022-08-31 09:54 PM
Anyone has a possible clue?
2022-09-01 12:03 AM
All,
I found the answer! I'm so used to working with a single processor that I just didn't think that I need to just add TIM_HandleTypeDef htim13; and not extern TIM_HandleTypeDef htim13;
Thanks anyway!
Hiram