This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM8148 SPI clock

Hi Sir :

I work on DM8148 platform and use DVRRDK_03.00.00.00 to develop our system.

In our system, there is a slave SPI device and it's frequency is 40 MHZ.

As I know, SPI frequency on DM8148 is 48 MHZ and I can use divider to get the lower frequency.

My question is could I get the 40 MHZ SPI clock on DM8148?

And if I set 32 bit per word rather than 8 bit per word, could it speed up transmission between master and slave?

Best regards,

Marcus 

  • No direct experience with the DM8148. Some guesses. After a quick look at the data sheet and TRM, I would guess it is not possible to get a 40MHz SPI clock. Take a look at the "System Clocking Overview" diagram in the DM814x Datasheet. Configuration the entire clock structure for 40MHz SPU clock would cause problems with every other perpipheral on the system. I think the closest you could get is 38.4MHz if PRCM.B divider is 5. That would cause clock changes for SPI0/1/2/3, I2C0/1/2/3, UART0/1/2, HDMI CEC. Also possibly UART3/4/5.

    The difference in speed between 4x8bits or 1x32bits depends on the driver. If the driver used DMA, there should be no difference. There should be no gaps between each 8-bit word. With polled IO, I don't there would be much difference either. With IRQ, 32bit word might result in 4 times less interrupts than 8-bit words.

  • Hi sir :

    I appreciate your reply, thank very much!

    I think Norman is right, I can not get 40MHZ SPI clock depends on TRM because divider is always integer.

    The clock I can get is 48,24,16,12....and so on.

    About the difference between 8 bit per word and 32 bit per word, since DM8148 can only use PIO mode(driver says that), I think 32 bit per word can speeds up the transmission.

    By the way, the slave device DM8148 communicate with is not SPI flash, it just a slave device.

    If you have better idea to speed up the transmission or what I say is not correct, please let me know.

    Best regards,

    Marcus 

  • Not quite sure if I got this right. The clock input into the PRCM module is 192Mhz. The PRCM divides 192MHz by 4 to get 48MHz for SYSCLK10. This is fed into many modules including the SPI. The SPI then has it's own divider. If the PRCM is configured to use 5 instead of 4, then SYSCLK10 = 38.4MHz. The problem is that SYSCLK10 use by SPI0/1/2/3, I2C0/1/2/3, UART0/1/2, HDMI CEC. and possibly UART3/4/5 depending on the mux. Some of those peripherals might still work if SYSCLK10 is not 48MHz. All depends if 38.4MHz can be divided by individial perripherals into a valid UART, I2C, HDMI frequencies.

    I guess if the inter-word delays was fairly large, sending one 32-bit word would eliminate the 3 inter-word delays between four 8-bit words.