Skip to main content
waclawek.jan
Super User
April 12, 2022
Question

[Cube OTG USB] incorrectly written OTG_FS_DCFG.PFIVL value

  • April 12, 2022
  • 3 replies
  • 961 views

In the OTG USB implementation, in USB_DevInit(), the PFIVL field of OTG_FS_DCFG is supposed to be written, eg. here, in the following way:

USBx_DEVICE->DCFG |= DCFG_FRAME_INTERVAL_80;

the DCFG_FRAME_INTERVAL_xx constants are defined in the respective header as 0, 1, 2, 3; i.e. the value of the bitfield. It means, that before ORing, they need to be left-shifted by USB_OTG_DCFG_PFIVL_Pos, which is nonzero.

Now the exact constant DCFG_FRAME_INTERVAL_80 is zero, and the default value of PFIVL field is zero too, so as it is now it is entirely harmles; a bug nonetheless.

Checked in CubeL4 and CubeF4 as of now (12.Apr 2022) it was the same; probably it's same in all OTG implementations.

JW

This topic has been closed for replies.

3 replies

ST Technical Moderator
April 14, 2022

Hello @Community member​ ,

Thank you for your feedback.

I escalated this issue internally to the appropriate team (Internal ticket number 126442).

I will get back to you soon with update.

Thanks

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
waclawek.jan
Super User
April 14, 2022

Thanks Imen.

There's no need to pay more attention to this, it's a minor and in its present state harmless issue. Just trying to improve.

Jan

waclawek.jan
Super User
June 12, 2023

Looks like this did not stick.

JW

@Imen DAHMEN​