Part Number: MSP432E401Y
Tool/software:
Hello Team,
We have implemented the code for SPI based ethernet controller in which there is a driver provided by microchip on top of it we have added SSI functions. In the init for enc24j6 write and read 1234 is done. It is working only once that too if we flash and test in the below order
1. flash with while(MAP_SSIBusy(SSI3_BASE)); (please refer the code snippet attached below) -> Slave out will return 1200
2. flash again by removing while(MAP_SSIBusy(SSI3_BASE)); -> Slave out will return 1234 as expected. This will also work as expected only once and even in the same debug session.

C1-> Clock C2-> MOSI C3 -> MISO C4 -> CS
3. flash same code again -> Slave out will return 1200
We tried this order multiple times, same is happening.
Please find the below code snippet.
uint16_t ENCx24_Read(encX24J600_registers_t a)
{
uint16_t v;
uint8_t bank;
bank = a & BANK_MASK;
if(bank != UNBANKED)
{
ENCx24_BankselSPI(a);
test[0] = (rcr_inst| (a & SFR_MASK));
MAP_SSIDataPut(SSI3_BASE, test[0]);
for(ii = 1; ii < 3; ii++)
{
MAP_SSIDataPut(SSI3_BASE, test[0]);
MAP_SSIDataGet(SSI3_BASE, &test[ii]);
//while(MAP_SSIBusy(SSI3_BASE));
}
((uint8_t*)&v)[1] = test[1];
((uint8_t*)&v)[0] = test[2];
}
else
{
test[0] = (rcru_inst);
test[1] = (a);
for(ii = 0; ii < 2; ii++)
{
MAP_SSIDataPut(SSI3_BASE, test[ii]);
}
for(ii = 2; ii < 4; ii++)
{
MAP_SSIDataPut(SSI3_BASE, sendDummyData);
MAP_SSIDataGet(SSI3_BASE, &test[ii]);
}
((uint8_t*)&v)[1] = test[2];
((uint8_t*)&v)[0] = test[3];
}
return v;
}
#endif
We're not able to understand the behaviour happening here. Please help to find the issue.
Thank you in Advance





