Bugreport: LPCOpen 2.15 for LPC824. SPI port Switch matrix clock is not enabled before setup.

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

Bugreport: LPCOpen 2.15 for LPC824. SPI port Switch matrix clock is not enabled before setup.

778 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by larsen on Sat May 30 16:53:11 MST 2015
There is a bug in the example project periph_spi in the file named spi.c when compiled for BOARD_NXP_LPCXPRESSO_824.

In lines 101 to 104 the switch matrix (SWM) is programmed, but the SWM clock is not switched on before setting the matrix. This effectively renders the commands non functional and the example loopback test code fails at the final buffer test.

To repair, simply enable the SWM clock, before writing to the SWM (and off again afterwards to save power).This could look like this:
#elif defined(BOARD_NXP_LPCXPRESSO_824)
Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_SWM);//<----- add this line to enable SWM clock
Chip_SWM_MovablePinAssign(SWM_SPI1_SSEL0_IO, 15);
Chip_SWM_MovablePinAssign(SWM_SPI1_SCK_IO, 24);
Chip_SWM_MovablePinAssign(SWM_SPI1_MISO_IO, 25);
Chip_SWM_MovablePinAssign(SWM_SPI1_MOSI_IO, 26);
Chip_Clock_DisablePeriphClock(SYSCTL_CLOCK_SWM);//<----- add this line to save power
#else

Please update the distribution code.
标签 (1)
0 项奖励
回复
2 回复数

719 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by larsen on Mon Jun 01 08:18:38 MST 2015
very good. Please also include this issue reported here in your update task list
0 项奖励
回复

719 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Support on Mon Jun 01 07:53:00 MST 2015
Hi Larsen,
Thank you for reporting this bug - we are confirming the issue and will fix it as well as investigate how this passed our release testing so we do not release non-functional examples!

Best regards,
-NXP Support
0 项奖励
回复