cancel
Showing results for 
Search instead for 
Did you mean: 

'L4 Cube - clearing OTG_GINTSTS bits

Posted on June 15, 2016 at 17:31

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?

JW
35 REPLIES 35
Posted on June 07, 2017 at 14:51

- 'DWORD' usage

- there is no description of function/purpose of OTG_HS_DEACHINT / OTG_HS_DEACHINTMSK / OTG_HS_DIEPEACHMSK1 / OTG_HS_DOEPEACHMSK1 registers. Moreover, in Table206, OTG_HS_DEACHINT is mis-spelled as OTG_HS_EACHHINT, and OTG_HS_DEACHINTMSK is mis-spelled as OTG_HS_EACHHINTMSK 

- additionally to unexplained 'alternative' usage marks to register bits, as reported  in 3.post of this thread (and there are quire a bit more than just listed in that post), there are also bits with no usage marks at all, e.g. some bits of OTG_HS_DIEPINTx and OTG_HS_DOEPINTx, and OTG_HS_DIEPDMAx/OTG_HS_DOEPDMAx, and there are more.

- there is a *blue* equal-mark in STUPCNT = 3, two instances

Reported to be managed as document (RM0090) related 

Moreover, in the CMSIS device header, the respective fields to 3 of these four registers have non-corresponding names, adding to the confusion.

I confirm this for 

OTG_HS_DIEPEACHMSK1 and OTG_HS_DOEPEACHMSK1. I will check where the error is (CMSIS header files or RM0090) and then let you know.

- there is no 'Direct access to data FIFO RAM' in 'L4's RM. It's a pity, an extra kilobyte of RAM may come handy at times, even if it is potentially slower and 'there is plenty RAM anyway'. Comment, please.

To be checked

-

in the CMSIS stm32YYYYxxx.h headers, USB_OTG_FS and USB_OTG_HS symbols are defined using the USB_OTG_GlobalTypeDef structure, which contains only the 'global' registers. Other registers are accessed in the library through ad-hoc concocted macros, inconsistent with the style of the CMSIS header. It's not that hard to write a typedef containing all the registers of the USB IP, even being fully backwards compatible. Please think about it.

What 'Other registers' are missing in CMSIS header files? Could you please explain and provide examples?

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Posted on June 07, 2017 at 23:15

In RM0351, bit B2BSTUP in OTG_DOEPINTx, and bit INEPNE in OTG_DIEPINTx, are marked as rc_w1/rw . There is no such abbreviation in the list in chapter 1.1. What does that exactly mean, then?

 

Already updated: 

INEPNE is “r�? (read only), B2BSETUP is “rc_w1�?.

Yes, updated in RM0351 (in rev.5 as of now), but not in RM0090 (rev.14) - both FS and HS.

There is at least a dozen of RMs containing the Synopsis USB IP in some version and configuration (L4/F2/F4/F7 if I am not mistaken), some of them with two separate instances of that text, for FS and HS. (Just as a quick test - I looked at B2BSTUP and INEPNE in RM0410 and yes, they are marked 'rc_w1/rw'). What's the point in updating only one of them, just because a user happened to stumble upon that one?

The same applies to all my documentation-related rants in this thread, including that to which you replied: '

Reported to be managed as document (RM0090) related' (although .

I understand you are following an internal report procedure, and I also understand how tedious is it to go through all related documents and fix them all, especially since I guess there are separate teams maintaining the individual sub-families' documentation; however, IMO there's no point in doing that at all and it's wasting both my and your time, if the result is to be half-baked.

Thank you for your tireless work.

Jan

Posted on August 15, 2017 at 14:04

Any news for

https://community.st.com/0D50X00009XkaB7SAJ

as updated by

https://community.st.com/0D50X00009XkaB7SAJ

?

Thanks,

Jan

Amel NASRI
ST Employee
Posted on July 06, 2018 at 12:24

Hello,

I consider this discussion as closed after the action done for USB chapter in almost all chapter: this chapter was reviewed and I think that your comments are implemented there.

Thanks for all your inputs.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Posted on July 06, 2018 at 13:45

I put the outstanding unanswered question into a new separate thread

https://community.st.com/0D50X00009XkaAaSAJ

 

JW