Microchip PIC24FJ64GA705 Handleiding


Lees hieronder de 📖 handleiding in het Nederlandse voor Microchip PIC24FJ64GA705 (72 pagina's) in de categorie Niet gecategoriseerd. Deze handleiding was nuttig voor 18 personen en werd door 2 gebruikers gemiddeld met 4.5 sterren beoordeeld

Pagina 1/72
2008-2012 Microchip Technology Inc. DS01229C-page 1
AN1229
INTRODUCTION
This application note describes the Class B Safety
Software Library routines that detect the occurrence of
Faults in a single channel CPU. These routines have
been developed in accordance with the IEC 60730
standard to support the Class B certification process.
These routines can be directly integrated with the end
user’s application to test and verify the critical
functionalities of a controller without affecting the end
user’s application.
This application note also describes the Application
Programming Interface (API) functions that are
available in the Class B Safety Software Library.
The Class B safety software routines can be called
periodically at start-up or run time to test the following
components:
CPU Registers
CPU Program Counter
Invariable Memory
Variable Memory
• Clock
Interrupt Handling and Execution
This application note also outlines various techniques,
which are not part of the Class B Safety Software
Library, to test components such as external communi-
cation, timing, I/O periphery, analog I/O and analog
multiplexer.
OVERVIEW OF THE IEC 60730
STANDARD
The IEC 60730 standard defines the test and diagnostic
methods that ensure the safe operation of the controlled
equipment used in household appliances. Annex H of
the IEC 60730 standard classifies the software into the
following categories (see Appendix B: “IEC 60730-1
Table H.11.12.7”):
Class A
Class B
Class C
The Class B Safety Software Library implements the
important test and diagnostic methods that fall into the
Class B category. These methods use various
measures to detect and respond to the software-
related Faults and errors.
According to the IEC 60730 standard, the controls with
functions that fall into the Class B category should have
one of the following structures:
Single Channel with Functional Test
In this structure, the Functional test is executed
prior to the application firmware execution.
Single Channel with Periodic Self-Test
In this structure, the Periodic tests are embedded
within the firmware, and the self-test occurs
periodically while the firmware is in Execution
mode.
Dual Channel without Comparison
In this structure, two independent methods execute
the specified operations.
Note: The term ‘IEC 60730 standard used in
this document refers to the “IEC 60730-1
ed.3.2 Copyright © 2007 IEC, Geneva,
Switzerland. www.iec.ch.
Authors: Veena Kudva & Adrian Aur
Microchip Technology Inc.
Note: “The author thanks the International Elec-
trotechnical Commission (IEC) for permis-
sion to reproduce information from its
International Standard IEC 60730-1ed.3.2
(2007). All such extracts are copyright of
IEC, Geneva, Switzerland. All rights
reserved. Further information on the IEC is
available from www.iec.ch. IEC has no
responsibility for the placement and con-
text in which the extracts and contents are
reproduced by the author, nor is IEC in any
way responsible for the other content or
accuracy therein.”
Class B Safety Software Library for
PIC® MCUs and dsPIC® DSCs
AN1229
DS01229C-page 2 2008-2012 Microchip Technology Inc.
SYSTEM REQUIREMENTS
The following system requirements are recommended
to run the Class B Safety Software Library:
For the tests that require the independent time
slot monitoring, the system hardware must be
provided with at least two independent clock
sources (e.g., crystal oscillator and line
frequency).
The user application determines whether the
interrupts need to be enabled or disabled during
the execution of the Class B Safety Software
Library.
If an interrupt occurs during the execution of the
Class B Safety Software Library routine, an
unexpected change may occur in any of the regis-
ters. Therefore, when the Interrupt Service Routine
(ISR) executes, the contents of the register will not
match the expected content, and the ISR will return
an incorrect result.
CLASS B SAFETY SOFTWARE
LIBRARY
The Class B Safety Software Library, which applies to 8-
bit, 16-bit, and 32-bit devices, includes several APIs,
which are intended to maximize application reliability
through Fault detection. These APIs help meet the IEC
60730 standard compliance. The following tests can be
implemented using this library:
CPU Register Test
Program Counter Test
Variable Memory Test
Invariable Memory (Flash/EEPROM) Test
Interrupt Test
Clock Test
In the following sections, the test description and the
implementation details are discussed for each test. In
addition, each section also lists the APIs that are
required to execute the corresponding test for
supported architectures.
CPU Register Test
The CPU Register test implements the
functional test H.2.16.5 defined by the IEC 60730
standard. It detects stuck-at Faults in the CPU registers.
This ensures that the bits in the registers are not stuck at
a value0or ‘1’; this is a non-destructive test.
This test performs the following major tasks:
1. The contents of the CPU registers to be tested
are saved on the stack before executing the
routine.
2. The registers are tested by first successively
writing the binary sequences (length is depen-
dant upon architecture), 010101... followed by
101010... into the registers, and then reading
the values from these registers for verification.
3. The test returns an error code if the returned
values do not match.
API FUNCTIONS
The following API functions implement the CPU
Register test:
SSL_8bit_CPU_RegisterTest (PIC10/12/16)
SSL_8bitsFamily_CPU_RegisterTest (PIC18)
• SSL_16bitsFamily_CPU_RegisterTest
• SSL_32bitsFamily_CPU_RegisterTest
Note: The interrupts should be disabled during
the execution of the CPU Register test so
that the register integrity is preserved at all
times.
2008-2012 Microchip Technology Inc. DS01229C-page 3
AN1229
Program Counter Test
The Program Counter (PC) test implements the func-
tional test H.2.16.5 defined by the IEC 60730 standard.
The PC holds the address of the next instruction to be
executed.
The test performs the following major tasks:
1. The PC test invokes the functions that are
located in the Flash memory at different
addresses.
2. These functions return a unique value.
3. The returned value is verified using the PC test
function.
4. If the values match, the PC branches to the
correct location.
The customized linker script defines the addresses
where these functions reside in the Flash memory. The
functions placed at these addresses return a unique
value, which is the starting address of the called func-
tion. Example 1 shows how to modify the linker script to
place a function in the Flash memory. The actual Flash
address space is processor dependent. Please refer to
the processor-specific linker script example provided.
API FUNCTIONS
The following API functions implement the PC test:
SSL_8bit_PCtest (PIC10/12/16)
SSL_8bitsFamily_PCtest (PIC18)
• SSL_16bitsFamily_PCtest
SSL_32bitsFamily_PCtest
EXAMPLE 1: LINKER SCRIPT MODIFICATION
Note 1: The user application defines the address
where the PC branches.
2: The size of the program memory varies
by device. Refer to the specific device
data sheet for more details.
/* The modified linker script */
SslTestSection1 0x900:
{
*(.SslTestSection1);
} program
/* The SSL_TestFunction1 function*/
long __attribute__((__section__(“.SslTestSection1”))) SSL_TestFunction1()
{
return((long)&SSL_TestFunction1);
}


Product specificaties

Merk: Microchip
Categorie: Niet gecategoriseerd
Model: PIC24FJ64GA705

Heb je hulp nodig?

Als je hulp nodig hebt met Microchip PIC24FJ64GA705 stel dan hieronder een vraag en andere gebruikers zullen je antwoorden




Handleiding Niet gecategoriseerd Microchip

Handleiding Niet gecategoriseerd

Nieuwste handleidingen voor Niet gecategoriseerd