Go to Post Pro: Very easy to build with. Con: HEAVY AS ELEPHANTS - Tetraman [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-01-2007, 00:44
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Question Loader Protocol: Command 09

I looked quickly at existing open source loaders, and I noticed that all of them use constant strings to erase data. What I have found is gathered at http://www.astro73.com/wiki/IFI_Load...ol#Sample_data.

On that page, it's evident that the most common data (for OSS apps) is:
Code:
E0 00 08 00 00
E0 00 40 00 00
However, if you look at data from the official loaders (gathered using sysinternal's portmon), it's evident that this is not the only set of data, at least for EDU and Vex controllers.

Does anyone have any insights into this? Any additional data points? I have not had the opportunity to analyze data from loading the RC.
  #2   Spotlight this post!  
Unread 28-01-2007, 01:02
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: Loader Protocol: Command 09

As far as I can tell, it's basically a "row write" (think memset) command. In my implementation of AN851 0x09 is defined as IFI_WR_ROW.

It seems to write whatever number you specify to a fixed number of rows on the robot controller. Internally, it most likely erases the rows and then writes to them.

09 E0 00 08 00 00
In terms of the AN851 documentation, this would be

Code:
<0x09><LEN><ADDRL><ADDRH><ADDRU><VAL>
Where LEN is the number of rows (1 row = 64 bytes, same as in ER_FLASH) and VAL is what is to be written (0x00 in this case). So the above data represents:
Erase 0xE0 blocks (224 * 64 bytes = 0x3800 bytes total) starting at 0x000800 (to 0x004000) and write the value 0x00 to them. Then it does the same for the next 0xE0 blocks.

I have no idea why IFI implemented it, maybe they didn't like that erasing flash sets all the bits instead of clearing them?

EDIT: Looking at the other bot's data, it's a little weirder.
01 C0 7F 00 00 - set 0x007FC0 - 0x008000 to zero. This is the last row on a PIC18F8722's flash mem, this may serve a special purpose on that RC.
01 00 00 20 00 - set 0x200000 - 0x200040 to zero. This would be the user ID registers of the PIC18F. See the data sheet.
01 00 00 30 00 - set 0x300000 - 0x300000 to zero. These are the configuration registers, which are write-protected on the FRC.
10 00 00 00 00 - set 0x000000 - 0x000800 to zero. this is the boot sector of the FRC, which is where AN851 resides and is also write protected on the FRC.

Seems a little odd to me, but it all makes sense in terms of the "official" Microchip protocol.
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.

Last edited by Shinigami2057 : 28-01-2007 at 03:33.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IFI_Loader protocol? Shinigami2057 Programming 11 29-11-2006 22:57
IFI Loader protocol Astronouth7303 Programming 0 31-07-2006 11:52
dashboard protocol sciguy125 Programming 9 22-08-2005 18:36
programming protocol sciguy125 Programming 6 20-06-2005 16:06
Dashboard Protocol Library archiver 2000 9 23-06-2002 22:24


All times are GMT -5. The time now is 23:52.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi