cancel
Showing results for 
Search instead for 
Did you mean: 

[Cube OTG USB] incorrectly written OTG_FS_DCFG.PFIVL value

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

3 REPLIES 3
Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

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

Looks like this did not stick.

JW

@Imen DAHMEN​