knocking on 1990 Toyota Tercel

Driving steady, I hear a knocking, accelerating or complete deccelerating, knock is gone. Is this a piston pin going bad, pistons where replaced around 10k miles ago.

Asked by for the 1990 Toyota Tercel
I have a 94 tercel and it throws a knock sensor code try checking that