Hey, thanks for the comment! I'll definitely keep your suggestion in mind and make a video specifically discussing debouncing issues. Stay tuned for that! PR TechTalk
hello sir your way of keeping code small in callback function is cool but i was thinking when controller return from performing function which should be in callback function, will it continue it working from previous stage where it was interrupted?
Hi how much is the time between interrupt(falling or rising edge) and function and how we can decrease this time ? (Doing the function immediately after interrupt without any delay)
Hi, one way to measure the time taken is to count MCU cycles, take a note on the current counter on int and then when the callback have started , then you have your time. To minimize time then one way is to maximize clock frequency. Don't forget to hit the Subscribe button :-) /PR TechTalk
Hi Peter, many thanks for your video tutorials, I learned a lot from them! I tried to write a similar Main.c source code but accidentally added the Callback routine to the "User code begin 2" section. That way the code didn't work. I noticed my fault and moved the Callback routine to "User code begin 4". Do you have any idea why the "4" section is more proper than the "2" section? Both sections are directly in Main() and not within sub-routines. And I assume a Callback routine is called only in case of an interrupt. So I don't see why the position of the Callback routines are important. Thank you!
Hi Peter, I'm sorry, I just noticed that I'm wrong, the "User code begin 4" section is outside of Main(). I don't know what's behind this logic but I can accept it. I'm sorry for bothering you!
Hi Krisztian, greate that you found your bug on your own :-) Placing of code do have some impact. I normally place all callbackfunctions in Section 4 and al other rutines in Section 0. But then you also need to declare prototypes for these. You can also put your code in separate .c & .h files and just include them in your main file.
Hi and thanks for your suggestion, TrustZone is a good suggestion so hit the subscribe button and the bell to get notified when/if I release a video on this topic. /PR TechTalk
That is up to you to decide what you want to happen. Interrupt and callback is a way to organize your software, and their are several other methods that you can use or combine. Main Loop is One, RTOS is another. all have their pros and cons. /PR TechTalk
Hi Daniel; Ouups I found the error. 21:14 - 22:56. i did indeed put some code outside the "Begin" and "End" statement. if i would go to CubeMX and make any changes all this code would be gone. So thanks Daniel for having these Hawk Eyes. And if their are any other errors just let me know. /Pr TechTalk
I found this tutorial really helpful as I'm approaching CubeMX and CubeIDE for the first time. Thank you sir, from an Italian student!
Thanks, Greate to hear that you found it helpful
Good point about keeping the code small in the callback function and showing how to do it.
Thanks for your feedback, /PR TechTalk
Thanks for the video , would have loved to hear your thoughts on issues to do with debouncing on this type of implementation
Hey, thanks for the comment! I'll definitely keep your suggestion in mind and make a video specifically discussing debouncing issues. Stay tuned for that!
PR TechTalk
hello sir your way of keeping code small in callback function is cool but i was thinking when controller return from performing function which should be in callback function, will it continue it working from previous stage where it was interrupted?
Short answer: You are correct. After have served the interrupt it restore the run status as it had when the int accured and just proceed.
/PR TechTalk
Hello there. You helped me a lot 👍👍👍👍
That is Greate to hear. Hope i also gained you as a subscriber :-)
/PR TechTalk
Excellent Video.
Thanks You
/PR TechTalk
Hi how much is the time between interrupt(falling or rising edge) and function and how we can decrease this time ?
(Doing the function immediately after interrupt without any delay)
Hi, one way to measure the time taken is to count MCU cycles, take a note on the current counter on int and then when the callback have started , then you have your time. To minimize time then one way is to maximize clock frequency. Don't forget to hit the Subscribe button :-)
/PR TechTalk
Hi Peter, many thanks for your video tutorials, I learned a lot from them! I tried to write a similar Main.c source code but accidentally added the Callback routine to the "User code begin 2" section. That way the code didn't work. I noticed my fault and moved the Callback routine to "User code begin 4". Do you have any idea why the "4" section is more proper than the "2" section? Both sections are directly in Main() and not within sub-routines. And I assume a Callback routine is called only in case of an interrupt. So I don't see why the position of the Callback routines are important. Thank you!
Hi Peter, I'm sorry, I just noticed that I'm wrong, the "User code begin 4" section is outside of Main(). I don't know what's behind this logic but I can accept it. I'm sorry for bothering you!
Hi Krisztian, greate that you found your bug on your own :-) Placing of code do have some impact.
I normally place all callbackfunctions in Section 4 and al other rutines in Section 0. But then you also need to declare prototypes for these. You can also put your code in separate .c & .h files and just include them in your main file.
Many thanks, Peter!
it is a very informative video---thanks
Glad it was helpful!
Plz do an application with trust zone enable for stm32h5
Hi and thanks for your suggestion, TrustZone is a good suggestion so hit the subscribe button and the bell to get notified when/if I release a video on this topic.
/PR TechTalk
Thanks but what is the role of function callback
That is up to you to decide what you want to happen. Interrupt and callback is a way to organize your software, and their are several other methods that you can use or combine. Main Loop is One, RTOS is another. all have their pros and cons. /PR TechTalk
You place the code in the wrong zone ....!
Hi Daniel; Ouups I found the error. 21:14 - 22:56. i did indeed put some code outside the "Begin" and "End" statement.
if i would go to CubeMX and make any changes all this code would be gone.
So thanks Daniel for having these Hawk Eyes. And if their are any other errors just let me know.
/Pr TechTalk
Nu cube ide plz
On bare metal
Thanks for your input, stay tuned it might come in the future.
Subscribed 👍
Welcome as Subscriber. :-)
suscribed
Greate, Welcome
/PR TechTalk
you are very slow
Thank you for your “feedback” ??!!!