I will ask a question about my STM32F407 Discovery board. I want to learn about external interrupts and I was making a small circuit. I connected PH0 to my button and PH1 to the LED. But these pins are connected to the mcu's crystal pins. But I didn't know it at that time. I was press button that is connectet to 5V. And my IDE won't connect to my board for debugging debugging. I can connecting to my board via ST Link Utility and I can do a full chip erase with no errors. Then I turn back to code in Atollic, press the debugging button and I get this error messages:
Error in executing 'cont' command ...
CM4 Failed to read all registers
FAILED to REGISTER Values from the target
Target is not responding, retrying...
*some messages in between*
warning: Remote failure reply: E31
Remote failure reply: E31
Remote connection closed
Quit
And then I turned off the debug screen to try again but I can't because Atollic can't find any ST Link devices. This is the error message:
Target no device found
Error in initializing ST-LINK device.
Reason: No device found on target.
Note: My PC recognize my board in Device Manager.
How can I solve this problem. ST Link Utility connects to my board succesfully, My PC connects to my board. I tried St link firmware upgrade but I got more errors. Like this.
Failure at line: 13 in "Target Software Startup Scripts"
You probably have ST Utility still connected to your MCU. This results in Atollic not beeing able to connet to the MCU. Either close ST Utillity or press the disconnet button.
Since you can erase it your MCU should be ok and you chose one of the few 5V tolerant pins but it would be better practice to use 3V.
Another reason might be the option bytes if the read out protection got set to level 1 or 2 the debugger is sometimes not able to reset those and is therefore not able to read out the register.
I was solve a lot of problem. Firstly I found a problem. This is a my DCMI_Config function. In this function I have a lot of pin definition. GPIOA caused my problem.
GPIOA-> MODER = 0x00002200; //GPIOA 4,6 Set Alternate Function for DCMI
This line has my problem. I was search Discovery schematic and I found something. PA4 pin connected to Discovery's voice uc as I2S3_WS. Is this cause any problem?
Related
I am trying to add a simple led application to a PIC18F25Q10 in another circuit using the Curiosity HPC development board. I am using the MCLR, PGD, PGC and GND pins. Although I set the LVP mode to enable in the CONFIG settings and the program speed to low in the project properties, MPLAB " MPLAB has detected that the undervoltage configuration bit on the device is off and you have selected" error output . I also cannot connect to the PIC.
My MPLAB version is 6.5
I am using the X8 compiler (2.40).
I am throwing code with PKoB4.
I checked my circuit connections and confirmed that the MCLR, PGC and PGD pins were correct, but I kept getting errors.
I have done the steps to be applied here, but I have not reached a result. I cannot connect to the PIC.
Connecting to MPLAB PKoB4
Currently loaded versions:
Application version...........00.05.79
Boot version..................01.01.41
Script version................00.05.35
Script build number...........86fedc5c2e
Tool pack version ............1.8.869
Target voltage detected
MPLAB has detected that the low voltage configuration bit on the device is off and you have selected the low voltage programming option on the debug tool's property page. If you wish to use the low voltage programming option you must first do the following:
* Turn off the low voltage programming option on the debug tool's Program Options property page
* Program the low voltage configuration bit to on
* Turn on the low voltage programming option on the debug tool's Program Options property page
Connection Failed.
I checked the forum pages and updated MPLAB and the PKoB4 drivers to test the information that it might be version related, but I could not connect to the PIC.
I used another circuit because I thought there would be a problem with the PIC. I got the same error. I tried to load the code from another computer and I continued to get the same error.
I tried to code with ICD, it codes. However, I could not solve this error on the Curiosity HPC development board. I came across some information in the Curiostiy development board user's guide.
information Image..
I need to be able to connect to the PIC and throw code. I am curious about your thoughts and advice about my problem.
According to the advise of MPLAB your PIC chip has programmed to have LVP disabled. The curiosity boards has a built-in PICKIT which can program only in Low Voltage Programming mode. So you have to do the following steps:
Get a standalone PIC (i.e. PICKIT3) programmer
In config settings of your PIC set the LVP to be on
In MPLAB IDE, File > Project Properties > PICkit 3 > Program Options make sure that Use low voltage programming mode entry option is unchecked
Burn your PIC device with this configuration once using the standalone PICKIT programmer
These steps will prepare your PIC so that it can be programmed in curiosity board. Once you done with all steps correctly, you will be able to burn your programs using your curiosity.
When you program with the built-in programmers, you always wanna make sure that your PIC is programmed before with configuration LVP = ON. And also keep this config bit always ON as long as you keep programming it in a curiosity board.
One more thing to tell, MPLABX is automatically checks the Use low voltage programming mode entry option when you select the Connected Hardware Tool as your curiosity board.
Go ahead and try the steps and then let me know if I could help any further.
We are using progisp software to program a microcontroller AT89S52. We are struggeling with an issue saying
chip enable program error
Please help us to tackle this issue? What does it mean?
According to https://alselectro.wordpress.com/2019/03/30/usbasp-solution-to-chip-enable-error-firmware-upgrade/ it might just be a physical connectivity issue (or the wrong chip:
CHIP ENABLE error occurs if the IC is not placed correctly on ZIF socket of development board or if the wrong Chip is selected.
Did you checked all the things which are described in this documentation https://www.academia.edu/8278452/How_to_solve_chip_enable_program_error_in_progisp?
Check if the
USBasp
driver is properly installed (update it from settings).
Recheck the jumpers. Change them if they are weakly connected.
Try to change the port, sometimes some ports can malfunction (ex. from port 1 to port 0).
Press reset button for 10 seconds.
Try to erase current program from
progisp
compiler, and load flash of hex file again
Or here: http://www.mbeddedc.com/2015/03/how-to-solve-chip-enable-error-in.html
Reason for Chip enable error in progisp:
1) Main reason for this error could be wrong connections.
This can be solved by checking the connection between Serial ISP Programmer and Micro-controller. Many times Gnd,Vcc,Sck,MISO,MOSI,RST connection does not match with each other. This should be given properly by Gnd-Gnd, Vcc-Vcc, Sck-Sck, MISO-MISO, MOSI-MOSI, RST-RST.
2) Check whether the power to the ISP Programmer and micro-controller are correctly supplied.
It pretends to solve the issue.
I have arduino atmega2560 when i upload blink code than it shows error
avrdude: stk500v2_ReceiveMessage(): timeout.
I have checked the COM port is correct also that the driver is correctly installed.
Why would I be receiving a timeout error?
The possible reasons:
Faulty communication cable
Wrong com port selected
Wrong device model selected
Baud rate settings
Driver related issues
I think your arduino got bricked. But first try to reconnect it and upload your program.
Second try to disconnect any rx or tx pin connected. Third if your arduino is bricked, try to check this article for full solution of bricked arduino. Programmer is not responding arduino
Context
I have accidentally uploaded some ARM Cortex M0-cmis files (core-cmFunc.h and core_cmInstr.h) to the STM32F407VG discovery board. After I noticed my mistake, I tried to undo it by changing my code and upload it again... but it said it couldn't make connection.
What I already tried
I've tried to get passed the USART interface of the discovery board by uploading the code directly on the ARM Coretex M4 chip via the bootloader. I connected BOOT0 to VDD and PB2(=BOOT1) to GND so the chip starts up in the Pattern1-mode. Then I connected PA9(=Tx) and PA10(=Rx) to an USB to TTL cable (by the use of a RS-232 chip in the cable) and reset the device. I started the "Flash Loader Demonstrator" from ST to make connection with the board (I've done this before and it worked). But that didn't made connection either.
Extra information
The Windows filemanager "sees" the ARM Cortex M4 file when it gets connected to the PC;
Led LD7 emits green light when the board is powered;
Led LD1 emits red light;
Does someone knows how I can factory-reset the flashmemmory of the STM32F4 so it acts at it should again?
After some trial and error I've come to the conclusion that I accidentally activated the OTG_VBUS with my code. I couldn't upload another code because that bus was active on PA9(TX of USART2). It seems that the VBUS was held active, even in bootloader mode.
PA9 connected to VBUS
The solution to this problem was the use of another bootloader interface, I used USART3 on PB10/11, but you could also use PC10/11. After I uploaded a dummy code in that manner, I
was able to upload codes with the Coocox-IDE again.
Other Bootloader interfaces
I'm trying to programm my PIC 16F628A with PICKIT3 in MPlabX, but I get the following error:
***************************************************** Connection Failed.
When I enable the "Power Target Circuit From Tool", I get another error:
The target circuit may require more power than the debug tool can provide. An external power supply might be necessary.
Connection Failed.
So a provided an external power supply of 5V and my PIC 16F628A is draining 10mA, despite nothing is connected, only the PICKIT3 to the MCLR, ICSPDATA and ICSPCLK pins of PIC.
I'm using Ubuntu 16.04, MPlabX IPE V4.05., and
PS: Yes, I know how to read a datasheet.
PS: Circuit and PICKIT3 works properlyt if I connect to PICKIT3 Programmer running on Windows 7.
The first issue can sometimes be resolved by shutting down MPLABX, disconnecting the PicKit from your computer and reconnecting everything. Seems the firmware and/or driver sometimes gets in a weird state and needs a good boot to get going again. I sometimes have to reboot my computer just to program my main board (Major PITA).
The second issue is not necessarily caused by an over current despite the message. I always got this error when my PicKit was plugged into an unpowered USB hub. It seems the lower USB bus voltage confuses the PicKit into thinking that the device is the cause for the voltage drop instead of the host simply not supplying the normal voltage. Try plugging it into a powered USB hub or directly into your computer.
I know this is an old topic but maybe this answer can help somebody else.
I use as well official PICKIT's as clones.
It could indeed be caused by a hardware issue.
E.g. short or already activated load like a bunch of LED's.
Disconnect all loads if possible.
When using an official PICKIT 3, this issue is often solved by setting the voltage your PICKIT should supply to a lower level e.g. 5 => 4.625.
In MPLAB go to the properties of your project.
Select PICKIT on the left.
Select Power from the selection dropdown at the top.
When you have a SURE electronics clone, this might do the trick. (Maybe this is also valid for other clones) The AMS1117 they used is the adjustable one.
They used a 680 and a 470 feedback resistor which gives a voltage of 3.09V ((680/470 +1))*1.25 + 50u * 680). If you swap the 680 Ohm resistor with a 750, the output will be closer to the probably desired 3.3V.
Source where I got the idea: https://jrainimo.com/build/2018/12/picfix/
Location FB resistor
Close MPlab, reconnect Pickkit, restart MPlab worked for me.
If you've just created a new project or created a new file, MPlab sometimes confuses some things.