SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on the software and hardware for Atmel's STK standard.
By foxOnTheRun
#98797
Hi to all, first post here :)

Ok, so I got 2 openLog and after 4 days being on and off over the project I was able to link it to my PIC (16F688 with H/W uart) but without many result, in part due to my inexperience in UART/stream/parsing topics (I was getting errors in the communication, commands not recognized and so on).

Today I found in a drawer a precious MAX232 (!), 4 capacitor later I fired up Putty and got a prompt. I immediately get "12>" and after typing ?+return I get the list of available commands. It's missing SIZE and a few others from the github command list.

I think this unit is very old, could be firmware 1.0, but it isn't appearing anywhere in the stream (I bought it 4 weeks ago, but from a local reseller).

I was looking for flashing it with the latest firnware version, apart from the method in the github documentation (well, I have only 2 openlog boards and a MAX232), are there any other ways to upload the firmware to the unit? I wasn't able to find more info :(

Thanks!
By Liencouer
#98806
i suspect you came across this on how to reflash the firmware. there is a note a bit down the page discussing how to upgrade the firmware if you dont have the DTR line (which you dont, with the max232's). it seems like it should be what you want.
  • avrdude for linux doesn’t do the DTR toggle so you will have to reset manually.
  • To reset manually, get a small bit of wire and find the reset connection on the 4 hole SPI interface – it is the square connection hole near the “O” where it says OpenLog on the silkscreen. Short that pin to a ground – the connector for the 6 pin at the opposite corner is ground, as is the metal case for the micro SD card (which is directly below the reset hole). The bootloader is only active for a fraction of a second so you need to hit enter and do the reset at the same time. You can also disconnect one of the power lines (e.g. GND) and reconnect it just as you press Enter to run the avrdude command.
By foxOnTheRun
#98832
Interesting, but the tutorial is all centered on using another board to connect to the openLog (SKU500), I was looking keeping specific software aside, how can I enter the reprogramming mode for the openLog?

If I short to GND that PIN then open a terminal to the openLog, what should I get? because I miss the part of what to do after the short (if I do it with the right timing).

I don't have experience with reflashing procedure, I know for example my Fonera Router is accepting a CTRL+C on the network interface for about 2s during boot, then I can putty it, send some serial commands and have it download a new firmware from my PC via the same network interface.

Is there something similar for openLog?

Has it something to do with: "avrdude.exe -p atmega328p -P COM3 -c stk500v1 -b 57600 -Cavrdude.conf -U flash:w:main.hex" or I should look somewhere else?

Tnx :)
By Liencouer
#98879
i dont have an openlog, so this is predominantly speculation, not firsthand experience.

from the list of things you need, you dont need an stk500. from reading the sfe stk500 serial bootloader page, the stk500 business is related to the bootloader code on the micro (and the openlog), not the physical stk500 board itself. instead, you need the following:
  • OpenLog
  • Serial connection – we recommend the FTDI Basic as it is the easiest to hook up over USB
  • Power – pull power from an Arduino or from a Breadboard with Power Supply
  • Wires – Strip some wire and jam it into the breadboard
I believe you have all of the required things. you have your max232 instead of the ftdi, which is why you'll need to manually do the dtr trick as i mentioned before, because the max232 doesn't have a dtr line like the ftdi.
By foxOnTheRun
#99436
Thanks Liencouer for clerifiing about the stk500 issue, I was thinking that the command and config file was to be used together with the other adapter board.. :\

Some minor update, I've got the libusb0.dll errors from some trials I did few days ago, this morning I've checked and saw the .lib available for download in the wiki page, I'll try again at the end of the week, till now this shuld be the correct procedure:

_ Check with putty that the serial link is actually working

_ Prepare the following line of code at the command prompt:
avrdude.exe -p atmega328p -P COM3 -c stk500v1 -b 57600 -Cavrdude.conf -U flash:w:main.hex

_ Power up the openLog AND almost at the same time hit RETURN on the command prompt to send the command

Redo until I find the correct timing.

Meanwhile, if someone already did that and would like to contribute here ;)
User avatar
By sparky
#99632
Hi fox - I did some breadboard experimenting with OpenLog and a shifter board (RS232 to serial converter) to see if I could bootload the OpenLog without an FTDI/DTR trick. It works fine. Sounds like you're headed in the right direction.

Do download the libusb0.dll: http://wiki.github.com/nseidle/OpenLog/ ... g-firmware

avrdude.exe -p atmega328p -P COM1 -c stk500v1 -b 57600 -Cavrdude.conf -U flash:w:main.hex
is the command I'm using under windows.

I pressed return and powered up the OpenLog at the same time. It seems there's about 500ms window where OpenLog sends the bootload character and avrdude picks it up and begins bootloading. It's very repeatable once you get the hang of it.

Let us know if you still run into problems.

-Nathan