cancel
Showing results for 
Search instead for 
Did you mean: 

IAP for STR750 (AN2078)

mige
Associate
Posted on October 11, 2013 at 01:12

Hello.  I'm posting here regarding the ST Micro IAP serial bootloader program based on Application Note AN2078.

Here's a list of the tools being used.

Development compiler:

Raisonance IDE (RIDE) Version 7.28.10.0075, running on Windows XP Home Edition SP3

Development hardware:

Raisonance REva Starter Kit for STR750F

Target device:

STR750FV2

Here's what I have been able to do so far:

I downloaded and unpackaged the IAP application source files (delivered as a ZIP archive) into a Windows XP computer.

Next, I launched the compiler, created a RIDE project directory for IAP, and placed all the unpackaged source data (.c and .h files) into the IAP project directory.

Then I added the required .c files one-by-one, starting with main.c, into the project build, and soon was able to successfully compile the IAP application.

At this point, the .hex file generated by RIDE was able to be programmed into the internal FLASH of the STR750FV2 microprocessor, which is on a daughterboard PCB that is a part of Raisonance's Reva Starter Kit development platform.  Programming the IAP into the STR750's internal flash was done using a JTAG interface.

I then connected the REva test board (with STR750 daughtercard) to a computer serial COM port.

I used both Hyperterminal and Tera Term for testing the serial connection, and both are communicating to UART0 of the STR750, as the following text is displayed on the terminal window whenever the STR750 is powered up or reset (Hyperterminal shown here):

0690X00000602eqQAA.jpg

When I press ''1'', I get the following text returned in the Hyperterminal window:

0690X00000602fPQAQ.jpg

Note: the string of C's are returned to the Hyperterminal window (at a rate of appx. one ''C'' per second) while the IAP program is waiting for a ''send file'' command to be issued by the Hyperterminal program.

The next two pictures show how I attempt to send the sample binary file (''Example_STR75x.bin''), which was included in the ST Micro IAP project package, using Hyperterminal:

0690X00000602eNQAQ.jpg

0690X00000602f0QAA.jpg

Note that the Ymodem protocol is selected in Hyperterminal, which is what is required for IAP to work according to AN2078.  The file should be sent when the Send button is clicked.

After the Send button is clicked, Hyperterminal displays a progress window, but the file is never sent.  What is seen in that progress window are two things:

1. The initial ''Last error'' field displays ''Unrequested response''.

0690X00000602f5QAA.jpg

2. After about a minute, the ''Last error'' field displays ''No response''.

0690X00000602feQAA.jpg

Finally, after two minutes have elapsed, the Send session times out, and Hyperterminal shows the following message:

0690X00000602gNQAQ.jpg

Now as far as I know, I have followed most of the requirements given in AN2078.  However, there is one part of that document that I am not sure about.  From page 5:

''To run the IAP driver, STR7xx internal Flash must be hardware remapped at address 0x0.  Thus the IAP driver is programmed in Flash bank0 sector0 and the user application in the remaining memory space in bank0.''

To be honest, I am not sure how to verify or implement this requirement using the RIDE tools.

Hopefully I have provided sufficient information.  If anyone can offer any suggestions, that would be greatly appreciated.  Also, let me know if any additional details are needed.

Thank you for reading, and thanks in advance for any feedback.

#an2078 #str750 #iap-bootloader
1 REPLY 1
daviddavid93
Associate II
Posted on December 03, 2013 at 15:48

Hi,

For the Flash to be mapped at 0 you need two things:

1. The Boot Mode option in Ride should be set to FLASH. That's for the compiler and linker.

2. The Boot pins on the board must be set to FLASH. That's for executing the program without the debugger. (see the board's doc and schematic for details)

To check it, program the board using JTAG then power it OFF and ON and check that it speaks on the UART. (without launching debug in Ride) If it does, this proves that your application is programmed and running in Flash at address 0.

From your report I think that you are doing those things correctly. Because the program speaks.

I'm not expert in those IAP apps, but I would investigate towards other things, like the protocol for sending the bin file.

I hope it helps.

Best Regards,

Vincent