Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Discussion Groups

Discussion Groups | TMS320C54x | [Fwd: How to use the HPI to connect it to external devices ?]

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

[Fwd: How to use the HPI to connect it to external devices ?] - Jeff Brower - Feb 8 7:46:29 2008



Dayah-

I asked you before, please post to the group, not to me.  I cannot help you unless
you post to the group.

-Jeff
-------- Original Message --------
Subject: How to use the HPI to connect it to external devices ?
   Date: Thu, 7 Feb 2008 23:32:08 -0800 (PST)
   From: dayah nuru <d...@yahoo.com>
     To: Jeff Brower <j...@signalogic.com>

 Hi, I found this code from website....my problem is when I run this code, it can't
detect the regs54xx.h file because the file wasn't in the library. This problem I
settled by searching the file in internet. So, that file I already got. There is
#include<regs.h> in the regs54xx.h file. This file I can't find from internet. I only
found the regs.h for C6x. I used tms320vc5416 for my project. So, where I can find
the file ? If I don't put the regs.h, there will be errors. Hope you can help me. Or
you have any example for using the HPI pin ? I really need it. Thanks.
-----------------------------------------------------------------------------------------------
------------------------------------
 /*********************************************************************/
/* hpi.h v0.00                                                       */
/* Copyright (c) 1997 Texas Instruments Incorporated                 */
/*********************************************************************/
/*********************************************************************/
/* This header defines the macros, symbols, fuctions that are needed */
/* for accessing functions of the Host Port Interface (HPI).         */
/* The MACROS defined here are dependent on the symbol definitions   */
/* contained in regs.h.                                              */
/*********************************************************************/
#include <stdlib.h>
#include
<limits.h>/*********************************************************************/
/* INCLUDE MEMORY-MAPPED REGISTER DEFINITIONS                        */
/*********************************************************************/
#include
"regs54xx.h"/*********************************************************************/
/* Define HPI interface constants                                    */
/*                                                                   */
/* NO_HPI_PINS - Number of configurable HPI pins                    */
/*********************************************************************/#define
NO_HPI_PINS 16/*********************************************************************/

/* ENABLE_HPI_MEM - enables C54x cpu access to shared host memory    */
/*********************************************************************/
#define ENABLE_HPI_MEM\
 HPIC |=
MASK_BIT(SMOD)/*********************************************************************/

/* DISABLE_HPI_MEM - disables C54x cpu access to shared host memory  */
/*********************************************************************/
#define DISABLE_HPI_MEM\
 HPIC &=
~MASK_BIT(SMOD)/*********************************************************************/

/* HOST_INTERRUPT - posts interrupt to host                          */
/*********************************************************************/
#define HOST_INTERRUPT\
 HPIC |=
MASK_BIT(HINT)/*********************************************************************/

/* Function Prototypes                                               */
/*                                                                   */
/* reset_hpi_config - initialize HPI config data structures      */
/* config_host_ctrl_pin - configure HPI host control pin             */
/* config_host_data_bus - configure HPI HD0-HD7 data bus             */
/* init_hpi  - initialize HPI interface                   */
/*********************************************************************/
void reset_hpi_config(unsigned int max);
int config_host_ctrl_pin(short pin, void *addr, short bit, short rw,
short inv, unsigned int delay);
int config_host_data_bus(void *addr, short bit);
int init_hpi(short bob, void *hpi_addr);
int write_hpi_data(char *val, void *hpi_addr, unsigned int no_items,
unsigned int size, short autoinc);
int get_hpi_data(char *val, void *hpi_addr, unsigned int no_items,
unsigned int size, short autoinc);
int client_interrupt();
int clear_client_interrupt();
int set_hpi_addr(void *addr);
static void write_hpi_ctrl(unsigned short ctrl);
unsigned int read_data(void);
-----------------------------------------------------------------------------------------------
----------------------------------
  Regards,Dayah

Jeff Brower <j...@signalogic.com> wrote:

     Dayah-

     Please post your question to the c6x Yahoo Group.

     -Jeff

     dayah_nuru wrote:
     >
     > Hi,
     >
     > This is my c coding to configure gpio as output to connect it to a
     > stepper motor. This program have error. Can you help me to provide the
     > correct coding ? Thanks.
     >
     > Regards,
     > Dayah



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )