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

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

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

453 Views
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.
Labels (1)
0 Kudos
Reply
2 Replies

394 Views
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 Kudos
Reply

394 Views
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 Kudos
Reply