Cell phone chip supplier Qualcomm Inc flipped to a loss for its fiscal second quarter, hurt by investment losses and hefty costs related to its legal settlement with arch-rival Broadcom Corp .

It reported results after announcing a settlement late Sunday night in which it will pay $891 million to Broadcom over four years to end the companies' long-standing legal battles over technology patents.

Qualcomm posted a net loss of $289 million, or 18 per share for its fiscal second quarter ended March 29, compared with a profit of $766 million, or 47 cents per share, in the same quarter a year earlier.

Excluding items, its loss would have been 3 cents per share compared with analyst expectations for a profit of 40 cents per share, accoring to Reuters Estimates.

Revenue fell to $2.46 billion from $2.6 billion in the year-earlier quarter but were ahead of average analyst expectations for $2.35 billion, according to Reuters Estimates.

(Reporting by Sinead Carew; Editing by Derek Caney)