cancel
Showing results for 
Search instead for 
Did you mean: 

Bug Report: STM32L0 USB registers show up in USB_SRAM SFRs

Gabriele Gorla
Associate

CubeIDE 1.5 Linux

create a new project with USB CDC

Start debug. Open SFRs window and scroll to USB_SRAM

USB registers at offsert 0x40 to 0x58 show up with obviously the wrong content.

The also correctly show up under USB_FS with the correct address and content.

3 REPLIES 3
Imen.D
ST Employee

Hello @Gabriele Gorla​ ,

Welcome to the STM32 Community :smiling_face_with_smiling_eyes:

I will check this reported issue and I will give you an update as soon as possible.

Thanks for your contribution.

Imen

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

Generally viewing peripheral registers in this manner is invasive and damaging to normal operation. There isn't a "magic window" and the debugger alters the peripherals internal state, this will break FIFO's in USB or SDMMC/SDIO type peripherals, and clear status bits in USART and ADC, etc.

Use very cautiously. If you need telemetry dump flow and content within your own code where you can limit the impact/side-effects.

#ObserverEffect

https://en.wikipedia.org/wiki/Observer_effect_(physics)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Gabriele Gorla
Associate

thanks for the replies.

I am aware of potential side effects or reading certain registers.

What I was looking for was to examine the BDT and the buffer content itself.

Instead the register template is applied to the USB RAM.