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.

Two bugs in 2.0.0.7



I don't know if these have been posted but we have uncovered two bugs in the code.

The first is in edma.c

void EDMA3DisableDmaEvt(unsigned int baseAdd,
                        unsigned int chNum)
{
    if(chNum < 32)
    {
         /* (EECR) - set corresponding bit to disable event                      */
         HWREG(baseAdd + EDMA3CC_S_EECR(regionId)) |= (0x01u <<  chNum);
    }
    else
    {
         /* (EECRH) - set corresponding bit to disable event                      */
         HWREG(baseAdd + EDMA3CC_S_EECRH(regionId)) |= (0x01u <<  chNum);
    }
}

The else statement needs to be

         HWREG(baseAdd + EDMA3CC_S_EECRH(regionId)) |= (0x01u <<  (chNum-32));

 

The second bug is in gpmc.h

#define GPMC_WE_OE_TIMING_CONFIG(WEOffTime, WEExtDelayFlag, WEOnTime, OEAADMuxOffTime, OEOffTime, OEExtDelayFlag, OEAADMuxOnTime,OEOnTime )   ((unsigned int) \
                                                             ((WEOffTime << GPMC_CONFIG4_0_WEOFFTIME_SHIFT) & GPMC_CONFIG4_0_WEOFFTIME) | \
                                                             ((WEExtDelayFlag << GPMC_CONFIG4_0_WEEXTRADELAY_SHIFT) & GPMC_CONFIG4_0_WEEXTRADELAY) | \
                                                             ((WEOnTime << GPMC_CONFIG4_0_WEONTIME_SHIFT) & GPMC_CONFIG4_0_WEONTIME) | \
                                                             ((OEAADMuxOffTime << GPMC_CONFIG4_0_OEAADMUXOFFTIME_SHIFT) & GPMC_CONFIG4_0_OEAADMUXOFFTIME) | \
                                                             ((OEOffTime << GPMC_CONFIG4_0_OEOFFTIME_SHIFT) & GPMC_CONFIG4_0_OEOFFTIME) | \
                                                             ((OEExtDelayFlag << GPMC_CONFIG4_0_WEEXTRADELAY_SHIFT) & GPMC_CONFIG4_0_WEEXTRADELAY) | \
                                                             ((OEAADMuxOnTime << GPMC_CONFIG4_0_OEAADMUXONTIME_SHIFT) & GPMC_CONFIG4_0_OEAADMUXONTIME) | \
                                                             ((OEOnTime << GPMC_CONFIG4_0_OEONTIME_SHIFT) & GPMC_CONFIG4_0_OEONTIME))

The part of the define containing ((OEExtDelayFlag << GPMC_CONFIG4_0_WEEXTRADELAY_SHIFT) & GPMC_CONFIG4_0_WEEXTRADELAY) | \

needs to use OE instead of WE in both places.