I manage to flash ATTiny45 with 8MHz bootloaded with Arduino IDE using ATtinyCore (Spence Konde) with 45/85(Optiboot) option. The programmer is USBasp with Zadig driver (libusbK v184.108.40.206).
Then I upload the program with AVRdudess without fuse setting.
My test program is just a blink sketch without setting F_CPU time.
I saw the LED flashing faster than 1Mhz clock frequency and I confirm sure this is running at 8MHz.
My problem is when I pull out the USBasp from my notebook, and then I reinsert back the USBasp into the notebook, the LED flash back like 1Hz. (the ATTiny45 revert back to factory default of 1MHz clock frequency).
When it the LED is running at 1Hz after reset, I try to read the fuse, the fuse is still lowfuse :E2, highfuse :D7, ExtendedFuse : FF. That means the fuse is correct and is still there.
I have try to google no other facing this problem. Is there a bug in the ATTinyCore issue ?
I have spend few days trying to fix this issue. Kindly help and advice. Thank you very much.