could someone help explain what this code means? I understand the overall gist that it increases the psram spi speed . . . but maybe something a little more in regards to what the 4 and 2 actually do . . . how 132mhz is calculated from that
the reason i ask is I was just testing different values and replacing 4 and 2 with 3 and 1 [i.e. CCM_CBCMR_FLEXSPI2_PODF(3) | CCM_CBCMR_FLEXSPI2_CLK_SEL(1)] gives a huge speed improvement in regards to psram memory latency but I dont understand what the new spi speed is with that change and more improtantly because i dont know what it really is doing if it will harm the psram or anything else on the mcu, or even if it will adversly affect something else down the line . . .
any help is appreciated
C++:
//Reset psram clock to 132 Mhz (default is 88mhz)
CCM_CCGR7 |= CCM_CCGR7_FLEXSPI2(CCM_CCGR_OFF);
CCM_CBCMR = (CCM_CBCMR & ~(CCM_CBCMR_FLEXSPI2_PODF_MASK | CCM_CBCMR_FLEXSPI2_CLK_SEL_MASK)) | CCM_CBCMR_FLEXSPI2_PODF(4) | CCM_CBCMR_FLEXSPI2_CLK_SEL(2); // 528/5 = 132 MHz
CCM_CCGR7 |= CCM_CCGR7_FLEXSPI2(CCM_CCGR_ON);
the reason i ask is I was just testing different values and replacing 4 and 2 with 3 and 1 [i.e. CCM_CBCMR_FLEXSPI2_PODF(3) | CCM_CBCMR_FLEXSPI2_CLK_SEL(1)] gives a huge speed improvement in regards to psram memory latency but I dont understand what the new spi speed is with that change and more improtantly because i dont know what it really is doing if it will harm the psram or anything else on the mcu, or even if it will adversly affect something else down the line . . .
any help is appreciated