Feb 17, 2021
01:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 17, 2021
01:58 AM
We want control the SPI chip select is controlled by the software(disenable hardware module ,use GPIO control it).
How can I achieve this function.
How can I achieve this function.
- Tags:
- IFX
2 Replies
Feb 17, 2021
05:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 17, 2021
05:45 AM
Let's assume you have the iLLD functions IfxPort.c and IfxPort.h:
Find the port and pin index MODULE_Pxx and yy that corresponds to your Chip Select pin:
First set up your pin as an output:
IfxPort_setPinMode(&MODULE_Pxx, yy, IfxPort_OutputMode_pushPull);
IfxPort_setPinPadDriver(&MODULE_Pxx, yy,
IfxPort_PadDriver_cmosAutomotiveSpeed1);
Then set the port high
IfxPort_setPinHigh(&MODULE_Pxx, yy);
or low
IfxPort_setPinLow(&MODULE_Pxx, yy);
Was that what you were looking for?
Find the port and pin index MODULE_Pxx and yy that corresponds to your Chip Select pin:
First set up your pin as an output:
IfxPort_setPinMode(&MODULE_Pxx, yy, IfxPort_OutputMode_pushPull);
IfxPort_setPinPadDriver(&MODULE_Pxx, yy,
IfxPort_PadDriver_cmosAutomotiveSpeed1);
Then set the port high
IfxPort_setPinHigh(&MODULE_Pxx, yy);
or low
IfxPort_setPinLow(&MODULE_Pxx, yy);
Was that what you were looking for?
Feb 17, 2021
06:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 17, 2021
06:51 PM
I remove the CS pin setting from QSPI demo code. But it has error in IDE tool.
How to remove the CS setting?
const IfxQspi_SpiMaster_Output slsOutput = {&IfxQspi0_SLSO6_P20_10_OUT,
IfxPort_OutputMode_openDrain,
IfxPort_PadDriver_cmosAutomotiveSpeed1};
spiMasterChannelConfig.sls.output.pin = slsOutput.pin;
spiMasterChannelConfig.sls.output.mode = slsOutput.mode;
spiMasterChannelConfig.sls.output.driver = slsOutput.driver;
How to remove the CS setting?
const IfxQspi_SpiMaster_Output slsOutput = {&IfxQspi0_SLSO6_P20_10_OUT,
IfxPort_OutputMode_openDrain,
IfxPort_PadDriver_cmosAutomotiveSpeed1};
spiMasterChannelConfig.sls.output.pin = slsOutput.pin;
spiMasterChannelConfig.sls.output.mode = slsOutput.mode;
spiMasterChannelConfig.sls.output.driver = slsOutput.driver;