SPI not supported in CGU?

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

SPI not supported in CGU?

596 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DT1 on Tue Jun 03 09:39:48 MST 2014
Hi,

I'm currently writing a driver to support the SPI module of the LPC4357 since it doesn't seem to be existant in the periph library (no driver, no examples). Before somebody suggest that SPI is SSP, I know. I'm using both SSP ports currently (in SPI) and it's working fine. But I also need to make the SPI port working.

I've noticed that the clocking is not supported in the CGU driver of the periph library. According to the LPC4357 User Manual, the SPI clock branch is just after the SPIFI, but in the CGU code:

...
0x6C,//CGU_BASE_M4,
0x70,//CGU_BASE_SPIFI,
-1,//CGU_BASE_RESERVE,
0x78,//CGU_BASE_PHY_RX,
...


and

...
CGU_BASE_M4,/**< ARM Cortex-M4 Core base clock */
CGU_BASE_SPIFI,/**< SPIFI base clock*/
CGU_BASE_PHY_RX = CGU_BASE_SPIFI + 2, /**< Ethernet PHY Rx base clock*/
CGU_BASE_PHY_TX,/**< Ethernet PHY Tx base clock*/
...


I'm wondering why the SPI module seems to be missing everywhere. Is it functional?

Thanks,
DT1
Labels (1)
0 Kudos
Reply
2 Replies

564 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DT1 on Wed Jun 04 21:57:59 MST 2014
Indeed, that helped. I'm not using LPCOpen that's why I didn't see it at first.

I coded my own SPI driver (like the periph lib) based on the files you mentioned and everything works fine. Thanks!
0 Kudos
Reply

564 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rocketdawg on Tue Jun 03 12:25:24 MST 2014
well I see both
spi_18xx_43xx.h
ssp_18xx_43xx.h
in the lpc_chip_43xx/inc  directory
and I see the source file in
lpc_chip_43xx/src/spi_18xx_43xx.c

looks like it is supported in LPCOpen
0 Kudos
Reply