ESC V3 : programming Atmega328P

(Read 198 times)
ESC V3 : programming Atmega328P on: February 09, 2021, 07:44:35 PM
Hello,
I mounted 2 ESC V3 boards with components.
I'm trying to program the Atmega with the software ESC_BEMF_V3_CODE_V4_1 (made by Electronoobs).
The programming failed each time.
I'm using Arduino IDE v1.8.13 to program with the following configuration parameters : Atmega328P 5V 16MHz, programmer AVRISP MkII.
I'm also using the USB to serial converter FT232RL FTDI Basic USB 3.3V 5V TTL. This converter is connected to the 5 pins (GND, VCC, RX, TX and DTR) of the ESC board.
It seems that the Atmega is not reset when I start the upload.
Any idea why I cannot program? Do I use the correct programmer under Arduino IDE? Is there another way to upload?
Thanks for your help.
Pascal



Re: ESC V3 : programming Atmega328P Reply #1 on: February 10, 2021, 09:05:27 AM
Well, it could be the DTR capacitor, that's in charge of the reset when uplaoding. That must be 100nF. As you can see here: https://electronoobs.com/images/Arduino/tut_91/sch_1.jpg C6 is of 100nF and it must be a good capacitor. If that's not the problem, maybe some of the pins are not connected well...



Re: ESC V3 : programming Atmega328P Reply #2 on: March 04, 2021, 10:40:35 PM
Hello,

I used a tool to spy the following signals between the FTDI and the ESC:
Channel 0 : DTR
Channel 1 : +5V
Channel 2 : TX of FTDI
I attached a screen copy of this spy.
As you can see, the DTR is always low.
We can see that some bytes are transmitted on the TX. 3 times at the beginning of the upload, and then 1 bytes every 10s.
To try to program, I use the Arduino IDE configured as follow : processor = Atmega328P 5V 16MHz, programmer = USBAsp
Any idea why the DTR stays low ?



Re: ESC V3 : programming Atmega328P Reply #3 on: March 04, 2021, 10:43:51 PM
Here after is the capture of the first byte sent by the FTDI.



Re: ESC V3 : programming Atmega328P Reply #4 on: March 04, 2021, 11:48:08 PM
Here after is a capture of a successfull upload to an Arduino Pro mini.
Channel 0 : DTR
Channel 1 : +5V
Channel 2 : TX from FTDI
Channel 3 : RX from FTDI
« Last Edit: March 07, 2021, 07:41:47 PM by Noob 2331 »



Re: ESC V3 : programming Atmega328P Reply #5 on: March 07, 2021, 07:46:11 PM
Here after is a capture of aborted upload to ESC V3
Channel 0 : DTR
Channel 1 : +5V
Channel 2 : TX from FTDI
Channel 3 : RX from FTDI
Channel 4 : TX from Atmega328P capture at pin 31 of Atmega
Do you find normal that the TX (channel 4) is most of time set to 0? Should it be 1 most of the time ?



Re: ESC V3 : programming Atmega328P Reply #6 on: March 07, 2021, 07:50:31 PM
Here after is a zoom on the previous capture. I zoomed on the first byte transmitted by the FTDI.
We can see that the channel 3 (RX FTDI) and channel 4 (TX of Atmega328P) are equal, which is normal.



Re: ESC V3 : programming Atmega328P Reply #7 on: March 08, 2021, 09:59:21 PM
Here after is a capture of :
Channel 0 : DTR
Channel 1 : +5V
Channel 2 : TX from FTDI
Channel 3 : RX from FTDI
Channel 4 : RESET pin of Atmega328P
The time of RESET low is around 323┬Ás.
The RESET signal is not clean. There are rebound at the end of RESET, just before RESET going high permanently.
Any idea ?



Re: ESC V3 : programming Atmega328P Reply #8 on: March 09, 2021, 08:35:10 AM
I think the programmer should be AVRISP mkii