florisla / stm32loader

Flash firmware to STM32 microcontrollers using Python.
GNU General Public License v3.0
111 stars 55 forks source link

BlueNRG flash size readout #72

Closed dbeinder closed 9 months ago

dbeinder commented 1 year ago

Has reading the flash size from the flash controller peripheral been tested on BlueNRG? On my test board (STEVAL-IDB008V2) the bootloader refuses to read anything other than flash and SRAM:

C:\proj\stm32loader> python -m stm32loader -p COM9 -P none -b115200 -f NRG
Activating bootloader (select UART)
Bootloader activation timeout -- retrying
Bootloader version: 0x3
Metal fix: 0x0
Mask set: 0x1
Chip id: 0x2F (BlueNRG-2 256kB)
Something was wrong with reading chip family data: NACK 0x11 length failed

The same thing happens on BlueNRG-LP (BlueNRG-355MC), I've had to make some changes: https://github.com/dbeinder/stm32loader/commit/03c41de7985cba3a58e76fa48801f4cd1d2077e2 I'll probably create a cleaner pull request after https://github.com/florisla/stm32loader/issues/68 For now I've added NRG3 as a new family, but if we really can't read peripherals, then there isn't much new to be added for BlueNRG-LP and it can go into a common family with BlueNRG-1/2.

florisla commented 1 year ago

I don't have any evidence of successful readout of flash size on BlueNRG.

My branch to fix 68 is fairly advanced, it would be great if you could test that. I'll push it later this week.

dbeinder commented 10 months ago

Still happy to test the new branch and add BlueNRG-LP when you're ready

florisla commented 10 months ago

Thanks, sorry for the stall. Could you try this branch: https://github.com/florisla/stm32loader/tree/feat/device-table .

I have improved the testing harness so going forward it should become easier to avoid regressions.

If the NRG family has some peculiarities, then we can extend the DeviceFlag enum to have markers for those.

florisla commented 9 months ago

This will be part of the next release.