How do I redefine F_CPU

Since you want to override the board default f_cpu, you want the board_build.f_cpu parameter.

i.e. In your platformio.ini:
board_build.f_cpu =160000000L

1 Like