2021-11-19 04:49 PM
Hi,
I am currently implementing a guitar effects pedal using the STM32F446RE and the PCM3060 as my CODEC.
I have gotten everything to work, except when I try to adjust the following parameters
cf0_lim = (int)(time*l_CB0);
cf1_lim = (int)(time*l_CB1);
cf2_lim = (int)(time*l_CB2);
cf3_lim = (int)(time*l_CB3);
ap0_lim = (int)(time*l_AP0);
ap1_lim = (int)(time*l_AP1);
ap2_lim = (int)(time*l_AP2);
inside my DMA. For some reason, I cannot update this parameters anywhere in my code. I tried updating them outside of the DMA callbacks for my CODEC and also on the while loop.
I am pretty sure these are the parameters that are triggering the HardFault error because whenever I comment them out the code runs fine.
I am able to update the "time" and "wet" variables whilst the DMA is running. This is fine, however, without updating the cfx_lim and apx_lim variables, I can't do much to apply this changes to the current effects that are being used for the reverb effect.
Is there a reason why this is happening? I have attached my entire code.