Ignore:
Timestamp:
Nov 8, 2001, 2:15:47 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
f3dc8e6
Parents:
1fd36613
Message:

2001-11-08 Jiri Gaisler <jiri@…>

This fix is in response to test results reported by Jerry Needell
<jerry.needell@…> for the SPARC/ERC32 and tracked as PR80.

  • erc32/include/bsp.h: TM27 was not running properly because the ERC32 and LEON cannot nest interrupts at the same level. The BSP test support had to be modified to support using two different interrupt sources.
  • tm27/task1.c: Account for overhead in starting and stopping the timer.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/erc32/include/bsp.h

    r1fd36613 r21766bd6  
    2020 */
    2121
    22 #ifndef __SIS_h
    23 #define __SIS_h
     22#ifndef __ERC32_BSP_h
     23#define __ERC32_BSP_h
     24 
    2425
    2526#ifdef __cplusplus
     
    9192
    9293#define TEST_INTERRUPT_SOURCE ERC32_INTERRUPT_EXTERNAL_1
     94#define TEST_INTERRUPT_SOURCE2 (ERC32_INTERRUPT_EXTERNAL_1+1)
    9395#define TEST_VECTOR ERC32_TRAP_TYPE( TEST_INTERRUPT_SOURCE )
     96#define TEST_VECTOR2 ERC32_TRAP_TYPE( TEST_INTERRUPT_SOURCE2 )
    9497 
    9598#define MUST_WAIT_FOR_INTERRUPT 1
    9699 
    97100#define Install_tm27_vector( handler ) \
    98   set_vector( (handler), TEST_VECTOR, 1 );
     101  set_vector( (handler), TEST_VECTOR, 1 ); \
     102  set_vector( (handler), TEST_VECTOR2, 1 );
    99103 
    100104#define Cause_tm27_intr() \
    101105  do { \
    102     ERC32_Force_interrupt( TEST_INTERRUPT_SOURCE ); \
     106    ERC32_Force_interrupt( TEST_INTERRUPT_SOURCE+(Interrupt_nest>>1) ); \
    103107    nop(); \
    104108    nop(); \
Note: See TracChangeset for help on using the changeset viewer.