ST AN1474 APPLICATION NOTE

AN1474

APPLICATION NOTE

ST92F150 AND ST92F120 PROBLEM RESOLUTION GUIDELINES

by Microcontroller Division Applications

INTRODUCTION

The ST92F120 and ST92F150 are part of the same family of powerful microcontrollers from STMicroelectronics, featuring single voltage flash memory and an innovative E3prom concept.

This document gives guidelines on resolving several common application problems that have been reported by ST Application Engineers.

Testflash features

The testflash features are described in the ST92F120 and ST92F150 datasheets.

Located in a reserved flash area, the TestFlash contains the bootcode which performs the E3prom initialization, provides the possibility to program the flash by In System Programming (refer to the application note AN1450 ST9 Flash Programming for a detailed description) and then jumps to the start address application code via the reset vector.

AN1474/1001

1/10

ST AN1474 APPLICATION NOTE

ST92F150 AND ST92F120 PROBLEM RESOLUTION GUIDELINES

1 EXTERNAL WATCHDOG ROUTINE

During the bootcode execution (from 12.5 ms up to 75ms if an aborted E3prom write operation is detected), a code routine provided by the user may be executed to refresh an external watchdog.

The routine address offset is located at addresses 0x000006h and 0x000007h while the segment where the routine is located has to be written in 0x000009h.

You must fill the word at the address 0x000006h with 0xffffh if your application does not use an external watchdog.

Startup file example (usually called crtbegin.spp) :

.org 0x06

.word 0xffff

Refer to the application examples provided with the ST9+ User Guide.

1.1 PROBLEM DESCRIPTION

The application is not executed at all and it is not possible to communicate by ISP with the programming board.

1.2 ANALYSIS

When the chip is read directly with the programming board, the contents of addresses 0x000006h and 0x000007h is not equal to 0xFFh.

These addresses in the application code are not equal to 0xFF whereas an external watchdog routine is not provided.

1.3 RESOLUTION

Modify the application code as mentioned at the beginning of this section and erase and reprogram the device.

There is no way to modify this chip by ISP, it has to be unsoldered.

2/10

ST92F150 AND ST92F120 PROBLEM RESOLUTION GUIDELINES

2 ST92F120 RESET VECTOR

One of the powerful features provided by the ST9 Flash device family is the possibility to upgrade the application code by downloading and programming through an I/O interface on the MCU (refer to the application note AN1275 In Application Programming for the ST92F120 for a detailled description).

In case of a parasitic reset during the flash upgrade operation, the application must be able to recover safely by executing the bootloader code.

To perform this, the bootloader is present in the flash sector where the application starts, the one pointed to by the reset vector. This sector must never be erased.

This is why the reset vector is always located in the smallest sector.

ST92F120 60Kbyte Flash device map

Sector

Size

F0

4 Kbyte

 

 

F1

48 Kbyte

 

 

F2

8 Kbyte

 

 

ST92F120 128Kbyte Flash device map

Sector

Size

F0

64 Kbyte

 

 

F1

48 Kbyte

 

 

F2

8 Kbyte

 

 

F3

8 Kbyte

 

 

ST92F150 60 Kbyte Flash device map

Sector

Size

 

 

F0

8 Kbyte

 

 

F1

8 Kbyte

 

 

F2

32 Kbyte

 

 

F3

12 Kbyte

 

 

ST92F150 128Kbyte Flash device map

Sector

Size

 

 

F0

8 Kbyte

 

 

F1

8 Kbyte

 

 

F2

48 Kbyte

 

 

F3

64 Kbyte

 

 

3/10

Loading...
+ 7 hidden pages