Other Parts Discussed in Thread: HALCOGEN
Hi, I am using HALCoGen to set up a project for an RM44 chip.
I will connect to a PLL from Analog Devices which uses a 3-wire SPI connection.
By 3-wire I mean CLK, DATA and CS.
However, the SPI driver from HALCoGen appears to wait for a read flag:
uint32 spiTransmitData(spiBASE_t *spi, spiDAT1_t *dataconfig_t, uint32 blocksize, uint16 * srcbuff) { /** Code skipped here for simplicity */
/*SAFETYMCUSW 567 S MR:17.1,17.4 <APPROVED> "Pointer increment needed" */ srcbuff++; /*SAFETYMCUSW 28 D MR:NA <APPROVED> "Hardware status bit read check" */ while((spi->FLG & 0x00000100U) != 0x00000100U) { } /* Wait */ SpiBuf = spi->BUF; blocksize--; } return (spi->FLG & 0xFFU); }
From what I understand, the red code waits for the RXINTFLG to be set, which will never happen because it is using 3-wire.
Have I understood this correctly? If so, the HALCoGen drivers does not support 3-wire mode, which is a bit odd.
Is there a way around this?