AnsweredAssumed Answered

What are the details about the lpspiSrcClk field?

Question asked by Dann Daggett on Mar 29, 2019
Latest reply on Apr 1, 2019 by Dann Daggett

Hello All, this is my first newbie post so please correct me if I've put it in an incorrect forum.


In lpspi_master_driver.h it defines lpspi_master_config_t.  Most fields are self-explanatory except the lpspiSrcClk field.  My question is, what does that field mean?  What kind of value should be set there?  The example program has this set to .lpspiSrcClk = 48000000U,  Is that a magic number?  What does it mean?  Are there any detailed docs that discuss this?


typedef struct {
   uint32_t bitsPerSec; /*!< Baud rate in bits per second*/
   lpspi_which_pcs_t whichPcs; /*!< Selects which PCS to use */
   lpspi_signal_polarity_t pcsPolarity; /*!< PCS polarity */
   bool isPcsContinuous; /*!< Keeps PCS asserted until transfer complete */
   uint16_t bitcount; /*!< Number of bits/frame, minimum is 8-bits */
   uint32_t lpspiSrcClk; /*!< Module source clock */
   lpspi_clock_phase_t clkPhase; /*!< Selects which phase of clock to capture data */
   lpspi_sck_polarity_t clkPolarity; /*!< Selects clock polarity */
   bool lsbFirst; /*!< Option to transmit LSB first */
   lpspi_transfer_type transferType; /*!< Type of LPSPI transfer */
   uint8_t rxDMAChannel; /*!< Channel number for DMA rx channel. If DMA mode isn't used this field will be ignored. */
   uint8_t txDMAChannel; /*!< Channel number for DMA tx channel. If DMA mode isn't used this field will be ignored. */
   spi_callback_t callback; /*!< Select the callback to transfer complete */
   void *callbackParam; /*!< Select additional callback parameters if it's necessary */
} lpspi_master_config_t;


Thank you very much,