My samsung galaxy tab 2 wont charge when it is turned on
My samsung galaxy tab 2 wont charge most of the time when it is turned on. I am using the cable that came with the tab. But when switched off it is charging properly. I have no other applications or games installed in it. This happened right away after the firmware update. I did factory reset also. But still the same problem persists. Sometimes very rarely, it would charge when the tab is turned on. Or else I will get a red X over the battery icon. I have checked the cable by connecting to another samsung tab and it works perfectly.
How can I fix this or is there any way to roll back to the previous version of OS?