Hello, I have several days in trying to put in operation the module SPI1 and SPI2 of the pic18f47q43 with the MCC. and I don't see a clock in SCLK and SDO on the oscilloscope. I bought another pic, and the same result happens, I don't know what the error is, this is the mcc configuration code
void SPI2_Initialize (void)
{
// EN enabled; LSBF MSb first; MST bus master; BMODE last byte;
SPI2CON0 = 0x82;
// SMP Middle; CKE Active to idle; CKP Idle: Low, Active: High; FST disabled; SSP active high; SDIP active high; SDOP active high;
SPI2CON1 = 0x40;
// SSET enabled; TXR required for a transfer; RXR suspended if the RxFIFO is full;
SPI2CON2 = 0x07;
// CLKSEL MFINTOSC;
SPI2CLK = 0x02;
// BAUD 255;
SPI2BAUD = 0xFF;
TRISBbits.TRISB1 = 0;
}
and in the main I send
SPI2_WriteByte (0b10101010);
previously I use
SPI2_Open (); to initialize