Daniel, Hi.
My LPSPI config looks like this:
/* SPI controller SpiPhyUnit_0 configuration. */
const Lpspi_Ip_ConfigType Lpspi_Ip_PhyUnitConfig_SpiPhyUnit_0_Instance_4 =
{
4U, /* Instance */
/* CR */
(uint32)0,
/* CFGR1 */
(uint32)(LPSPI_CFGR1_PINCFG(0U) | LPSPI_CFGR1_PCSPOL(0U) | LPSPI_CFGR1_MASTER(1U) | LPSPI_CFGR1_SAMPLE(0U)),
#if (LPSPI_IP_SLAVE_SUPPORT == STD_ON)
(boolean)FALSE,
#endif
#if (LPSPI_IP_DMA_USED == STD_ON)
(boolean)TRUE,
(uint8)0, /* txDmaChannel */
(uint8)0, /* rxDmaChannel */
#if (LPSPI_IP_ENABLE_DMAFASTTRANSFER_SUPPORT == STD_ON)
(uint8)4U, /* u8NumOfDmaFastTransfer */
Lpspi_Ip_CmdDmaFast_SpiPhyUnit_0,
U, /* Number of TCD Scatter Gather for Tx */
U, /* Number of TCD Scatter Gather for Rx */
Lpspi_Ip_ListTxDmaFastSGId_SpiPhyUnit_0,
Lpspi_Ip_ListRxDmaFastSGId_SpiPhyUnit_0,
#endif
#endif
LPSPI_IP_POLLING, /* Transfer mode */
(uint8)0U /* State structure element from the array */
#if (LPSPI_IP_DMA_USED == STD_ON)
,(boolean)FALSE /* If channels in HWunit are the same framesize. */
,(uint8)0U
#endif
};
As you can see, LPSPI_CFGR1_SAMPLE(0U)? Is this the parameter you are referring to by SAMPLE = 0?If it some other parameter, can you give me a full name (consistent with the one specified in Table 44)?
Thanks!