AnsweredAssumed Answered

SDK 2.7.0 for LPC54S018M up to date?

Question asked by Rex Lam on Jan 13, 2020
Latest reply on Jan 15, 2020 by xiangjun.rong

I went to https://mcuxpresso.nxp.com and downloaded SDK 2.7.0 for LPC54S018M (the MCU). I selected all toolchains. After importing the SDK archive into the latest MCUXpresso IDE (11.1.0 build 3209), I imported an SDK example - lpc54s018m_keyboard2mouse_bm. This project fails to build with the following compiler errors:

Description    Resource    Path    Location    Type
'kCLOCK_EMC' undeclared (first use in this function); did you mean 'kCLOCK_Eth'?    board.c    /lpc54s018m_keyboard2mouse_bm/board    line 114    C/C++ Problem
'kCLOCK_Flexcomm0' undeclared (first use in this function); did you mean 'kCLOCK_FlexComm0'?    board.h    /lpc54s018m_keyboard2mouse_bm/board    line 30    C/C++ Problem

I compared this with older SDKs and found that kCLOCK_EMC and kCLOCK_Flexcomm0 are not defined in fsl_clock.h. This is what is defined in fsl_clock.h:

/*! @brief Clock name used to get clock frequency. */
typedef enum _clock_name
{
    kCLOCK_CoreSysClk,  /*!< Core/system clock  (aka MAIN_CLK)                       */
    kCLOCK_BusClk,      /*!< Bus clock (AHB clock)                                   */
    kCLOCK_ClockOut,    /*!< CLOCKOUT                                                */
    kCLOCK_FroHf,       /*!< FRO48/96                                                */
    kCLOCK_UsbPll,      /*!< USB1 PLL                                                */
    kCLOCK_Mclk,        /*!< MCLK                                                    */
    kCLOCK_Fro12M,      /*!< FRO12M                                                  */
    kCLOCK_ExtClk,      /*!< External Clock                                          */
    kCLOCK_PllOut,      /*!< PLL Output                                              */
    kCLOCK_UsbClk,      /*!< USB input                                               */
    kCLOCK_WdtOsc,      /*!< Watchdog Oscillator                                     */
    kCLOCK_Frg,         /*!< Frg Clock                                               */
    kCLOCK_AsyncApbClk, /*!< Async APB clock                                         */
} clock_name_t;

Here are the offending lines in board.c and board.h:

    dynTiming.tWr_Ns = (1000000000 / CLOCK_GetFreq(kCLOCK_EMC) + SDRAM_TWRDELT_NS); /* one clk + 6ns */
#define BOARD_DEBUG_UART_CLK_FREQ CLOCK_GetFreq(kCLOCK_Flexcomm0)

Then I returned to https://mcuxpresso.nxp.com and downloaded SDK 2.7.0 for LPCXpresso54S018M (the dev board). After importing into MCUXpresso, I successfully built lpcxpresso54s018m_all_keyboard2mouse_bm. Here are the corresponding lines in board.c and board.h:

    dynTiming.tWr_Ns                = (1000000000 / emcFreq + SDRAM_TWRDELT_NS); /* one clk + 6ns */
#define BOARD_DEBUG_UART_CLK_FREQ CLOCK_GetFlexCommClkFreq(0U)

Is SDK 2.7.0 not updated properly for LPC54S018M (the MCU, not the dev board)?

Outcomes