Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

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

cross mob
Not applicable
Hi,

I want to write SPI driver to configure the SPI of AURIX TC297 microcontroller. From where can I find the reference?

Thanks in advance.

Regards,
Divya
0 Likes
1 Reply
User12775
Level 5
Level 5
1000 replies posted 750 replies posted 500 replies posted
In case you use the HighTech toolchain. There are some examples using the SPI interface.

For example, the LCD and MicroSD card on the Application Kit board are accessed via the SPI interface.

See the comment:

/*--------------- Graphic LCD interface hardware definitions -----------------*/

/*
LCD is connected to QSPI0 interface

Port Function Type Note
P20.3 SLSO09 O Touch Chip Select
P20.6 SLSO08 O CPLD Chip Select
P20.11 SCLK0 O Serial Clock
P20.12 MRST0A I Master Receive Slave Transmit
P20.14 MTSR0 O Master Transmit Slave Receive
P20.13 BGL O background light

remarks: accessing LCD controller through serial interface
command byte: bit7=R/W,bit6=RS,bits5:0=cmd reg
RS R/W function
0 0 set an index register
0 1 read a status
1 0 write a register or GRAM data
1 1 read a register or GRAM data

remarks: using a CPLD for serial (SPI) to parallel (LCD) conversion
bit9=R/W,bit8=E/S (endless | single transfer)
*/
0 Likes