Page 1 of 1

Problem with SPI CH1 and SPI CH2 working simultaneously

Posted: Wed May 29, 2019 9:36 am
by fotios
Hi everyone

In a P16F18877 I've tried either the SPI CH1 or the SPI CH2 working as standalone with success.
Today I tried both SPI channels, with the same settings, working simultaneously. The SPI CH2 does not work. The SPI CH1 is working just fine.
I checked the SPI2 bus with the scope and there are not MOSI and SCLK signals. The MISO and CS signals are OK.

I came across the PIC datasheet and there is not any special precaution to put in operation both SPI channels.

Any idea?

Thanks for any help

Re: Problem with SPI CH1 and SPI CH2 working simultaneously

Posted: Wed May 29, 2019 12:40 pm
by Benj
Hello,

Please can you post your program or a simplified version of and I will investigate for you. I've recently come across a similar bug in v7 and want to see if it's caused by the same problem.

Re: Problem with SPI CH1 and SPI CH2 working simultaneously

Posted: Wed May 29, 2019 6:42 pm
by fotios
Hi Ben

There is no problem.
I had two separate FC for the two SPI slaves which I combined in a new FC.
During copy-paste from the two old FC, both slaves were assigned to "cal_spi1" in the new FC.
I changed the second slave to "cal_spi2" and now the new FC is working flawlessly.
Sorry for the confusion, it was my mistake.

Thanks