Part Number:TMS320F28027F
Tool/software: Code Composer Studio
Hi,
From www.ti.com/.../sprufn3d.pdf, GPADIR is 0 (input) after reset, GPAPUD (for GPIO0~GPIO11) is 1 (disabled) after reset, I am able to confirm this via CCS Register Viewer.
When I enable the pull-up for GPIO1, the Halt mode power consumption will be almost 200uA (case 2), but if I set the write 0 to GPADIR again (see case 3), the power consumption returns to 50uA correctly.
As you can see for all cases the GPADIR is always 0 for GPIO1 (default value after reset) and there is no difference in register values for case 2 vs case 3. Any explanation to this behavior?
The pin is floating on my board, so my intention is to leave it as input and enable its pull-up.
Case 1)
GPIO_setMode(obj->gpioHandle,GPIO_Number_1,GPIO_1_Mode_GeneralPurpose);
GPADIR = 0x00010000
GPAPUD = 0x00010F17
GPADAT = 0x300E10EA
Halt mode total current: 54.4uA
Case 2)
GPIO_setPullUp(obj->gpioHandle,GPIO_Number_1,GPIO_PullUp_Enable);
GPIO_setMode(obj->gpioHandle,GPIO_Number_1,GPIO_1_Mode_GeneralPurpose);
GPADIR = 0x00010000
GPAPUD = 0x00010F15
GPADAT = 0x300E10EA
Halt mode total current: 189.5uA
Case 3)
GPIO_setPullUp(obj->gpioHandle,GPIO_Number_1,GPIO_PullUp_Enable);
GPIO_setDirection(obj->gpioHandle,GPIO_Number_1,GPIO_Direction_Input);
GPIO_setMode(obj->gpioHandle,GPIO_Number_1,GPIO_1_Mode_GeneralPurpose);
GPADIR = 0x00010000
GPAPUD = 0x00010F15
GPADAT = 0x300E10EA
Halt mode total current: 54.4uA
Thanks,
SY