LPSPI Baud Rate Change

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPSPI Baud Rate Change

885 Views
jeffthompson
Contributor V

I initially configure my SPI device at at a baud rate of 10 MHz. Following that, it's able to run at 30 MHz, so I get a copy of masterConfig by calling LPSPI_MasterGetDefaultConfig, change the baudRate member of the copy to 30000000, and then call LPSPI_MasterInit, passing it the LPSPI peripheral's base address, the modified copy of masterConfig, and the LPSPI clock frequency. I got the base address and clock frequency from peripherals.h, and they match the settings I chose using MCUXpresso ConfigTools Peripherals tools. However, the baud rate does not change. What else do I need to do?

Labels (1)
0 Kudos
2 Replies

785 Views
nxf45548
NXP Employee
NXP Employee

Can you please provide us the part number of the product that you are using? 

0 Kudos

785 Views
jeffthompson
Contributor V

MIMXRT1062DVL6A

Found the problem. Before calling LPSPI_MasterInit, I had to call LPSPI_Enable( base, false ) to disable the peripheral first. The MasterInit call enables it automatically.

0 Kudos