2021-11-09 07:29 PM
I have two things in code running simultaneously:
1) A CODEC using I2S with DMA is initialized and started as soon as the code is compiled and flashed.
2) I have an interrupt for my encoder which is used for selecting things from a menu.
The problem I am having is the following:
When I rotate my encoder and thus the ISR gets triggered, the passing object to the ISR function contains very weird values. Coincidently, my program gets stuck in this interrupt.
I have attached a copy of my code and also a screenshot of the object with its properties.
I would like to know how I can fix this bug and avoid it for future implementations.
Notes: I did not set up any DMA for my encoder. I only set it up using the Encoder mode T1 & T2.
2021-11-09 08:57 PM
Your htim object has bogus values, most likely due to an out of bounds write or a stack overflow. Set up a watchpoint on that variable and see what is changing it.