+ Reply to Thread
Results 1 to 4 of 4

Thread: SPI_MASTER APP "coded select mode"

  1. #1
    New Member New Member ma.leiter is on a distinguished road
    Join Date
    Jul 2019
    Posts
    3
    Points
    25

    SPI_MASTER APP "coded select mode"

    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:

    Code:
    	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");
    	 }

  2. #2

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    667
    Hi,

    Please check XMC_SPI_CH_EnableSlaveSelectCodedMode() and XMC_SPI_CH_DisableSlaveSelectCodedMode().

    Regards,
    Jesus
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  3. #3
    New Member New Member ma.leiter is on a distinguished road
    Join Date
    Jul 2019
    Posts
    3
    Points
    25
    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?

    Click image for larger version

Name:	PCR_SSC.PNG
Views:	0
Size:	20.8 KB
ID:	4061

    Thanks

  4. #4
    New Member New Member ma.leiter is on a distinguished road
    Join Date
    Jul 2019
    Posts
    3
    Points
    25
    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:
    Code:
      // deactivate TCI to SELO (auto chipselect from FIFO buffer)
      SPI_MASTER_0.channel->TCSR &= ~(USIC_CH_TCSR_SELMD_Msk);

+ Reply to Thread

Tags for this Thread

Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.