-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable programm if rdp>0 #23
Comments
Can't reproduce with my STM32F103C8T6. /* testconf.h */
#define DFU_SEAL_LEVEL 1
#define DFU_VERIFY_CHECKSUM CRC64FAST
#define DFU_STR_MANUF "Cdi.biz.ua"
#define DFU_STR_PRODUCT "Bootloader"
#define DFU_BOOTKEY 0x77777777
#define DFU_BOOTKEY_ADDR 0x20001000
#define DFU_BOOTSTRAP_GPIO _DISABLE
#define DFU_DBLRESET_MS 500
#define DFU_APP_START 0x8002000 Build log:
lsusb
dfu-util
checking RDP by ST tool
|
make log
After flash i do power cycle. Dmesg empty. i get new usb device, but some different
and dfu-util
While rdp=0 all work fine |
I was checked STM32F103 errata sheets and I have no more ideas, but I found one strange thing.
From 2nd message:
The different serial numbers. Was it the same chip? If yes, it must be something wrong with MCU. "SerialNumber" string descriptor is auto-generated (FNV1A32) from the factory programmed 96-bit chip UID. It must be the same on the same chip. |
no , different, first from home second i test from work |
As i understand it goes the following sequence if DFU_SEAL_LEVEL 0 tcheck is rdp on but itself bootloader not turn on rdp !!! |
I found problem |
I try do some test on this cpu if i find solution i add it.
work fine, used flashstm library
i see some code difference, but must work , i don't understand why code not worked |
Is this code work well with fake F103? I see only two differences with my code. (stm32f103.S#L401)
|
yes this code work
worked too |
part of boot code from stm bootloader https://github.com/trebisky/stm32f103/blob/master/serial_boot/boot.txt
i change your section to
rdp is set but i still have error about flash erase i try
and this code not work |
https://github.com/rogerclarkmelbourne/STM32duino-bootloader
still no effect |
@dmitrystu Откровенно говоря я так не понял что не хватает и почему работает загрузчик STM32duino-bootloader при установленной защите а ваш нет, в то-же время судя по даташиту надо именно биты менять а не байт целиком, пробовал повторить алгоритм отсюда https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/df689808b6030280480c0d151ee9c552ecf6b405/hardware.c#L330 но результат нулевой, может я криво код написал , не знаю , пока идеи закончились |
Как я понимаю, при использовании китайского клона F103 возникает ошибка стирания страницы при записи во флеш, причем независимо от того, каким образом был установлен RDP: бутлоадером, пользовательским кодом или через stprog. Сам RDP устанавливается корректно. Так ? Попробую найти такой клон. |
чем закончилось чтиво?) (первый коммент на github не на англ) |
If DFU_SEAL_LEVEL != 0 i recive state(10) = dfuERROR, status(4) = Memory erase function failed.
What i do wrong ?
cpu stm32f103c8
dfu-util -v -d 0483:df11 -D outfile.bin 0x8002000
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 128
Copying data from PC to DFU device
Download [ ] 0% 0 bytes failed!
state(10) = dfuERROR, status(4) = Memory erase function failed
config
i change DFU_STR_FLASH
Found DFU: [0483:df11] ver=0100, devnum=59, cfg=1, intf=0, path="1-1", alt=0, name="@internal Flash /0x08002000/56*1Kg", serial="9488CE25"
and still have error
The text was updated successfully, but these errors were encountered: