TC397 - iLLD SPI configuration for unused pins.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
9ball
Level 1
Level 1
5 sign-ins First solution authored First reply posted

Hi guys,

I'm using TC397 to control an external DAC via SPI. I don't need the MISO signal, because the DAC is not sending anything. 

/* Select the port pins for communication */
    const IfxQspi_SpiMaster_Pins qspi0MasterPins = {
        &IfxQspi0_SCLK_P22_8_OUT, IfxPort_OutputMode_pushPull, // SCLK Pin                    
        &IfxQspi0_MTSR_P22_10_OUT, IfxPort_OutputMode_pushPull,// MOSI Pin    
        NULL_PTR, IfxPort_OutputMode_none,   //MISO pin not defined. Is this correct?
        IfxPort_PadDriver_cmosAutomotiveSpeed3  // Pad driver mode                          
    };
    spiMasterConfig.pins = &qspi0MasterPins;    // Assign the Master's port pins

 Is this "NULL_PTR, IfxPort_OutputMode_none"  the correct way to do this? 

Thank you!

0 Likes
1 Solution
9ball
Level 1
Level 1
5 sign-ins First solution authored First reply posted

Thank you -  I was trying to find out how to define the MISO pin in the  IfxQspi_SpiMaster_Pins struct if the pin is not needed. I guess NULL_PTR  is the answer, I saw it used in  other peripheral examples. (like UART). 

View solution in original post

0 Likes
4 Replies
Nambi
Moderator
Moderator
Moderator
500 replies posted 50 likes received 5 likes given
0 Likes
9ball
Level 1
Level 1
5 sign-ins First solution authored First reply posted

Thanks for the fast reply Nambi, unfortunately the link in the thread post  you mention doesn't work , even though I have myicp access.

https://myicp.infineon.com/sites/microcontrollers-aurix_customer_doc/Lists/defaultdoclib/AURIX%20TC3...

0 Likes
Nambi
Moderator
Moderator
Moderator
500 replies posted 50 likes received 5 likes given

Hi,

Looks like the hyperlink was different from the text. I have updated the link in your response.

Best Regards.

0 Likes
9ball
Level 1
Level 1
5 sign-ins First solution authored First reply posted

Thank you -  I was trying to find out how to define the MISO pin in the  IfxQspi_SpiMaster_Pins struct if the pin is not needed. I guess NULL_PTR  is the answer, I saw it used in  other peripheral examples. (like UART). 

0 Likes