Skip to main content
Associate
September 29, 2024
Solved

LED won't toggle

I am trying to toggle one of the LED lights of STM32 NUCLEO-L552ZE-Q board. I am working with the latest version of STM32CubeIDE 1.16.1. The steps I followed are given in the picture. However, I find this error when I debugg:

set *(int *)0xE000EDFC=*(int *)0xE000EDFC|0xFF0

Program received signal SIGINT, Interrupt.

0x080006bc in HAL_IncTick () at ../Drivers/STM32L5xx_HAL_Driver/Src/stm32l5xx_hal.c:303

303 }

 

Also, the pics show more. I tried many things to fix this issue but couldn't.

Has someone face the same issue and how did you solve it? Any help is highly appreciated.

This topic has been closed for replies.
Karl Yamashita
Karl YamashitaBest answer
Principal
September 29, 2024

I assume it compiles without errors? Can you program with STM32CubeProgrammer?

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source

23 replies

emb_rfAuthor
Associate
September 29, 2024

The images of the errors:

Screenshot 2024-09-29 020154.png

Screenshot 2024-09-29 020203.png

Screenshot 2024-09-29 020620.png

Am I doing something wrong in the configuration or ???

Tesla DeLorean
Guru
September 29, 2024

Perhaps start with one of the NUCLEO-L552 examples in the CubeL5 repository trees, and then add code for LED toggling to that?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
emb_rfAuthor
Associate
September 29, 2024

It didn't work unfortunately :(

Karl Yamashita
Principal
September 29, 2024

 

Why is your clock at 4MHz? Anyways, why don't you use the Board Selector which will make sure everything is optimally setup including the clock.

 

KarlYamashita_0-1727571852442.png

 

 

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
emb_rfAuthor
Associate
September 29, 2024

emb_rf_0-1727624275547.png

It didn't work. This was the result.

Karl Yamashita
Principal
September 29, 2024

Copy and paste the code you've written. Be sure to use the </> when posting the code.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
Karl Yamashita
Principal
September 29, 2024

The IOC file in your project

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
Karl Yamashita
Principal
September 29, 2024

Does the LED ever blink?

Or just errors during debugging?

 

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
emb_rfAuthor
Associate
September 29, 2024

Just errors during debugging. 

None of these blink.

emb_rf_0-1727638768178.png

 

Karl Yamashita
Principal
September 29, 2024

Not sure if it'll make a difference but you don't have debugging enabled.

KarlYamashita_0-1727639225043.png

 

I've tried on another Nucleo with Debug off and I don't run into errors. I have a counter variable that still counts up and updates in the Expressions. So that is why i say it may not make a difference if you do enable it.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
emb_rfAuthor
Associate
September 29, 2024

thank you, yes, I also have tried that, but no difference. Still I get the same problem. 

Karl Yamashita
Principal
September 29, 2024

I have a lot of Nucleo boards but unfortunately i don't have the one your have. Just out of curiosity, place a breakpoint on SystemClock_Config and MX_GPIO_Init and see if you can get past HAL_Init and SystemClock_Config functions without any errors?

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
emb_rfAuthor
Associate
September 29, 2024

No, unfortunately, it gives the same error.

emb_rf_0-1727642310086.png

emb_rf_1-1727642352790.png

 

 

 

Karl Yamashita
Karl YamashitaBest answer
Principal
September 29, 2024

I assume it compiles without errors? Can you program with STM32CubeProgrammer?

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
emb_rfAuthor
Associate
September 29, 2024

yes, no errors in compiling. Sure, I can give a try.