TGTSoraham / NextGen_Workflow

1 stars 0 forks source link

There are problem in PMP mode config function #98

Closed MichaelScofield2 closed 8 years ago

MichaelScofield2 commented 8 years ago

void DRV_PMP0_ModeConfig(void) {

/*Configure Main Communication Mode */    
PLIB_PMP_OperationModeSelect(PMP_ID_0, PMP_MASTER_READ_WRITE_STROBES_MULTIPLEXED);

/*Set the data width size*/
PLIB_PMP_DataSizeSelect(PMP_ID_0, PMP_DATA_SIZE_16_BITS);
/*Setup PMP Address Registers */ 
PLIB_PMP_AddressSet(PMP_ID_0, 0);

**\ This line --> PLIB_PMP_AddressPortEnable(PMP_ID_0, 0xffff >> (16 - 16));

PLIB_PMP_AddressIncrementModeSelect(PMP_ID_0, PMP_ADDRESS_AUTO_INCREMENT);
/*Setup Read Strobe Registers */    
PLIB_PMP_ReadWriteStrobePortEnable(PMP_ID_0);
PLIB_PMP_ReadWriteStrobePolaritySelect(PMP_ID_0, PMP_POLARITY_ACTIVE_LOW);
/*Setup Write Strobe Registers */
PLIB_PMP_WriteEnableStrobePortEnable(PMP_ID_0);
PLIB_PMP_WriteEnableStrobePolaritySelect(PMP_ID_0, PMP_POLARITY_ACTIVE_LOW);

/* Configure the wait states */
PLIB_PMP_WaitStatesDataSetUpSelect(PMP_ID_0, PMP_DATA_WAIT_TWO);
PLIB_PMP_WaitStatesStrobeSelect(PMP_ID_0, PMP_STROBE_WAIT_3);
PLIB_PMP_WaitStatesDataHoldSelect(PMP_ID_0, PMP_DATA_HOLD_2);

}

If this has enable, I can not use UC_IO But that line has removed, I can use digital input output

Please fix bug krub ^_^

MichaelScofield2 commented 8 years ago

In this file has gen by harmony. This bug can fix by use PMP P'Long version.

MichaelScofield2 commented 8 years ago

Can fix by add PMP driver file from Long. That is very perfect