kappa_am
Full Member level 6
Hi All,
I have implemented SPI connection between two dspic33EP512mu810 and 814 MCUs with DMA. receiving DMAs are ping pong mode and sending DMA is continuous ping pong disabled. At first I transmit numbers 0-63 two times if both buffers are equal the setup proceeds with converting 4 channels ADC. Master transfers 4 words (results of ADC conversion), and slave transfers received ADC results (saved on worlds 0-4) and words 4-7 (their values equal to their order) All works well, but some times the bits which are saved in the memory is shifted some bits. Fist, when I switch a load on or off adjacent to the circuit. Since I saw this problem first I turn a switching power supply ON, I checked every thing for noise problem, I add some filters on the power supply but the problem still exists. When I turn ON PWM of the slave ( no power switching component) the problem exacerbated, and the bits are shifted after a while (not fixed time).
I would be grateful if you share your opinion about solving this problem.
Regards,
The correct data:
The wrong data I got:
I have implemented SPI connection between two dspic33EP512mu810 and 814 MCUs with DMA. receiving DMAs are ping pong mode and sending DMA is continuous ping pong disabled. At first I transmit numbers 0-63 two times if both buffers are equal the setup proceeds with converting 4 channels ADC. Master transfers 4 words (results of ADC conversion), and slave transfers received ADC results (saved on worlds 0-4) and words 4-7 (their values equal to their order) All works well, but some times the bits which are saved in the memory is shifted some bits. Fist, when I switch a load on or off adjacent to the circuit. Since I saw this problem first I turn a switching power supply ON, I checked every thing for noise problem, I add some filters on the power supply but the problem still exists. When I turn ON PWM of the slave ( no power switching component) the problem exacerbated, and the bits are shifted after a while (not fixed time).
I would be grateful if you share your opinion about solving this problem.
Regards,
The correct data:
The wrong data I got: