Зарегистрирован: Сб июн 27, 2015 20:32:23
Сообщений: 14
Откуда: Дзержинск Нижегородской обл.
Рейтинг сообщения: 0
Грязь на линиях питания, наводки на провода программатора. Конденсаторы на питании кристалла стоят? Разводка питания и земли нормальная? Процедура стирания — дает неплохой мусор на шины питания. Прекрасно работающая схема может сильно чудить при стирании. Попробуй снизить частоту работы ST-Link. |
Реклама | |
Линейка изолированных DC/DC-преобразователей VCB и VCF с диапазоном мощности 3…400 Вт предназначена для использования в телекоммуникационной аппаратуре. Эти новые преобразователи третьего поколения (R3) выпускаются в типоразмерах SIP, 1/4 Brick, 1/8 Brick и 1/16 Brick. Данные DC/DC отвечают требованиям стандарта DOSA, имеют диапазон входного напряжения 2:1 (36…75 В), обладают высокой эффективностью (КПД до 93%) и широким температурным диапазоном -40…85ºС. Изоляция «вход-выход» составляет 1500/2250 В. VCB и VCF выпускаются в двух вариантах по логике управления: N (отрицательной) и P (положительной). |
|
Часовой пояс: UTC + 3 часа
Кто сейчас на форуме
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 8
Источник
[SOLVED] STM32L052 failed to erase sectors
This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.
gfvubi
[SOLVED] STM32L052 failed to erase sectors
I have a custom board with a STM32L052C8, up until yesterday I was able to flash/erase it without any problem. Since this morning I get an error when flashing a new firmware:
Source Code
- Found SWD-DP with ID 0x0BC11477
- Found SWD-DP with ID 0x0BC11477
- AP-IDR: 0x04770031, Type: AHB-AP
- Found Cortex-M0 r0p1, Little endian.
- FPUnit: 4 code (BP) slots and 0 literal slots
- CoreSight components:
- ROMTbl 0 @ F0000000
- ROMTbl 0 [0]: F00FF000, CID: B105100D, PID: 000BB4C0 ROM Table
- ROMTbl 1 @ E00FF000
- ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008 SCS
- ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A DWT
- ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B FPB
- Cortex-M0 identified.
- PC = 080009E4, CycleCnt = 00000000
- R0 = FFFFFFFF, R1 = FFFFFFFF, R2 = FFFFFFFF, R3 = FFFFFFFF
- R4 = FFFFFFFF, R5 = FFFFFFFF, R6 = FFFFFFFF, R7 = FFFFFFFF
- R8 = FFFFFFFF, R9 = FFFFFFFF, R10= FFFFFFFF, R11= FFFFFFFF
- R12= FFFFFFFF
- SP(R13)= 20002000, MSP= 20002000, PSP= FFFFFFFC, R14(LR) = FFFFFFFF
- XPSR = F1000000: APSR = NZCVq, EPSR = 01000000, IPSR = 000 (NoException)
- CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
- Downloading file [stage/lpc_app.bin].
- Comparing flash [100%] Done.
- Erasing flash [100%] Done.
- Verifying flash [100%] Done.
- J-Link: Flash download: Restarting flash programming due to program error (possibly skipped erasure of half-way erased sector).
- J-Link: Flash download: Skip optimizations disabled for second try.
- Error while programming flash: Programming failed.
- Reset delay: 0 ms
- Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
I have tried to manually erase the flash using J-Link but I get another error:
Source Code
- Device «STM32L052C8» selected.
- Found SWD-DP with ID 0x0BC11477
- Found SWD-DP with ID 0x0BC11477
- AP-IDR: 0x04770031, Type: AHB-AP
- Found Cortex-M0 r0p1, Little endian.
- FPUnit: 4 code (BP) slots and 0 literal slots
- CoreSight components:
- ROMTbl 0 @ F0000000
- ROMTbl 0 [0]: F00FF000, CID: B105100D, PID: 000BB4C0 ROM Table
- ROMTbl 1 @ E00FF000
- ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008 SCS
- ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A DWT
- ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B FPB
- Cortex-M0 identified.
- J-Link>erase
- Erasing device (STM32L052C8).
- Comparing flash [100%] Done.
- Erasing flash [045%]
- ****** Error: Failed to erase sectors 0 @ address 0x08000000 (erase error)
- 100%] Done.
- Verifying flash [100%] Done.
- J-Link: Flash download: Total time needed: 0.050s (Prepare: 0.043s, Compare: 0.000s, Erase: 0.001s, Program: 0.000s, Verify: 0.000s, Restore: 0.004s)
- ERROR: Erase returned with error code -5.
Why does the erase fail? I have searched the forum for a definition of the error codes but could not find one.
(6.3 kB, downloaded 585 times, last: Jan 11th 2023, 9:41pm )
SEGGER — Niklas
«Erase returned with error code -5.» just means that the erase failed during the erase procedure (opposed to failing during preparation, ram check, etc. ).
I just gave it a try and erase / program worked fine for me with a STM32L053R8 target.
Since it did work before, did anything change regarding your setup?
Does this issue only occur with one board?
Best regards,
Niklas
Please read the forum rules before posting.
Keep in mind, this is *not* a support forum.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support you can contact us via our support system: segger.com/ticket/
Or you can contact us via e-mail.
gfvubi
It’s only happening with this board so far, we downloaded a new firmware and since then we get the erase error.
We are able to read the flash using J-Link but cannot erase it. It could be that the microcontroller got damaged, but the new firmware only had minimal changes.
SEGGER — Niklas
can you please read out the option bytes (e.g. with J-Link Commander) and post them here?
Best regards,
Niklas
Please read the forum rules before posting.
Keep in mind, this is *not* a support forum.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support you can contact us via our support system: segger.com/ticket/
Or you can contact us via e-mail.
gfvubi
Source Code
- J-Link>mem32 0x1FF80000, 5
- 1FF80000 = FF5500AA 7F8F8070 00000000 FFFF0000
- 1FF80010 = FFFF0000
SEGGER — Niklas
Sorry for the delay in response.
The 0x00000000 @ 0x1FF80008 could be the issue.
As far as I understand the manual, 0x1FF80008 is FLASH_WRPROT1 and should be 0xFFFF0000 like 0x1FF8000C and 0x1FF80010.
Does this issue also occur if 0x1FF80008 is 0xFFFF0000?
Best regards,
Niklas
Please read the forum rules before posting.
Keep in mind, this is *not* a support forum.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support you can contact us via our support system: segger.com/ticket/
Or you can contact us via e-mail.
gfvubi
I manually wrote 0xFFFF0000 at address 0x1FF80008 and the error is gone, I can now flash a new firmware.
My understanding was that in case of mismatch between high and low parts of the option bytes, default reset values were used, which was wrong.
Thanks Niklas for your help!
The procedure to manually reset the option bytes is not quite straight forward, would it be possible to add the STM32L0 family to the JlinkSTM32 tool?
SEGGER — Niklas
good to hear that you are up and running!
Regarding the STM32:
Without wanting to promise anything, I think support for STML0x is planned for the next version (of the stm32 tool, not the software package), which should also support STM32H7.
Unfortunately, the official reference documentation for STM32H7 is still not publicly available, which is currently blocking this project.
Best regards,
Niklas
Please read the forum rules before posting.
Keep in mind, this is *not* a support forum.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support you can contact us via our support system: segger.com/ticket/
Or you can contact us via e-mail.
SEGGER — Niklas
STM32L0xxxx support has been added to the J-Link STM32 Unlock tool in the latest version of the J-Link software & documentation pack (beta), V6.15d.
STM32H7xxxx support has not been added due to the lack of official documentation.
Best regards,
Niklas
Please read the forum rules before posting.
Источник
Adblock
detector
Форум РадиоКот • Просмотр темы — STM32L не работает очистка флеша
Сообщения без ответов | Активные темы
ПРЯМО СЕЙЧАС: |
Автор | Сообщение |
---|---|
|
Заголовок сообщения: STM32L не работает очистка флеша Добавлено: Сб июл 26, 2014 19:52:56 |
Родился
Зарегистрирован: Пт янв 10, 2014 16:24:02 Рейтинг сообщения: 0
|
Плата с контроллером подключена по интерфейсу SWD (SWDIO+SWCLK+питание), программатор ST-Link v2. Пытаюсь стереть прошивку при помощи «STM32 ST-LINK Utility» — подключение проходит нормально, содержимое памяти отображается, нажимаю кнопку «Full chip erase» — открывается соотв. окошко, полоска потихоньку (медленнее, чем при успешном стирании до этого) заполняется, немного не доходя до конца (скриншот: http://img.radiokot.ru/files/93958/eiorx3j1s.jpg) — останавливается на несколько секунд и выдает ошибку «Error occured during flash mass erase!» Код: 20:44:17 : Error occured during flash mass erase! В чем может быть причина? Пробовал грузиться с притянутым к «1» BOOT0 — да же картина, подключается нормально, стирание идёт медленно и до конца не доходит. P.S. Только что снова без особой надежды проделал те же операции — за секунду всё стёрлось, память очистилась без проблем. В чем причина — так и не понял |
Вернуться наверх |
Профиль www
|
Реклама | |
|
|
Zud
|
Заголовок сообщения: Re: STM32L не работает очистка флеша Добавлено: Вс июл 27, 2014 16:55:15 |
||
Зарегистрирован: Пн авг 19, 2013 03:23:00 Рейтинг сообщения: 0
|
Нужно с ресетом подключать, т.е. SWD + nRESET, и в программке от ST-Link тоже указать что подключаться под ресетом. BOOT0 = 0. Хотя учитывая, что у Вас читалось, возможно дело просто в слабом питании микроконтроллера. Во время стирания требуется немного больше тока, чем обычно. |
||
Вернуться наверх | |||
Реклама | |
|
|
andrey_g.pt@mail.ru
|
Заголовок сообщения: Re: STM32L не работает очистка флеша Добавлено: Ср июл 01, 2015 16:35:08 |
Зарегистрирован: Ср июл 01, 2015 16:17:52 Рейтинг сообщения: 0
|
Была похожая проблема. На микроконтроллере STM32F105RB отваливался настроенный в нем USB-HID Device, «Full chip erase» в ST-Link Utility не работал, как у автора, а иногда программа вообще не могла подключиться к устройству через ST-Link или связь отваливалась. -Connection to device is lost: check power supply and debug connection. Причиной был самодельный вентилятор. Мотор вентилятора из кассетного аудиоплеера, пропеллер от авиамодели и трансформаторный блок питания (питание было развязано). Шумы, создаваемые моторчиком, давали наводки на сигнальные цепи USB и SWD интерфейсов. |
Вернуться наверх | |
DanilinS
|
Заголовок сообщения: Re: STM32L не работает очистка флеша Добавлено: Ср июл 01, 2015 17:56:23 |
Зарегистрирован: Сб июн 27, 2015 20:32:23 Рейтинг сообщения: 0
|
Грязь на линиях питания, наводки на провода программатора. Конденсаторы на питании кристалла стоят? Разводка питания и земли нормальная? Процедура стирания — дает неплохой мусор на шины питания. Прекрасно работающая схема может сильно чудить при стирании. Попробуй снизить частоту работы ST-Link. |
Вернуться наверх | |
Реклама | |
|
Выгодные LED-драйверы для решения любых задач КОМПЭЛ представляет со склада и под заказ широкий выбор LED-драйверов производства MEAN WELL, MOSO, Snappy, Inventronics, EagleRise. Линейки LED-драйверов этих компаний, выполненные по технологии Tunable White и имеющие возможность непосредственного встраивания в систему умного дома (димминг по шине KNX), перекрывают практически полный спектр применений: от простых световых указателей и декоративной подсветки до диммируемых по различным протоколам светильников внутреннего и наружного освещения. Подобрать LED-драйвер>> |
Кто сейчас на форуме |
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 7 |
Вы не можете начинать темы Вы не можете отвечать на сообщения Вы не можете редактировать свои сообщения Вы не можете удалять свои сообщения Вы не можете добавлять вложения |
This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.
-
- 1
Hello,
I have a custom board with a STM32L052C8, up until yesterday I was able to flash/erase it without any problem. Since this morning I get an error when flashing a new firmware:
Source Code
- Found SWD-DP with ID 0x0BC11477
- Found SWD-DP with ID 0x0BC11477
- AP-IDR: 0x04770031, Type: AHB-AP
- Found Cortex-M0 r0p1, Little endian.
- FPUnit: 4 code (BP) slots and 0 literal slots
- CoreSight components:
- ROMTbl 0 @ F0000000
- ROMTbl 0 [0]: F00FF000, CID: B105100D, PID: 000BB4C0 ROM Table
- ROMTbl 1 @ E00FF000
- ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008 SCS
- ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A DWT
- ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B FPB
- Cortex-M0 identified.
- PC = 080009E4, CycleCnt = 00000000
- R0 = FFFFFFFF, R1 = FFFFFFFF, R2 = FFFFFFFF, R3 = FFFFFFFF
- R4 = FFFFFFFF, R5 = FFFFFFFF, R6 = FFFFFFFF, R7 = FFFFFFFF
- R8 = FFFFFFFF, R9 = FFFFFFFF, R10= FFFFFFFF, R11= FFFFFFFF
- R12= FFFFFFFF
- SP(R13)= 20002000, MSP= 20002000, PSP= FFFFFFFC, R14(LR) = FFFFFFFF
- XPSR = F1000000: APSR = NZCVq, EPSR = 01000000, IPSR = 000 (NoException)
- CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
- Downloading file [stage/lpc_app.bin]…
- Comparing flash [100%] Done.
- Erasing flash [100%] Done.
- Verifying flash [100%] Done.
- J-Link: Flash download: Restarting flash programming due to program error (possibly skipped erasure of half-way erased sector).
- J-Link: Flash download: Skip optimizations disabled for second try.
- Error while programming flash: Programming failed.
- Reset delay: 0 ms
- Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Display All
I have tried to manually erase the flash using J-Link but I get another error:
Source Code
- Device «STM32L052C8» selected.
- Found SWD-DP with ID 0x0BC11477
- Found SWD-DP with ID 0x0BC11477
- AP-IDR: 0x04770031, Type: AHB-AP
- Found Cortex-M0 r0p1, Little endian.
- FPUnit: 4 code (BP) slots and 0 literal slots
- CoreSight components:
- ROMTbl 0 @ F0000000
- ROMTbl 0 [0]: F00FF000, CID: B105100D, PID: 000BB4C0 ROM Table
- ROMTbl 1 @ E00FF000
- ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008 SCS
- ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A DWT
- ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B FPB
- Cortex-M0 identified.
- J-Link>erase
- Erasing device (STM32L052C8)…
- Comparing flash [100%] Done.
- Erasing flash [045%]
- ****** Error: Failed to erase sectors 0 @ address 0x08000000 (erase error)
- 100%] Done.
- Verifying flash [100%] Done.
- J-Link: Flash download: Total time needed: 0.050s (Prepare: 0.043s, Compare: 0.000s, Erase: 0.001s, Program: 0.000s, Verify: 0.000s, Restore: 0.004s)
- ERROR: Erase returned with error code -5.
Display All
Why does the erase fail? I have searched the forum for a definition of the error codes but could not find one.
Files
-
erase.txt
(6.3 kB, downloaded 596 times, last: Feb 9th 2023, 11:08am)
-
- 2
Hi,
«Erase returned with error code -5.» just means that the erase failed during the erase procedure (opposed to failing during preparation, ram check, etc…).
I just gave it a try and erase / program worked fine for me with a STM32L053R8 target.
Since it did work before, did anything change regarding your setup?
Does this issue only occur with one board?Best regards,
NiklasPlease read the forum rules before posting.
Keep in mind, this is *not* a support forum.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support you can contact us via our support system: segger.com/ticket/Or you can contact us via e-mail.
-
- 3
Hello,
It’s only happening with this board so far, we downloaded a new firmware and since then we get the erase error.
We are able to read the flash using J-Link but cannot erase it. It could be that the microcontroller got damaged, but the new firmware only had minimal changes. -
- 4
Hi,
can you please read out the option bytes (e.g. with J-Link Commander) and post them here?
Best regards,
NiklasPlease read the forum rules before posting.
Keep in mind, this is *not* a support forum.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support you can contact us via our support system: segger.com/ticket/Or you can contact us via e-mail.
-
- 5
This is what I’m getting for the option bytes:
Source Code
- J-Link>mem32 0x1FF80000, 5
- 1FF80000 = FF5500AA 7F8F8070 00000000 FFFF0000
- 1FF80010 = FFFF0000
-
- 6
Hi,
Sorry for the delay in response.
The 0x00000000 @ 0x1FF80008 could be the issue.
As far as I understand the manual, 0x1FF80008 is FLASH_WRPROT1 and should be 0xFFFF0000 like 0x1FF8000C and 0x1FF80010.Does this issue also occur if 0x1FF80008 is 0xFFFF0000?
Best regards,
NiklasPlease read the forum rules before posting.
Keep in mind, this is *not* a support forum.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support you can contact us via our support system: segger.com/ticket/Or you can contact us via e-mail.
-
- 7
Hello,
I manually wrote 0xFFFF0000 at address 0x1FF80008 and the error is gone, I can now flash a new firmware.
My understanding was that in case of mismatch between high and low parts of the option bytes, default reset values were used, which was wrong…Thanks Niklas for your help!
The procedure to manually reset the option bytes is not quite straight forward, would it be possible to add the STM32L0 family to the JlinkSTM32 tool?
-
- 8
Hi,
good to hear that you are up and running!
Regarding the STM32:
Without wanting to promise anything, I think support for STML0x is planned for the next version (of the stm32 tool, not the software package), which should also support STM32H7.
Unfortunately, the official reference documentation for STM32H7 is still not publicly available, which is currently blocking this project.Best regards,
NiklasPlease read the forum rules before posting.
Keep in mind, this is *not* a support forum.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support you can contact us via our support system: segger.com/ticket/Or you can contact us via e-mail.
-
- 9
Hi Forum,
STM32L0xxxx support has been added to the J-Link STM32 Unlock tool in the latest version of the J-Link software & documentation pack (beta), V6.15d.
STM32H7xxxx support has not been added due to the lack of official documentation.Best regards,
NiklasPlease read the forum rules before posting.
Keep in mind, this is *not* a support forum.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support you can contact us via our support system: segger.com/ticket/Or you can contact us via e-mail.
-
Share