I'm trying to use the HS SPI interface on a LPC55S06JHI48.
It is connected to flexcomm 8 according to the datasheet and manual but the device with this package. When I try to access SPI8 I get this error
assertion "i < (uint32_t)FSL_FEATURE_SOC_FLEXCOMM_COUNT" failed: file ".fsl_flexcomm.c", line 106, function: FLEXCOMM_GetInstance
FSL_FEATURE_SOC_FLEXCOMM_COUNT is defined as 8 in the LPC55S06_features.h file.
In that same file is this line
/* @brief FLEXCOMM8 SPI(HS_SPI) INDEX 8 */
#define FSL_FEATURE_FLEXCOMM8_SPI_INDEX (8)
How do I go about using this SPI interface with the SDK? (version 2.10.0)
Turns out you can get it to work using the SDK if you change two lines LPC55S06_features.h file
#define FSL_FEATURE_SOC_SPI_COUNT (9) // Changed 4 to 9
#define FSL_FEATURE_SOC_FLEXCOMM_COUNT (9) // Changed 8 to 9
After these changes it can be accessed as SPI8
The SDK needs to be updated to support the HSSPI interface that isn't such a nasty hack.
Hi,
As a workaround, I think you can use the code to set up the high speed spi.
CLOCK_EnableClock(kCLOCK_Hs_Lspi);
FLEXCOMM8->PSELID=0x02;
Hope it can help you
BR
XiangJun Rong
Hi,
I have tried to change to SPI8 from SPI7, no problem, I can pass compilation without any problem.
BR
XiangJun Rong