You can remap the SPI hardware peripheral pins to others pins if you want.
You can do this by adding c code or with the tips given by Benj in one of my previous post : viewtopic.php?f=54&t=14502
Thanks for advice. I've added CAL_SPI and remapped pins to my own (set CAL_SPI to Channel1), then set FAT component to Channel1.
That didn't work. Should I do it different way?
When I put FAT component's Channel to Ch1 it gives me only CS parameter to edit. Others are set by default and non-editable. What I mean is when I do FAT.Initialize, doesn't it take these pins for initialize operation by default even if I remapped them with CAL_SPI or C code injection?
C code inserted at the beginning (didn't work too)
Code: Select all
// Unlocks PPS, make change, and locks again.
__builtin_write_OSCCONL(OSCCONL & ~(1 << 6));
_SS1R = 15; //B15 chip select
_SDI1R = 6; //B6 data in
_RP14R = 7; //B14 data out
_RP7R = 8; //B7 sck1out
__builtin_write_OSCCONL(OSCCONL | (1 << 6));