Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAlL_GetTick() returns 0, causing endless loop #122

Open
jlmxyz opened this issue Jun 26, 2022 · 1 comment
Open

HAlL_GetTick() returns 0, causing endless loop #122

jlmxyz opened this issue Jun 26, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jlmxyz
Copy link

jlmxyz commented Jun 26, 2022

the call stack :

HAL_SPI_TransmitReceive@0x080023fc (/home/jlm/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c:1304)
Encoder::readRegister@0x080050c6 (/home/jlm/crypt/Devel/3Dprinter/Intellistep-clean/src/hardware/encoder.cpp:241)
Encoder::getRawRev@0x080051b2 (/home/jlm/crypt/Devel/3Dprinter/Intellistep-clean/src/hardware/encoder.cpp:849)
Encoder::Encoder@0x08005714 (/home/jlm/crypt/Devel/3Dprinter/Intellistep-clean/src/hardware/encoder.cpp:174)
StepperMotor::StepperMotor@0x080066be (/home/jlm/crypt/Devel/3Dprinter/Intellistep-clean/src/hardware/motor.cpp:12)
__static_initialization_and_destruction_0@0x080080da (/home/jlm/crypt/Devel/3Dprinter/Intellistep-clean/src/main/main.cpp:337)
_GLOBAL__sub_I_motor@0x08008128 (/home/jlm/crypt/Devel/3Dprinter/Intellistep-clean/src/main/main.cpp:337)
__libc_init_array@0x0800bb08 (/__libc_init_array.dbgasm:24)
Reset_Handler@0x08001262 (/home/jlm/.platformio/packages/framework-arduinoststm32/variants/STM32F1xx/F103C8T_F103CB(T-U)/startup_M200_f103xb.S:125)

from what I see, when HAL_GetTick() is called, it always return zero...

but on // I don't understand what cause the encoder not to success the readRegister(ENCODER_ANGLE_REV_REG)

only on s42bv2 hardware (works on s57bv2)

@CAP1Sup CAP1Sup changed the title tic not updating? endless loop at HAL_SPI_TransmitReceive HAlL_GetTick() returns 0, causing endless loop Jul 1, 2022
@CAP1Sup CAP1Sup added the bug Something isn't working label Jul 1, 2022
@CAP1Sup CAP1Sup self-assigned this Jul 1, 2022
@CAP1Sup
Copy link
Owner

CAP1Sup commented Jul 1, 2022

Hmm... try building the firmware with the 72 MHz system clock. See if that fixes the issue. Sometimes the 128 MHz clock is actually too fast for the silicon of the STM32... it was never meant to be able to clock that fast. It actually tells you not to, but I haven't had any issues so far and it has a major speed improvement over 72 MHz.

Sorry for the delay in responding, I just returned from Spain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants