I am executing following code for SIM 900A GSM module.
import serial GPIO.setmode(GPIO.BOARD) port = serial.Serial("/dev/ttyAMA0", baudrate=9600, timeout=1) port.flush()
When I run the code Raspberry Pi freezes sometime. And due to repeated reboots without shutting down properly, it is corrupting SD card. I am using RPi 2. Please let me know what the problem could be.