Skip to main content
Gabriele Gorla
Associate
December 30, 2020
Question

Bug Report: STM32L0 USB registers show up in USB_SRAM SFRs

  • December 30, 2020
  • 3 replies
  • 918 views

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.

This topic has been closed for replies.

3 replies

Technical Moderator
December 31, 2020

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

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
Tesla DeLorean
Guru
December 31, 2020

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Gabriele Gorla
Associate
January 6, 2021

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.