2023-04-11 09:28 AM - edited 2023-11-20 08:30 AM
Im trying to build a guitar pedal on a STM32F446RE. 'SoundIN' is assigned to a pointer that is assigned to address value of the adc samples. 'SoundOUT' is half of soundIN (Just a test to see if works). However, output pointer '*outPoint' is showing a different value. When I input a sine wave of say 2Vpp, I get the exact same signal out. Shouldn't I be getting 1Vpp at the output ?
Figure 1 shows the debugger output. Shouldn't 'outPoint' be a similar value to 'soundOUT' ?
Figure 2 shows my double buffering code.
2023-04-11 12:48 PM
Fig. 2 shows the conversion of a single audio sample, not a buffer. I would expect a for loop somewhere.
When the debugger stops at the green line, the assignment to *outPoint was not yet executed, and Fig. 1 shows the previous value at that address.
hth
KnarfB
2023-04-11 02:46 PM - edited 2023-11-20 08:30 AM
Thanks for your answer. Something like this ?
2023-04-12 04:52 AM
Well, not completely. This is more about C programming. You might want to check/follow Phil's Lab video, e.g. https://youtu.be/zlGSxZGwj-E?t=971
hth
KnarfB
2023-04-12 09:53 AM - edited 2023-11-20 08:30 AM
I tried using Phil's method but it also didn't work.
This is my new code. It still doesn't work, unfortunately.