/* param base FLEXSPI peripheral base address. param index From which index start to update. It could be any index of the LUT table, which also allows user to update command content inside a command. Each command consists of up to 8 instructions and occupy 4*32-bit memory. param cmd Command sequence array. param count Number of sequences.  */
void FLEXSPI_UpdateLUT(FLEXSPI_Type *base, uint32_t index, const uint32_t *cmd, uint32_t count)
/* param base FLEXSPI peripheral base address. param index From which index start to update. It could be any index of the LUT table, which also allows user to update command content inside a command. Each command consists of up to 8 instructions and occupy 4*32-bit memory. param cmd Command sequence array. param count Number of sequences.  */
void FLEXSPI_UpdateLUT(FLEXSPI_Type *base, uint32_t index, const uint32_t *cmd, uint32_t count)
{
    assert(index < 64U);
    uint8_t i = 0;
    volatile uint32_t *lutBase;
    while (!FLEXSPI_GetBusIdleStatus(base))
    {
    }
    base->LUTKEY = FLEXSPI_LUT_KEY_VAL;
    base->LUTCR  = 0x02;
    lutBase = &base->LUT[index];
    for (i = 0; i < count; i++)
    {
        *lutBase++ = *cmd++;
    }
    base->LUTKEY = FLEXSPI_LUT_KEY_VAL;
    base->LUTCR  = 0x01;
}