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.

MSP432P411V: query on setting the desired clock frequency for SPI clock

Part Number: MSP432P411V


Hi,

the requirement is to set the SPI clock frequency to 750Khz, can you please tell me whether my understanding is correct with respective the clock configuration for SPI?

code snippet from the available SDK in MSP432P4111:

as from the above code snippet it clear the SMCLK clock source is 3 Mhz, which is derived from:

  

now my query is how the desired frequency is can be is calculated?

with the reference to the data sheet, i got a input as below:

 whether the Prescaler/Divider  register is filled with value 6 to get the 500Khz desired SPI clock?

Thank you,

Maniram 

  • The eUSCI has only a simple divider (BRW), not a fractional one. So requesting BRCLK=SMCLK (3MHz) and SPI clock 750kHz will result in BRW=4. The division is simple integer division (no rounding), but these values work out well.

            EUSCI_B_CMSIS(moduleInstance)->BRW =
                    (uint16_t) (config->clockSourceFrequency
                            / config->desiredSpiClock);
    

    Given this, it's not obvious how to generate a 1.472MHz SPI clock (that's why I didn't try to answer the other post) but maybe someone else has a trick.

**Attention** This is a public forum