Bug Report: LPC_Open v2.08c, rtc_15xx.h Chip_RTC_ClearStatus does nothing

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by frh on Fri Jun 12 21:29:20 MST 2015
I had trouble with the code for the rtc example project. In the course of digging through the code and the UM I noticed that the code for the functions [u]Chip_RTC_GetStatus[/u] and [u]Chip_RTC_ClearStatus[/u] are identical and only return the value of the CTRL register. The example code should still work in spite of this because it clears bit's that are already 0 and are set later to 1 before the RTC is enabled.

Shouldn't ClearStatus do something like the following

    pRTC->CTRL &= ~stsMask;
    pRTC->CTRL |= stsMask & RTC_CTRL_OFD;   // must write a 1 to clear this bit

prior to the return?