This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BIOS PSP GPIO driver for C6748

Hello,

The Gpio_readBankInterruptStatus function in the mentioned driver doesn't handle bank number 8, there are 9 banks in C6748. Also instead of the switch a simpler condition could be used, like checking if(bank & 1) for odd or even banks.

Best regards,

David.

  • Hi David,

    I assume you are using the BIOSPSP version 03.00.01.00

    Thanks for pointing this out. An IR(SDOCM00094427) has been raised to track it. This will be fixed in the next upcoming releases.

    Also, thanks for the suggestion. The reason why the switch case was used, was to give a better readability to the users.

    Best Regards,

    Raghavendra

  • Hello,

    Is there any update on this issue (SDOCM00094427) as we're having the same problem here.

    We've tried with the latest BIOSPSP version of 03.01.01.00 but a fix hasn't made its way through yet.

    Many thanks,

    David

  • Hi Dave,

    I don't think there will be, I just don't use that function and included in my project is the function below which is called in my interrupt routine:

    static Int32 ReadBankInterruptStatus(Gpio_Object *instHandle, Gpio_IntrStatus *intrStatus)
    {
    Uint32 index;
    CSL_GpioRegsOvly gpioBaseAddress;
    Gpio_Bank *bankInfo = NULL;
    Int32 status = IOM_COMPLETED;
    Uint32 tempVal = 0;

    #ifndef PSP_DISABLE_INPUT_PARAMETER_CHECK //TODO remove the code once driver was tested
    if((NULL == instHandle) || (NULL == intrStatus))
    {
    status = IOM_EBADARGS;
    }
    else if(NULL == instHandle->deviceInfo.baseAddress)
    {
    status = IOM_EBADARGS;
    }
    else
    {
    status = IOM_COMPLETED;
    }
    #endif

    if(IOM_COMPLETED == status)
    {
    gpioBaseAddress = instHandle->deviceInfo.baseAddress;

    bankInfo = &instHandle->BankInfo[(intrStatus->bank)];

    index = (intrStatus->bank)/2u;

    if(Gpio_InUse_Yes != bankInfo->inUse)
    {
    tempVal = gpioBaseAddress->BANK[index].INTSTAT;
    }
    else
    {
    status = IOM_EBADARGS;
    }
    }

    if(IOM_COMPLETED == status)
    {
    if((intrStatus->bank & 1) == 0)//even banks is lower 16bits of INTSTAT(32) register
    {
    intrStatus->value = (Uint16)(tempVal);
    }
    else //odd banks is upper 16bits of INTSTAT
    {
    intrStatus->value = (Uint16)(tempVal >> 16);
    }
    }
    return (status);
    }

    Also seems the 03.01.01.00 version removed some drivers so I still use the previous 03.00.01.00

    Best regards,

    David.

  • Thanks David,

    We ended up doing essentially the same to work around the issue.

    Cheers,

    Dave