background image

AN-175 

 

21 

 

Holt Integrated Circuits 

This function is used to transmit a command byte followed by a multiple number of data bytes 
contained into the array passed by the pointer. In this case it’s used to load the SPI Write Transmit FIFO 
command byte 0x12 and the frame data bytes.

 

void TransmitStandardFrame(uint8 *TXBuffer) 
 {               
 uint8 static ByteCount,dummy; 
  
   SPI0CR1 = SPI0CR1 & ~SPI0CR1_SSOE_MASK;    // disable auto /SS output, reset /SS Output  
   SPI0CR2 = SPI0CR2 & ~SPI0CR2_MODFEN_MASK;  // disable auto /SS output, reset SPI0 Mode  
   SPI0_nSS = 0;                              // assert the SPI0 /SS strobe 
   for(ByteCount=0; ByteCount< 13; By+)        // Transmit command=0x12 +  12        
      {               
         dummy = txrx8bits(TXBuffer[ByteCount], 1);  // Transmit the whole message,  

 

 

 

 

 

 

 

// ignore return values  

      }    
   SPI0_nSS = 1;                             // negate the SPI0 /SS strobe         
   SPI0CR1 |= SPI0CR1_SPE_MASK|SPI0CR1_SSOE_MASK;  
   SPI0CR2 |= SPI0CR2_MODFEN_MASK;          
 } 

 

Al l the other functions in this module are based on and utilize these basic functions. 
 

Init3110() 
 

This function is provided to initialize the HI-3110 for the desired mode and bit rate.  

 uint8 Init3110(const mode, uint8 ttdiv, uint8 wakeup, uint8 reset, uint8 bor)

 

 

 

See the 3110Driver.h header file for the options available in the define statements. 

 

Uart.c  Serial Port (RS-232) 
 

The drivers to support the serial port are contained in this module.  There are some function drivers to 
allow messages to be sent and received on the UART. This is useful to log status or data messages on 
Hyper-terminal or any other terminal program.  It currently uses polling to determine when the data 
receive or transmit registers can be read or written.  
 

GPI and GP2 
 

The HI-3110 general purpose output pins can be configured to output status information described in 
the GPINE register. The program configures these differently depending on the mode and the LED10 and 
LED11 will turn on when these are at a logic low. GP1 and GP2 are configured to output TXCPLT and 
RXFIFO to generate interrupts.  
 
 

 

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Downloaded from

Arrow.com.

Содержание HI-3110

Страница 1: ...AN 175 Rev B Holt Integrated Circuits ADK 175 User s Guide HI 3110 Evaluation Board April 2020 Downloaded from Arrow com...

Страница 2: ...New 08 30 11 Initial Release Rev A 01 15 13 USB to Serial External SPI Interface and Two node demonstration Rev B 04 20 2020 Improve board schematic diagram resolution Update Freescale Development To...

Страница 3: ...2XDT512 microcontroller with 512K flash and 20K RAM communicates with the HI 3110 through the SPI interface The board includes switches and LEDs to help navigate the operating modes and confirm data a...

Страница 4: ...ake up from Button press or CAN data Selectable Bit Rates from 83 3KBPS 1MBPS Print out the CAN buffers 64 on the serial console Print out the status registers on the serial console Print out the Tran...

Страница 5: ...set For normal operation ensure SW2 4 MRST is in the open position otherwise the MCU will be held in the reset state The purpose of this MRST dip switch is to allow easy interfacing of an external MCU...

Страница 6: ...op Back 1 0 1 Transmit Extended Frames 1 1 0 Receive in interrupt mode 1 1 1 Serial Console Commands SW2 OPT1 switch Receiver data frame compare Receiver Modes If OPT1 is in the open position the rece...

Страница 7: ...o pass input strings to the program There are provisions for additional user code to be implemented so custom commands can be developed and easily integrated UART Serial Port Setup 115200 Baud 8 bits...

Страница 8: ...hematic for the pin assignments Connect MR nCS SO SI SCK and optionally STAT and INT to the external MCU or FPGA The HI 3110 supports either 5V or 3 3V logic levels depending if 5V or 3 3V is applied...

Страница 9: ...method To use Receive mode with an external node transmitter set the OPT1 switch to the closed position to disable the Receiver data frame compare feature This will allow any data frame to be accepte...

Страница 10: ...nter Normal mode A message on the serial console will indicate the Sleep Mode and the source to the wake up event Holt HI 3110 Demonstration Software Revision 09 Receive Mode polled Entering SLEEP Mod...

Страница 11: ...frames The Receive board LEDs 1 4 will reflect the lower nibble of byte3 of the data field When OPT1 switch is open The Receiver program will compare the 32 bit counter value in the data field and tur...

Страница 12: ...N messages and prints the last 64 CAN frames and the HI 3110 status registers on the serial console Press Button 4 to resume receiving CAN Messages Mode 5 Transmit Extended Frames This is the same as...

Страница 13: ...110 Enter 2 for the status register read and display CTR0 80 CTR1 00 BTR0 00 BTR1 00 TEC 00 REC 00 MESSTAT 00 STATF 00 ERR 00 INTF 00 INTE 82 STATFE 00 GPINE 00 TIMERUB 0D TIMERLB 66 Downloaded from A...

Страница 14: ...tion BoardTest c Board Test functions Uart c Low level UART drivers datapage c Freescale IDE support file Include Files Main h 3110Driver h HI 3110 header file Peripherals h Peripherals header file Bo...

Страница 15: ...ceive Interrupt Mode Transmit Ext Mode Test Mode Transmit Mode Receive Mode Monitor Mode Loopback Mode Transmit Extended Frame Mode Receive Interrupt Mode Serial Commands Yes Yes Yes Yes Yes Yes Yes Y...

Страница 16: ...Interrupt Set G_TCPLTIE Flg Clear Interrupt Yes Downloaded from Arrow com Downloaded from Arrow com Downloaded from Arrow com Downloaded from Arrow com Downloaded from Arrow com Downloaded from Arrow...

Страница 17: ...EDs1 4 with byte 3 of data field OPT1 switch open Increment 32 bit counter Increment message count Message count 64 32 bit counter compare Turn on RED LED8 and Halt No Yes Yes No Yes Yes Yes Yes SW4 b...

Страница 18: ...1 Pause Print History FIFO Load 8 Std or Ext Frames into FIFO FIFO Empty OPT1 SW open Wait 100us Wait for TXCPLT Yes No Yes No Downloaded from Arrow com Downloaded from Arrow com Downloaded from Arro...

Страница 19: ...e Delay100us function define K_1MS 10 define K_10MS 100 define K_100MS 1000 define K_1SEC 10000 Usage Delay100us K_1SEC delay for one second A one second interrupt handler in the TIMER_ISR is provided...

Страница 20: ...ead or write a command plus a multiple number of bytes For example the function below is the basic function to write out a command plus one byte of data to the 3110 SPI port Write SPI Command with a V...

Страница 21: ...ilable in the define statements Uart c Serial Port RS 232 The drivers to support the serial port are contained in this module There are some function drivers to allow messages to be sent and received...

Страница 22: ...VE MODE Select receive mode from the SW1 dip switches and the program will go directly into this mode after a power on reset The receive mode reads in a frame by first examining the receive FIFO empty...

Страница 23: ...0 W_MASK2 0xFF 0x00 0x00 0x00 0x00 0x00 W_MASK3 0x00 0x00 0x00 0x00 0x00 0x00 Accept everything with filter 3 W_MASK4 0xFF 0x00 0x00 0x00 0x00 0x00 W_MASK5 0xFF 0x00 0x00 0x00 0x00 0x00 W_MASK6 0xFF 0...

Страница 24: ...uments may still refer to the old debugger shown below PN USBMULTILINKBDME A suitable replacement is the PE Micro USB Multilink Universal A more advanced option is the PE Micro USB Multilink Universal...

Страница 25: ...Arrow com Downloaded from Arrow com Downloaded from Arrow com Downloaded from Arrow com Downloaded from Arrow com Downloaded from Arrow com Downloaded from Arrow com Downloaded from Arrow com Download...

Страница 26: ...2 OHM 1 1 8W 0805 R9 R10 311 4 02CRCT ND 30 2 Res 60 4 Ohm 1 4W 1 1210 SMD R15 R19 RHM60 4BDCT ND 31 1 Res 0 ohm 1 8W 5 0805 SMD R7 RHM0 0ARCT ND 32 1 Res 1 5M 1 8W 5 0805 SMD R39 RHM1 5MARCT ND 33 1...

Страница 27: ...V C3 10uF 10V R7 0 OHM R7 0 OHM J2 DB9F J2 DB9F 5 9 4 8 3 7 2 6 1 L1 F BEAD 1 4A L1 F BEAD 1 4A R18 3 3K R18 3 3K R14 680 R14 680 C28 1uF C28 1uF R1 680 R1 680 C24 01uF C24 01uF LED8 LED8 JP3 JUMPER J...

Отзывы: