AnsweredAssumed Answered

'L4 Cube - clearing OTG_GINTSTS bits

Question asked by waclawek.jan on Jun 15, 2016
Latest reply on Aug 29, 2017 by waclawek.jan
Branched to a new discussion
According to RM0351 Rev.4, all OTG_GINTSTS (interrupt status register) bits are rc_w1 (except those which are read-only or reserved). However, the macro supposed to be used for clearing these bits in [STM32Cube_FW_L4_V1.5.0]\Drivers\STM32L4xx_HAL_Driver\Inc\stm32l4xx_hal_pcd.h goes:

#define __HAL_PCD_CLEAR_FLAG(__HANDLE__, __INTERRUPT__)    (((__HANDLE__)->Instance->GINTSTS) &=  (__INTERRUPT__))

Not a hard bug, but IMO the RMW is redundant.

Am I overlooking something?