HAL_SPI_EnableSlave(eSlave); //ChipSelect Low
u8Dummy = SPI1BUF;
SPI1BUF = u8Reg;
while (!SPI1STATbits.SPIRBF);
u8Dummy = SPI1BUF;
SPI1BUF = u8Data;
while (!SPI1STATbits.SPIRBF);
HAL_SPI_DisableSlave(eSlave); //ChipSelect High
Now, when I try to run the program, I don't see any activity on SCK and MOSI lines.
Even if it would be a problem of OSC setttings, I would have seen some waveform on SCK lines but SCK is continuously HIGH (IDLE).