cancel
Showing results for 
Search instead for 
Did you mean: 

Can't program STM32F301K8U7

LW.2
Associate

I can't download rom file when using STM32F301K8U7.

The programmer can connect the MCU and recognize it. But there always are errors when modifying the flash. All reading data are 0xFF, even after I erasing the total chip.

The programmer I tested are ULINK II and JLINK OB. The IDE is Keil v4, Keil v5 and JFlash v6.54. I have tested about 5 STM32F301K8U7 and 1 STM32F301K8U6. All have the same presentation. All the programmers can program other MCUs (STM32F103, STM32F303).

All the configurations of programing environmant are correct.

The flowing are logs from JFlash:

Connecting ...

 - Connecting via USB to J-Link device 0

 - J-Link firmware: J-Link OB-STM32F072-CortexM compiled Jan 7 2019 14:09:37

 - Device "STM32F301K6" selected.

 - Target interface speed: 2000 kHz (Fixed)

 - VTarget = 3.300V

 - Found SW-DP with ID 0x2BA01477

 - Found SW-DP with ID 0x2BA01477

 - Scanning AP map to find all available APs

 - AP[1]: Stopped AP scan as end of AP map has been reached

 - AP[0]: AHB-AP (IDR: 0x24770011)

 - Iterating through AP map to find AHB-AP to use

 - AP[0]: Core found

 - AP[0]: AHB-AP ROM base: 0xE00FF000

 - CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)

 - Found Cortex-M4 r0p1, Little endian.

 - FPUnit: 6 code (BP) slots and 2 literal slots

 - CoreSight components:

 - ROMTbl[0] @ E00FF000

 - ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7

 - ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT

 - ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB

 - ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM

 - ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU

 - Executing init sequence ...

   - Executing Reset (0, 0 ms)

      - Reset: Halt core after reset via DEMCR.VC_CORERESET.

      - Reset: Reset device via AIRCR.SYSRESETREQ.

   - Initialized successfully

 - Target interface speed: 2000 kHz (Fixed)

 - J-Link found 1 JTAG device. Core ID: 0x2BA01477 (None)

 - Connected successfully

Unsecure chip ...

 - Disconnecting ...

   - Disconnected

 - Connecting via USB to J-Link device 0

 - J-Link firmware: J-Link OB-STM32F072-CortexM compiled Jan 7 2019 14:09:37

 - Device "STM32F301K6" selected.

 - Found SW-DP with ID 0x2BA01477

 - Found SW-DP with ID 0x2BA01477

 - Scanning AP map to find all available APs

 - AP[1]: Stopped AP scan as end of AP map has been reached

 - AP[0]: AHB-AP (IDR: 0x24770011)

 - Iterating through AP map to find AHB-AP to use

 - AP[0]: Core found

 - AP[0]: AHB-AP ROM base: 0xE00FF000

 - CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)

 - Found Cortex-M4 r0p1, Little endian.

 - FPUnit: 6 code (BP) slots and 2 literal slots

 - CoreSight components:

 - ROMTbl[0] @ E00FF000

 - ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7

 - ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT

 - ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB

 - ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM

 - ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU

 - Chip unsecured successfully - Completed after 0.426 sec

Erasing chip ...

 - Connecting ...

   - Connecting via USB to J-Link device 0

   - J-Link firmware: J-Link OB-STM32F072-CortexM compiled Jan 7 2019 14:09:37

   - Device "STM32F301K6" selected.

   - Target interface speed: 2000 kHz (Fixed)

   - VTarget = 3.300V

   - Found SW-DP with ID 0x2BA01477

   - Found SW-DP with ID 0x2BA01477

   - Scanning AP map to find all available APs

   - AP[1]: Stopped AP scan as end of AP map has been reached

   - AP[0]: AHB-AP (IDR: 0x24770011)

   - Iterating through AP map to find AHB-AP to use

   - AP[0]: Core found

   - AP[0]: AHB-AP ROM base: 0xE00FF000

   - CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)

   - Found Cortex-M4 r0p1, Little endian.

   - FPUnit: 6 code (BP) slots and 2 literal slots

   - CoreSight components:

   - ROMTbl[0] @ E00FF000

   - ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7

   - ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT

   - ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB

   - ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM

   - ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU

   - Executing init sequence ...

      - Executing Reset (0, 0 ms)

         - Reset: Halt core after reset via DEMCR.VC_CORERESET.

         - Reset: Reset device via AIRCR.SYSRESETREQ.

      - Initialized successfully

   - Target interface speed: 2000 kHz (Fixed)

   - J-Link found 1 JTAG device. Core ID: 0x2BA01477 (None)

   - Connected successfully

 - 16 sectors, 1 range, 0x8000000 - 0x8007FFF

 - Start of preparing flash programming

 - End of preparing flash programming

 - Start of determining dirty areas in flash cache

 - End of determining dirty areas

 - CPU speed could not be measured.

 - Start of erasing chip

 - End of erasing chip

 - Start of restoring

 - End of restoring

 - Erase operation completed successfully - Completed after 0.683 sec

Programming target (4096 bytes, 1 range) ...

 - Checking if selected data fits into selected flash sectors.

 - Start of preparing flash programming

 - End of preparing flash programming

 - Start of determining dirty areas in flash cache

 - End of determining dirty areas

 - CPU speed could not be measured.

 - Start of flash programming

 - Programming range 0x08000000 - 0x08000FFF ( 2 Sectors, 4 KB)

 - ERROR: Programming failed @ address 0x08000000 (block verification error)

 - End of flash programming

 - ERROR: Program failed

 - Start of restoring

 - ERROR: Failed to program target

 - End of restoring

Disconnecting ...

 - Disconnected

0 REPLIES 0