Jul 23, 2019
04:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 23, 2019
04:52 AM
Is there any possibility to enable the coded select mode with the SPI_MASTER APP?
I've tried the following, but only XMC_SPI_CH_SLAVE_SELECT_1 gets active during sending:
I've tried the following, but only XMC_SPI_CH_SLAVE_SELECT_1 gets active during sending:
XMC_SPI_CH_EnableSlaveSelectCodedMode(SPI_MASTER_0.channel);
XMC_SPI_CH_EnableSlaveSelect(SPI_MASTER_0.channel,XMC_SPI_CH_SLAVE_SELECT_2| XMC_SPI_CH_SLAVE_SELECT_1|XMC_SPI_CH_SLAVE_SELECT_0);
if(SPI_MASTER_Transmit(&SPI_MASTER_0, cMemLEDOut, MEM_LED_SIZE) == SPI_MASTER_STATUS_SUCCESS){
// logfUart("section %d transmitted.",currentSection);
}
else{
logfUart("error in SPI transmit\n");
}
3 Replies
Jul 23, 2019
08:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 23, 2019
08:02 AM
Hi,
Please check XMC_SPI_CH_EnableSlaveSelectCodedMode() and XMC_SPI_CH_DisableSlaveSelectCodedMode().
Regards,
Jesus
Please check XMC_SPI_CH_EnableSlaveSelectCodedMode() and XMC_SPI_CH_DisableSlaveSelectCodedMode().
Regards,
Jesus
Jul 23, 2019
10:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 23, 2019
10:26 PM
Hi,
As you can see, I've used XMC_SPI_CH_EnableSlaveSelectCodedMode().
I've also double checked the Register values:
PCR.SELCTR = 0,
PCR.SELO = 0x07 -> (00111) -> CS-Line 0,1 and 2
Is there any other setting neccessarry?
Thanks
As you can see, I've used XMC_SPI_CH_EnableSlaveSelectCodedMode().
I've also double checked the Register values:
PCR.SELCTR = 0,
PCR.SELO = 0x07 -> (00111) -> CS-Line 0,1 and 2
Is there any other setting neccessarry?
Thanks
Jul 24, 2019
01:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 24, 2019
01:45 AM
I've solved my problem:
By default SELMD is set to 1 which means that the chipselect lines are set automatically using the TCI information of the buffer.
That's why only SELO0 was active.
This additional code solved my problem:
By default SELMD is set to 1 which means that the chipselect lines are set automatically using the TCI information of the buffer.
That's why only SELO0 was active.
This additional code solved my problem:
// deactivate TCI to SELO (auto chipselect from FIFO buffer)
SPI_MASTER_0.channel->TCSR &= ~(USIC_CH_TCSR_SELMD_Msk);