Skip to content

What is the correct way to manually select SPIPS device? #377

@armandas

Description

@armandas

Until version 2025.2, I have been using XSpiPs_SetSlaveSelect to manually select my device. This function is not used internally inside embeddedsw, so it seems to me that manual selection would be the main purpose of this function.

However, in 2025.2, in particular commit 2d2965e, adds a guard condition for manual select:

if (XSpiPs_IsManualChipSelect(InstancePtr) == FALSE) {
    /*
        * Read the config register, update the slave select value and write
        * back to config register.
        */
    ConfigReg = XSpiPs_ReadReg(InstancePtr->Config.BaseAddress,
        XSPIPS_CR_OFFSET);
    ConfigReg &= (u32)(~XSPIPS_CR_SSCTRL_MASK);
    ConfigReg |= InstancePtr->SlaveSelect;
    XSpiPs_WriteReg(InstancePtr->Config.BaseAddress, XSPIPS_CR_OFFSET,
        ConfigReg);
}

If XSpiPs_SetSlaveSelect cannot be used for manual selection, what is the purpose of this function? And which API am I supposed to use for manual selection?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions