cancel
Showing results for 
Search instead for 
Did you mean: 

[OTG + CMSIS-mandated device headers] duplicate definitions

Posted on September 03, 2017 at 16:05

In stm32f407xx.h  V2.6.1  14-February-2017 as seen in CubeF4 1.15 and 1.16, the definition section under

/********************  Bit definition for OTG register  ********************/

repeats twice (around 2x42 lines).

Moreover, these definitions are duplicating the USB_OTG_GRXSTSP definitions and contrary to the latter they don't appear to be used anywhere else in Cube at all, so IMO both copies can be removed with no consequences whatsoever.

JW

PS. My ever-repeating request for adding non-single-bit bitfield values definitions into the CMSIS-mandated device headers still stands.

1 ACCEPTED SOLUTION

Accepted Solutions
Khouloud GARSI
Lead II
Posted on November 21, 2017 at 11:30

Hello Jan,

/******************** Bit definition for OTG register ********************/

repeats twice (around 2x42 lines).

-> The duplicated lines are removed from stm32f407xx.h in

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef4.html

.

Moreover, these definitions are duplicating the USB_OTG_GRXSTSP definitions

and contrary to the latter they don't appear to be used anywhere else in Cube at all,

so IMO both copies can be removed with no consequences whatsoever.

-> Correct! These definitions are duplicating the USB_OTG_GRXSTSP and are not used anywhere is Cube. However, they were used in previous drivers. Our customers who had started working when only those defines were present will be impacted if we remove them. For this reason, those defines will be kept.

Khouloud.

View solution in original post

4 REPLIES 4
Khouloud GARSI
Lead II
Posted on September 06, 2017 at 18:51

Hi Jan,

  • The bit definition for OTG register is repeated twice: The repeated section will be removed from the file on next releases.

Moreover, these definitions are duplicating the USB_OTG_GRXSTSP definitions and contrary to the latter they don't appear to be used anywhere else in Cube at all

     -> Those definitions are used on 'stm32f4xx_hal_pcd.c' and 'stm32f4xx_hal_hcd.c' files: They should be kept.

My ever-repeating request for adding non-single-bit bitfield values definitions into the CMSIS-mandated device headers still stands.

    -> Could you please give a brief explanation about this. What do you propose to add exactly?

Khouloud.

Posted on September 06, 2017 at 19:17

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6tC&d=%2Fa%2F0X0000000bxO%2FqG7Mn4TO_t9B9DE6dp89oC56FVtHBAfGuqSAr2RVVKE&asPdf=false
Posted on September 07, 2017 at 10:54

Hi Jan,

  • You're right. I will check if there's a reason for which they are defined. 

It's slightly off-topic here, I'll start a new thread soon.

-> Many thanks. This would be very helpful.

Khouloud.

Khouloud GARSI
Lead II
Posted on November 21, 2017 at 11:30

Hello Jan,

/******************** Bit definition for OTG register ********************/

repeats twice (around 2x42 lines).

-> The duplicated lines are removed from stm32f407xx.h in

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef4.html

.

Moreover, these definitions are duplicating the USB_OTG_GRXSTSP definitions

and contrary to the latter they don't appear to be used anywhere else in Cube at all,

so IMO both copies can be removed with no consequences whatsoever.

-> Correct! These definitions are duplicating the USB_OTG_GRXSTSP and are not used anywhere is Cube. However, they were used in previous drivers. Our customers who had started working when only those defines were present will be impacted if we remove them. For this reason, those defines will be kept.

Khouloud.