I'm developing a STM32L151 based dcc decoder and was looking at your code as a possible starting point. Your project looks great and the pid control is a bit beyond my understanding. However, I did notice a slight error on the line below which you may like to correct.
I'm developing a STM32L151 based dcc decoder and was looking at your code as a possible starting point. Your project looks great and the pid control is a bit beyond my understanding. However, I did notice a slight error on the line below which you may like to correct.
https://github.com/gab-k/RP2040-Decoder/blob/10fbcb5815ce81fd1c1bedcceed3cfd5c92fd319/core1.c#L179
I believe it should have passed msr_delay_in_us not msr_total_iterations. It works at the moment because these two numbers have the same value of 100.