LPSPI Baud Rate Change

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPSPI Baud Rate Change

2,257 次查看
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?

标签 (1)
0 项奖励
回复
2 回复数

2,157 次查看
nxf45548
NXP Employee
NXP Employee

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

0 项奖励
回复

2,157 次查看
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 项奖励
回复