• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

STM32 - two errors in turns during programming

Thread starter #1
I'm trying to program STM32F107VCT6 via SWD and I'm constantly getting two errors in turns (literally):

  • Error: Connect failed, check config and cable connection
  • Error: Flash driver function execute error, Erase: [ 0%]
By "in turns" I mean that when I click "Download Code To Flash" in CooCox CoIDE, I'm getting the first error, and after the second try, I'm getting the second one.

I have a PCB made from the same schematics with this model of STM32 and it works just fine. Changes between the old board and the new one are very insignificant.

I thought the problem may be in connecting NRST line, but everything is fine. I used 10k pull-up resistor, and the connections seem to be OK. Also, the crystal oscillator looked guilty, but I disconnected it to check if I could program STM32 on the internal oscillator, but it didn't help. All signals are connected correctly and all GNDs are connected together.

Could someone point out some possibilities why STM32 could behave like this? I would be grateful for any help.
 

misterT

Well-Known Member
Most Helpful Member
#2
Might be that your programming (jtag) frequency is too high compared to your chips operating frequency... just guessing.

I just had similar problems (not able to connect, not able to erase chip..). Using lower programming frequency solved my problems.
 
Last edited:

misterT

Well-Known Member
Most Helpful Member
#3
Did you solve the problem?
 
#4
Hi sir Mister,

I am already on STM32 device and Ac6 STM32/Eclipse forum, asking these problem regularly.

Beside solving those include path, build and gcc setting problem.
I am getting strange problem that might be C coding related or something else.

Do you think, I should remove some folders from Project explorer those are contain same files in include paths ?

Right at this moment the CDT console view says,

In file included from ..\startup\Src\stm32f0xx_hal_dac_ex.c:56:0:
C:\Users\swend95_하산\Desktop\Design\notun_pj\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal.h:528:29: error: unknown type name '__IO'
void HAL_Delay(__IO uint32_t Delay);



Again,

I have copied folder to my toolchain in C.
I am using this path!

In my case its, C:\STM32_toolchain\common\Drivers\CMSIS\Include;

Including the CMSIS files,

It shows, C:\STM32_toolchain\common\Drivers\CMSIS\Include/arm_math.h:6970:24: error: expected '=', ',', ';', 'asm' or 'attribute' before 'arm_bilinear_interp_q7'
static __INLINE q7_t arm_bilinear_interp_q7(


Could you kindly expilain this issue ?




I know this is not the place where should I ask this issue, but from your experience can you suggest anything ?

Regards
Hasan
 

Latest threads

EE World Online Articles

Loading

 
Top