I will share the schematic in some time.My basic question is, I simply connected this MCU to power supply of 5V with only PWM generating program inside with no connection of IC with outside hardware, it consumes 24mA current. If I disable the PWM block the current comes to 12mA. Outside hardware power is removed in above case.
I expect the basic MCU must not take this huge current.
With your configuration, the 4000S device consumes around 3.5 mA of current. I tried your configuration with one of kits ( CY8CKIT-041-40XX - PSoC 4000S Pioneer kit) and obtained similar results. Can you please share your schematic and project file so that we can try to find out the issue.
Please use pSoC 4 power estimator to get the approximate power consumption value for your configuration.