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

cross mob
Translation_Bot
Community Manager
Community Manager
Community Manager
問題1:在配置SPI模組時,QSPI的時鐘來源怎麼選擇,EB配置中,McuClockSettingConfig_0的General中有McuQspiClockSourceSelection 選項,但是McuClockReferencePoint中也有一個MCU_QSPI_FREQUENCY的可選項,這兩個問題是 問題,B 的怎麼去測試,不太懂這個時間指的是什麼,是不是我得發連續幀才能測出來

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/AURIX/Aurix-TC36x-SPI/td-p/643814

1 回應
Translation_Bot
Community Manager
Community Manager
Community Manager

可以參考iLLD裡面如下程式碼:

IfxScuCcu_getQspiFrequency
這個函數裡面有頻率的選擇
IfxQspi_calcRealBaudrate
這個函數裡面有計算方法(關於fQspi和ECON[cs].BQ, A, B, C)

 

float calculateRealBaudrate(Ifx_QSPI *qspi, IfxQspi_ChannelId channelId)
{
    // Extracting relevant parameters
    int cs = channelId % 8;
    float fQspi = IfxScuCcu_getQspiFrequency(); // Set fQspi to the base QSPI frequency (e.g., 200MHz)

    // Configuring QSPI parameters:
    // TQ is 0,
    // Q is 24,
    // A is 3,
    // B is 3,
    // and C is 1.

    // Adjusting fQspi for TQ
    fQspi = fQspi / (qspi->GLOBALCON.B.TQ + 1);

    // Adjusting fQspi for Q
    // Example: fQspi = 200M
    fQspi = fQspi / (econ[cs].B.Q + 1);

    // Example: fQspi = 8M

    // Further adjustments for A, B, and C
    fQspi = fQspi / ((econ[cs].B.A + 1) + econ[cs].B.B + econ[cs].B.C);

    // Example: fQspi = 1M

    return fQspi;
}

 

 

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/AURIX/Aurix-TC36x-SPI/m-p/644145

0