Transition of a nanomechanical Sharvin oscillator towards the chaotic regime