Arduino Pro and F232R mysterious problem

I am trying to program an Arduino Pro Mini work using a generic FTDI F232R breakout board.

The Pro Mini is labelled on the back 5V 16MHz and the chip is a MEGA328P. It is an older board.

The F232R breakout is a generic one with a USB B connector. I have no documentation.

I have carefully followed these two tutorials and checked the wiring diagrams carefully

https://learn.sparkfun.com/tutorials/using-the-arduino-pro-mini-33v

I checked the pins of the chips using a continuity tester, and the relevant voltages with a voltmeter.

I have connected it like this:

Arduino Pro Mini          F232R chip
Vcc (on end connector)    Vcc (5V confirmed with meter)
GND                       GND
GND                       /CTS pin 11 on the chip
"GRN" (reset via 100nF)   /DTR pin 2 on chip
TXO (pin 31)              RX on board pin 5 on chip
RXI (pin 30)              TX on board pin 1 on chip

The board comes alive and the red LED is steady. The green LED flashes about 1/sec. This shows the firmware is loaded.

I then connect the USB to my Windows 7 machine. The FTDI drivers have been installed, and the com port is detected (COM11).

In the Arudino IDE (version 1.6.12) I select "Arduino Pro or Pro Mini" "ATMEGA 328 5V 16MHz". COM11 for port.

Nothing else is connected to the Pro Mini.

I compile, no errors. Then I try to upload. Eventually I get the error:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

I have tried the following tests:

  • Loopback test: Disconnected the Arduino. Connected Tx to Rx together from FTDI board. Used a terminal emulator with no flow control. Characters are returned back on the screen. So COMs are working.

  • Checked all connections with multimeter. Checked right up to chip pin, not just the boards.

  • Checked suppply voltages. Both boards are at 5V.

  • Tried different boards (I have 2 pros and 4 FTDI breakouts). All combinations show the same error.

  • Tried swapping RX and TX (arduino green LED flashes rapidly and outputs go crazy)

  • Monitored TX of FTDI board with AC voltmeter. Definitely a signal during programming.

  • Tried disconnecting DTR and CTS wires in various combinations.

  • Tried manually resetting board whilst programming

  • Tested program on Arduino Uno (no problems with program or IDE)

I am completely stumped! Any ideas please!?

I have also tried the web version of the IDE and I get the following error:

time="2017-05-15T15:35:36-03:00" level=info msg="[{COM11 0x6001 0x0403 A700FLCHA false}]"
time="2017-05-15T15:35:36-03:00" level=info msg=""
time="2017-05-15T15:35:37-03:00" level=info msg="[]"
time="2017-05-15T15:35:37-03:00" level=info msg=""
time="2017-05-15T15:35:38-03:00" level=info msg="[{COM11 0x6001 0x0403 A700FLCHA false}]"
time="2017-05-15T15:35:38-03:00" level=info msg=""

It looks to me like it finds the right com port but is trying to send unsupported information to it.

It will most likely NOT be COM 1 !

There is a very good possibility that you have the incorrect COM port or that the drivers for your 232 are not installed.

You only included partial error messages and even those were not sufficient to give many clues.

We don't know ANYTHING about your computer or what USB ports you are using either.

Help us to help you by reading THIS POST

Thanks ballscrewbob for replying and trying to help, but I don't think you read the message carefully.

It is com port 11 (eleven)

I also gave details of my machine (Windows 7, IDE version). What else do you need to know?

I also told you I did a loop back test, therefore it can not be a driver issue.

Please read my original post carefully, it contains a lot of useful information. If you have a specific question I can supply more specific information.

Thank you again.

You should not need to connect CTS.

Never used it here.

And double check that RX goes to TX and TX goes to RX.

Also double check your mini as to its voltage requirements eg 3.3 and 5 volt.

One of my adaptors put out 5 Volts when I needed 3.3 volts

Double check the frequency too as that is another common issue.

Still no luck with this. Anyone got any ideas? I found these two threads:

http://forum.arduino.cc/index.php?topic=27833.0

https://forum.arduino.cc/index.php?topic=156317.0

I tried changing baud rate, but no luck. I also checked the lines with an oscilloscope. I can see AVRdude sending a character, but the DTR line is not changing. This works, because I can set it using the DOS command :

mode com11 dtr=on and see the change on the oscilloscope. Any reason why this isn't being asserted from avrdude?

"I tried changing baud rate, but no luck. I also checked the lines with an oscilloscope. I can see AVRdude sending a character, but the DTR line is not changing."

I'm not using Windows, but have you tried this?

"If using the FTDI cable on Windows, you'll need to make one configuration change to enable the auto-reset. With the board connected, open the Device Manager (in Control Panels > System > Hardware), and find the USB Serial Port under Ports. Right-click and select properties, then go to Port Settings > Advanced and check Set RTS on Close under Miscellaneous Options. "

It sounds like there is no boot loader on the '328.

Is the an official Arduino or a clone?

avr_fred:
It sounds like there is no boot loader on the '328.

Is the an official Arduino or a clone?

It's not possible to tell if there is a bootloader based on what he's posted. See response #5 - the DTR line is not changing when it tries to upload, so the chip won't be reset, and hence the bootloader, if present, wouldn't be running....

kprims:
"I tried changing baud rate, but no luck. I also checked the lines with an oscilloscope. I can see AVRdude sending a character, but the DTR line is not changing."

https://www.arduino.cc/en/Guide/ArduinoProMini

I'm not using Windows, but have you tried this?

"If using the FTDI cable on Windows, you'll need to make one configuration change to enable the auto-reset. With the board connected, open the Device Manager (in Control Panels > System > Hardware), and find the USB Serial Port under Ports. Right-click and select properties, then go to Port Settings > Advanced and check Set RTS on Close under Miscellaneous Options. "

kprims, thank you for this, it was one bit of information I missed. I have tried it, but no difference I am afraid. I also tried using Linux. Thanks anyway.

avr_fred:
It sounds like there is no boot loader on the '328.

I have come to the same conclusion. However, in my original post I mention the LED is flashing, is that not a sign the bootloader is on there? A blank AVR chip would not flash an LED, but maybe it is a corrupt/old bootloader?

avr_fred:
Is the an official Arduino or a clone?

As far as I know it was purchased from Adafruit who are normally very reliable, but it was a long time ago. How can I check looking at the PCB?

Either way, I am on a research station in Antarctica and it is mid-winter so I won't be ordering a new one! I have been using a PIC and completed the project now, but thanks for your help. The F232R is being used to connect to the PIC, so I know that works and is good.

The LED may blink if there the blink sketch was uploaded with a Programmer (using the ICSP pins), and that wipes the bootloader, vs being loaded via the FTDI (using the serial pins). I have received boards that were set up that way.

OK Guys, this is getting REALLY weird!

I have an AVRISP mkII programmer and Atmel studio installed. I set this up on the ISP pins. The Atmel Studio Device Programmer verified it was a ATmega168P and that the voltage was 5V.

First I checked, is there a bootloader? Yes, there was one, but it is different from the new one. So I uploaded this bootloader:

 C:\Program Files (x86)\Arduino\hardware\arduino\avr\bootloaders\atmega\ATmegaBOOT_168_atmega328.hex

Atmel studio programmed the new bootloader successfully.

So I went back to Arduino IDE and tried again!

 avrdude: Version 6.3, compiled on Sep 12 2016 at 17:24:16
        Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
        Copyright (c) 2007-2014 Joerg Wunsch

        System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

        Using Port                    : COM11
        Using Programmer              : arduino
        Overriding Baud Rate          : 57600
 avrdude: stk500_recv(): programmer is not responding
 avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xad

Same error!

I tried swapping Rx and Tx pins and played around with baud rate (can someone confirm that 57600 is correct? There seems to be discussion about this changing on the avrdudes forum)

No luck!! What is going on?

[The board is from Spark Fun not Adafruit as I previously said. It is clearly printed on the back and I normally order from them.]

I am thinking baud rate or some other serial comms problem.

Thanks for you continued help...

Baud rate should fit to bootloader. It is hard coded. If the bootloader was build 115200, you should use the same otherwise you can have such problem with similar symptoms.
You wrote that loopback test had passed but not clear for me about RESET signal (DTR). It must be. It is measurable with any DMM and also observable on the LED as flickering at bootloader start.

OK, to respond to @Budvar10 (with pictures this time to make it really clear)

The first picture is ascii lower case 'a' (01100001) being transmitted from a terminal emulator (no handshaking) at 57600 baud (T=17us). Everything works.

YES Budvar10, the CTS line is being set, but nearly a 1s before I see data. The second trace captures this.

The third picture shows the first two characters that the Arduino sends (very close together). It is 0010 0000 0011 0000 in binary or 20 30 in HEX.

(I checked the avrdude source code: avrdude/ser_posix.c at master · sigmike/avrdude · GitHub it uses CS8 and does not set 2 stop bits, handshaking or parity so I am expecting 9 edges @ 17 us spacing)

I did notice something on this board. The voltage regulator is burnt out. If I put 4.1V into RAW pin I get 4.1 V at Vcc. I am now running it on a bench supply at Vcc = 3.3V but I guess the AVR's UART could have been damaged. ... IT'S A 5V board! Upping my input voltage to 6V gives 5V at Vcc as expected, so the board is not damaged. Exactly the same results are obtained.

My next test will be to program the UART via Atmel studio.

Finally, I do realise the firmware sets the baud rate. But this is not documented consistently. In the boards file supplied with Arduino IDE it is 57600 but you (Budvar10) say it should be 115200, as do others on the AVR forum. Anyone know what the current firmware actually is?

Thanks!

F0003TEK.png

F0005TEK.png

F0004TEK.png

Notice upload.speed and bootloader.file.

I have a Pro Mini 3.3V atmega168 that I just bootloaded and then loaded a Blink Sketch using an FTDI Basic-1
No problems using (3.3V, 8 MHz) w/ ATmega168.
Selected Arduino Pro or Pro Mini.

Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega168

-------------------------------------------------

pro.menu.cpu.16MHzatmega168=ATmega168 (5V, 16 MHz)

pro.menu.cpu.16MHzatmega168.upload.maximum_size=14336
pro.menu.cpu.16MHzatmega168.upload.maximum_data_size=1024
pro.menu.cpu.16MHzatmega168.upload.speed=19200
pro.menu.cpu.16MHzatmega168.bootloader.low_fuses=0xff
pro.menu.cpu.16MHzatmega168.bootloader.high_fuses=0xdd
pro.menu.cpu.16MHzatmega168.bootloader.extended_fuses=0xF8
pro.menu.cpu.16MHzatmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex

pro.menu.cpu.16MHzatmega168.build.mcu=atmega168

So I tried from AVR studio the following code:

#include <asf.h>
#include <usart_mega.h>
#include <stdio.h>

int main (void)
{
	/* Insert system clock initialization code here (sysclk_init()). */


	uint32_t ch;

	const usart_rs232_options_t usart_serial_options = {
		.baudrate     = USART_BAUD_9600,
		.charlength   = USART_CHSIZE_8BIT_gc,
		.paritytype   = USART_PMODE_DISABLED_gc,
		.stopbits     = false
	};

	sysclk_init();

	/* Initialize the board.  The board-specific conf_board.h file contains
	 * the configuration of the board initialization.
	 */
	board_init();
	

	// Initialize Serial Interface using Stdio Library
	usart_init_rs232(&USART0, &usart_serial_options);
	usart_tx_enable(&USART0);
	usart_rx_enable(&USART0);

	// Print welcome message
	//printf("\n\rHello ATMEL World!\n\r");
while(usart_putchar(&USART0, 'H') != STATUS_OK){}
	// Get and echo a character forever.
	while (true) {
		ch = usart_get(&USART0);
		//scanf("%c",(char*)&ch);

		if (ch) {
			while(usart_putchar(&USART0, 'R') != STATUS_OK) {};while(usart_putchar(&USART0, ch) != STATUS_OK) {};
			
			//printf("RX:%c",(char)ch);
		}
	}
}

ASF is configured to use the UART. I tried both STDIO methods and raw char puts. Nothing is coming out the UART. I can only assume the UART is broken, or miswired. :frowning: