add sample code for ecc protocal and ecc size setting