This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Can't access document from old thread

The Possible ways Cortex-R4 can perform Speculative Access beyond APPLICATION Definition post from 8 years ago has a reference to the following attachment for some test code:

http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/312/0640.gio_5F00_test_5F00_spec.c

However, when I try and download the attachment get a "You do not have permission to view this directory or page." error.

Is it possible to obtain the attachment or has it been deleted from the server?

I tried logging out and cleaning the browser cache and cookies, but still got the same error.

Edit: fix mangled link to attachment.

  • Hello Chester,

    I get the same error when trying to access that thread.  Let me do some research to see if it can be retrieved and I'll get back to you early next week.

    Regards,

    ~Leonard  

  • Hi Chester, 

    Here is the retrieved document.

    0640.gio_test_spec.c
    #include "gio.h"
    #include "gio_test.h"
    #ifdef	DEVICE_MODEL
    	#include "device.h"
    #endif
    
    unsigned int Illegal_Mem_DATA;
    #ifdef FLASH
    const unsigned int Illegal_Mem_ADDR[20]={
    0x00210000,
    0x00230000,
    0x00350000,
    0x00470000,
    0x00490000,
    0x00510008,
    0x00530008,
    0x00550008,
    0x00570008,
    0x20200008,
    0x08021000,
    0x08031008,
    0x08071000,
    0x08091008,
    0x080A1000,
    0x080B1008,
    0x08033000,
    0x08037008,
    0x08039008,
    0x08034000
    };
    #else
    const unsigned int Illegal_Mem_ADDR[20]={
    0x31000,
    0x51008,
    0x71000,
    0x91008,
    0xA1000,
    0xB1008,
    0x33000,
    0x37008,
    0x39008,
    0x34000,
    0x08710000,
    0x08730000,
    0x08750000,
    0x08770000,
    0x08790000,
    0x08710008,
    0x08730008,
    0x08750008,
    0x08770008,
    0x08790008
    };
    #endif
    
    #ifdef CORTEX_M3
    #pragma INTERRUPT (GIO_ISR)
    #else
    #pragma INTERRUPT (GIO_ISR,IRQ)
    #endif
    
    #ifdef CORTEX_R4
      #pragma CODE_STATE (GIO_ISR,32)
       #pragma CODE_STATE (GIO_Dummy,32)
    #endif
    
    #ifdef ARM7
      #pragma CODE_STATE (GIO_ISR,32)
    #endif
    
    void GIO_PASSValue(int value);
    unsigned int GIO_TestFlag = 0;
    unsigned int GIO_TestCount = 0;
    unsigned int GIO_Started = 0;
    
    void GIO_Dummy();
    
    void GIO_TestInit_ZZ()
    { 
    #ifdef	DEVICE_MODEL
    		register GIO_ST *GIO_ptr = (GIO_ST *)GIO1;
    #else	
    	register GIO_ST *GIO_ptr = &e_GIO_ST;
    #endif 
        if(GIO_Started & 1)	
     	{
     		GIO_ptr->Port_ST[0].Dclr_UL = 0x2;   	// GIOA 1 pin output high
    	}
    	else 
    	{
    		GIO_ptr->Port_ST[0].Dset_UL = 0x2;
    	}
        GIO_Started++;	
    
    } 
    
    
    
    void GIO_TestInit()
    { 
    #ifdef	DEVICE_MODEL
    		register GIO_ST *GIO_ptr = (GIO_ST *)GIO1;
    #else	
    	register GIO_ST *GIO_ptr = &e_GIO_ST;
    #endif
    
        if(GIO_Started & 1)	
     	{
     		GIO_ptr->Port_ST[0].Dclr_UL = 0x1;   	// GIOA 0 pin output high
    	}
    	else 
    	{
    		GIO_ptr->Port_ST[0].Dset_UL = 0x1;
    	}
        GIO_Started++;	
    
    } 
    
    
    unsigned int GIO_TestVerify()
    {
        unsigned int error = 0;
       	GIO_TestFlag = 0;
    	Illegal_Mem_DATA++;
    		if(Illegal_Mem_DATA >=20)
    			Illegal_Mem_DATA=0;
    //   	if (GIO_TestCount != GIO_Started) error = 1; //comment out for the noise on GIO pin
       	return (error);
    
    }
    
     
    void GIO_ISR()
    {
     	register volatile unsigned char gio_temp,i=0;
    	#ifdef	DEVICE_MODEL
    		register GIO_ST *GIO_ptr = (GIO_ST *)GIO1;
    #else	
    	register GIO_ST *GIO_ptr = &e_GIO_ST;
    #endif 
     	gio_temp = GIO_ptr->OffB_UB;      
       	GIO_TestCount++;
      	GIO_TestFlag = 1;	
    	GIO_PASSValue(Illegal_Mem_ADDR[Illegal_Mem_DATA]);
    //	asm("	mov r9,#0x31000");
    //	asm("	add r5,r5, #0x08000000");
      
    
    
    }
    
    void GIO_Dummy()
    {
    
    	asm("    ldr r6,[r9]");
    	asm("    b  #0x200000");	/*2 MB offset*/
    
    }
    
    void GIO_PASSValue(int value)
    {
    
    	asm("	mov	r9,r0");
    }
    
    
    	/*
    void GIO_ISR_spec()
    {
     	register volatile unsigned char gio_temp;
    	register GIO_ST *ptr = &e_GIO_ST;
     	gio_temp = ptr->OffB_UB;     
       	GIO_TestCount++;
      	GIO_TestFlag = 1;
    
    	asm("	mov r5,#0x31000");
    
    //	asm("	add r5,r5, #0x08000000");
      
    }
    
    */

    At your service,

    ~Leonard