Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN, USB2ANY
We're trying to read the DeviceID, and we are not getting back the correct value. On the read access cycle, we see the correct register address but the data is all zeroes.
mibspiInit();
txBuffer[0] = 129; // 10000001
txBuffer[1] = 0xff;
txBuffer[2] = 0xff;
rxBuffer[0] = 0b00000000;
rxBuffer[1] = 0b00000000;
rxBuffer[2] = 0b00000000;
rxBuffer0[0] = 0b00000000;
rxBuffer0[1] = 0b00000000;
rxBuffer0[2] = 0b00000000;
mibspiSetData(mibspiREG2, 0, txBuffer);
mibspiTransfer(mibspiREG2, 0);
while (!(mibspiIsTransferComplete(mibspiREG2, 0)));
mibspiGetData(mibspiREG2, 0, rxBuffer);
// send NOP
txBuffer[0] = 0;
txBuffer[1] = 0;
txBuffer[2] = 0;
mibspiSetData(mibspiREG2, 0, txBuffer);
mibspiTransfer(mibspiREG2, 0);
while (!(mibspiIsTransferComplete(mibspiREG2, 0)));
mibspiGetData(mibspiREG2, 0, rxBuffer0);
We can read the values without issue using the USB2Any, the EVM board should be fine. We're not sure if it's our code or the HalCoGen settings.
Note: When the USB2Any is plugged into the board, we get the correct values when running code on the Launchpad.
Below is the read access cycle and write access cycle images from scope. Probe1=CLK, Probe2=CS, Probe3=MOSI, Probe4=MISO
Read Request:
Read:

