Thank you for your answer, to be honest I still do not know whats the difference - question 1?
Would you be so kind and clarify it, or redirect to any available documentation if such exist?
Why there are two resources, I have not seen any description. Is one better than the other one, is one using Interrupts and the second one software implementation. Is this for backward compatibility with some other libraries. From My observation none of them is using interrupts even there is ISR defined - I have commented the entire definitions of:
void spi2_isr(void) and
and the code was compiled and running, seems there is no interrupts or I wrongly initialized the SPI by calling spi2_open(). Thats my guess I am not so advanced, have only a little ASM experience where everything is much simpler.
Answering to your question: SPI2 Master, Fresh projects
For 33FJ1024GB610 these are outputs
__builtin_write_OSCCONL(OSCCON & 0xbf); // unlock PPS
RPINR20bits.SDI1R = 0x001A; //RG7->SPI1:SDI1
RPOR9bits.RP19R = 0x0007; //RG8->SPI1:SDO1
RPOR13bits.RP27R = 0x0009; //RG9->SPI1:SS1OUT
RPOR10bits.RP21R = 0x0008; //RG6->SPI1:SCK1OUT
__builtin_write_OSCCONL(OSCCON | 0x40); // lock PPS
33EP256MC506, which is now completely not configuring any PINs for SPI1, before I have USED SPI2 where I had to manually defined SCK2 as output (I did only as output). So now for SPI1 by MCHP and by Foundation(both) the enitre PPS section in pin_manager.c is missing. Fresh project SPI1 by MCHP, Master in 16 bit mode, system Clock defined as Primary 8MHz plus the fastest prescaler settings.
But this could be due to fixex SPI1 pins, but with SPI2 is the same.
After closing and new opened MPLABX 5.30; MCC Core v4.85; XC16 1.41; Packs 1.1.33; Library 1.166.0
post edited by _dex - 2020/02/23 09:21:31