Figure(b) gives the forces .
Reactional force on rod by ground
Reactional force on rod by wall
is the maximum angle the rod can make with horizontal.
Equating the forces on verticle direction we get
Equating the forces on horizontal direction we get
Now the torque about point B should be balanced