fpoussin / QStlink2

Cross-platform STLink v2 GUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nucleo64 STM32F091RC "Device not found in database"

diond31 opened this issue · comments

I would like to develop on the STM32 M0 line, but unfortunately QSTLink2 responds with "Device not found in database!" when trying to connect.

Same here:

3714 - Info: ChipID: 0x442
3715 - Error: Did not find chipID!

Is it as simple as putting this in the devices.xml file?

<device type="STM32F09x" coretype="CM0">
  <core_id>0x0bb11477</core_id>
  <chip_id>0x442</chip_id>
  <flash_size_reg>0x1FFFF7CC</flash_size_reg>
  <flash_int_reg>0x40022000</flash_int_reg>
  <buffer_size>0x1000</buffer_size>
  <loader>loader_f0.bin</loader>
</device>

Tad, it is that "simple"...Brilliant!

image

It used to say 32 devices and connect resulted in "Device not found in database! Disconnecting... Disconnected..." message that so many others have experienced.

For others that might find this thread useful: you will have to change permissions to devices.xml prior to editing.

Thanks again Tad

Glad you could fix it by yourself!
Can you submit a pull request to merge the fix?

Thanks

Yes that should be correct.

fpoussin...I'll pull the devices.xml and supply a merge request.

vk4tux...I suspect in some cases they are, but I don't have a complete understanding of the xml file parameters as they are related to Qstlink2, the ARM family of architectures, or the device specific data sheets.

This fix was a cut and paste of the "STM32F07x" XML and changing with tadmorgan's fix (which I verified by watch the terminal window after running "qstlink2 -v"). I know the Nucelo-STM32F07x only has 128k of flash, so I expected the flash size to be wrong as the Nucleo-STM32F09x has 256k, but the screen shot above shows that Qstlink2 found all 256k.

Flash size is detect at runtime by reading a register, so it should always be correct.

You just need to make sure the buffer size is not bigger than the ram (0X1000 here, so 8Kb)

reopen to pull request

@fpoussin the STM32F09x has 32Kb of SRAM. Would changing <buffer_size>0x8000</buffer_size> allow access to all 32Kb of SRAM?