Other Parts Discussed in Thread: HALCOGEN
I'm rather confused that for a TRANSMIT function, in routine spiTransmitData of spi.c, the process seems to be controlled by reading the RX flag, bit 8, as per this snippet:
/*SAFETYMCUSW 28 D MR:NA <APPROVED> "Hardware status bit read check" */
while((spi->FLG & 0x00000100U) != 0x00000100U)
{
according to the device Technical Reference Manual, spnu499b dated November 2012–Revised August 2013, 25.9.5 SPI Flag Register (SPIFLG).
The same bit is used for the spiDataReceive function.
The TX flag, which would be 0x00000200U does not appear to be used at all...
In my code, the process hangs up as this RX bit is cleared: looking at the project I copied it from, it works. What have I not set up??? Also in the source project, bit 24, BUFINITACTIVE is continuously set, although I have not knowingly set the part up as MibSPI: in HALCoGen I request simple SPI1, 2 & 3 drivers to be enabled.
HALCoGen revision 04.05.01 Release 28 August 2015.
Thanks