change to use static variable instead of malloc pointer for more reliability
Peripherals & Central library