Announcements

Equip yourself to optimize AURIX™ MCUs for Evs at the EV Webinar. Click here to register.

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

AURIX™ Forum Discussions

LijoDan
Level 2
Level 2
10 replies posted First question asked 10 likes given

Hello Community,

I am using the ILLD sample code for QSPI with  SPI_CPU_1_KIT_TC375_LK.

The baud rate set in this example is 1 Mhz,

"#define MASTER_C.HANNEL_BAUDRATE 1000000 /* Master channel baud rate (from code)

Query :

How can i change the Baud rate to 80 Mhz.? i have a external flash which required higher baud rates.

Changing the macro value directly doesn't help, it creates issues in the generated clock. 

I know some dividers has to be updated. could some one help on this? 

IDE: Aurix-v-1.5.2 , 

 

0 Likes
1 Solution
cwunder
Employee
Employee
25 likes received 25 solutions authored 100 sign-ins

I imported the example SPI_CPU_1_KIT_TC375_LK and changed the baud rate to 20 MHz and also the Pad driver strength to "Speed 1

 

#define MASTER_CHANNEL_BAUDRATE     20000000

 

 

 

void initQSPI1Master(void)
{
  IfxQspi_SpiMaster_Config spiMasterConfig;
  IfxQspi_SpiMaster_initModuleConfig(&spiMasterConfig, QSPI1_MASTER); 
  spiMasterConfig.base.mode = SpiIf_Mode_master;
  /* Select the port pins for communication */
    const IfxQspi_SpiMaster_Pins qspi1MasterPins= {
        &IfxQspi1_SCLK_P10_2_OUT, IfxPort_OutputMode_pushPull,
        &IfxQspi1_MTSR_P10_3_OUT, IfxPort_OutputMode_pushPull,
        &IfxQspi1_MRSTA_P10_1_IN, IfxPort_InputMode_pullDown,
        IfxPort_PadDriver_cmosAutomotiveSpeed1
    };
    spiMasterConfig.pins = &qspi1MasterPins;  

 

 

 The QSPI1 clock is running @ 20MHz

cwunder_0-1651775118011.png

 

View solution in original post

5 Replies
DownyK
Level 4
Level 4
5 questions asked 100 sign-ins 25 replies posted

Hi LijoDan

you can modify Baud Rate per Qspi ch.

Check AURIXTC3xx_um_part2_v.2.0.pdf p.1709 (QSPI 37.3.2.3)

DownyK_0-1651650324370.png

 

 

cwunder
Employee
Employee
25 likes received 25 solutions authored 100 sign-ins

A QSPI clock of 80MHz is not possible with TC3xx devices. The maximum is 50MHz using the LVDS pads otherwise it is limited to 20MHz (also depending on the capacitive load of the signals).

cwunder_0-1651665373036.png

 

@cwunder  thank you for the information. 

However, i am not sure how to change configurations in the iLLD example and achieve the 20 Mhz baud rate. Could you support in a sample code.?

Any configuration changes i try, the clock is always restricted to only 1Mhz. 

I even tried using the interface  IfxScuCcu_setQspiFrequency().

0 Likes
cwunder
Employee
Employee
25 likes received 25 solutions authored 100 sign-ins

I imported the example SPI_CPU_1_KIT_TC375_LK and changed the baud rate to 20 MHz and also the Pad driver strength to "Speed 1

 

#define MASTER_CHANNEL_BAUDRATE     20000000

 

 

 

void initQSPI1Master(void)
{
  IfxQspi_SpiMaster_Config spiMasterConfig;
  IfxQspi_SpiMaster_initModuleConfig(&spiMasterConfig, QSPI1_MASTER); 
  spiMasterConfig.base.mode = SpiIf_Mode_master;
  /* Select the port pins for communication */
    const IfxQspi_SpiMaster_Pins qspi1MasterPins= {
        &IfxQspi1_SCLK_P10_2_OUT, IfxPort_OutputMode_pushPull,
        &IfxQspi1_MTSR_P10_3_OUT, IfxPort_OutputMode_pushPull,
        &IfxQspi1_MRSTA_P10_1_IN, IfxPort_InputMode_pullDown,
        IfxPort_PadDriver_cmosAutomotiveSpeed1
    };
    spiMasterConfig.pins = &qspi1MasterPins;  

 

 

 The QSPI1 clock is running @ 20MHz

cwunder_0-1651775118011.png

 

Hello @cwunder ,

Thank you for your solution, it works for me too !!! My clock is 20 Mhz as well now

Could you please tell, how did the pad driver configuration impact the Clock, and what are the remaining pad driver configuration used for. 

I also tried using pad driver 2. it works as 20 Mhz, So what is the impact of changing pad driver configuration

0 Likes