I have project MP3 using STM32F030C8.
MP3 decoder using I2C interface and user key using ADC. So, beginning of my prototype use STM32L0 series, it already done and no problem at all. After that I change to STM32F030C8 then problem happen.
User key didn't work because ADC value are wrong (random). There is no different value when press each key. But if I disable MP3 (I2C) interface, ADC is works.
Here my block system
I attach my related code.
Thank you any clue I appreciate.
Edit : I checked ADC and DMA register by KEIL debugger, here the screenshoot
This is condition when I comment MP3 (i2c) code, Register value seem OK.
register DR value is FFF when no key press. And when I press each key, it give desired value.
And here normal condtion (MP3 I2C active).
Both ADC and DMA register value are absurd. Sometime it change to random value.
But MP3 function is works. Its like there is collision between I2C and ADC. ADC peripheral address suddenly change every time read and write data via I2C.
.This is very strange please help.