Using standard STM32 calls for TIm1, Tim2 and interrupts?

I am trying to figure out a lot of different things as I am making the shift to daisy and one of the things that is confusing me is whether or not I can still use things I learned from CubeIDE and books like Mastering STM32.

I know that there are a lot of things hidden away in the Daisy so you do not have to deal with the Hal Libraries BUT if I want to be able to access interrupts and timers and us functions like
__HAL_TIM_GetCompare(), is that even possible with the Daisy or do I have to do everything through the layers the Daisy team created?

I saw in the files somewhere that TIM1 has not been implemented etc. I am not sure if maybe that is something I could do by Opening up a STM Cube file and enabling certain things or if that would then break the Daisy libs.

Obviously one advantage to the Hal code is there is just more online about how to use it and interact with it. There are very few guides for the daisy library support files unless you are trying to use the audio callback etc.

THIS THREAD

is a good example of what I am talking about. THE original poster talks about a solution he found but then he is not sure if it will even work with the current daisy setup.

thanks for any clarity here

In your recent posts, it sounds like this PR (Feature: Hardware PWM by stephenhensley · Pull Request #568 · electro-smith/libDaisy · GitHub) answered questions that you were wondering about. Let us know if you have any specific questions.

By the way, here’s a documentation on software timer: libDaisy: daisy::TimerHandle Class Reference

And the Aurora-SDK header file includes an example of how to set up a “low priority callback” at a specific frequency.

Ahh yes thanks so much. I forgot that you answered a large part of my question in the other thread as that has more of the Hal code within that PR.

thanks again and thanks for this Aurora Callback code

1 Like