FILE: hic_ex2_config_8bit_adc.c
Example sets up Host Interface Controller Module in 8-bit mode the data memory of device is accessed by the External Host.
- This follows example configuration for pin constrained applications described in the Application note titled Application guide for peripheral expansion using HIC(SPRACR2). -This example is validated on an TI Internal Validation Platform will not run in F28002x Control Card. This is to be run with a corresponding Host side code emif_ex8_8bit_asram_hic_adc is run on F2838x based host first and then this example is run.
- The example initializes the HIC for 8 bit Memory access mode with Single Read and Write Control Pin
- DMA is configured to do transfer of the ADC result from ADCRESULT0-15 to HIC D2H buffer.
- The example configures CPUTIMER0 to generate an event every second on which the ADC SOC0-15 start conversion.
- The timer is enabled on receiving HIC_START_TOKEN on the H2D Token from the host.
- The end of ADC_SOC15 will generate a DMA event
- The DMA ISR signals the host with HIC_DATA_TOKEN to signal data write.
- The Host is interrupted with HIC_INT on ADC End of conversion event
- The DMA Channel is stopped after HIC_TEST_NUM_SAMPLES samples are collected This example can be used as a reference to implement Communication between Host and HIC with minimal number of pins. Please refer to device TRM and application note titled 'Application guide for peripheral expansion using HIC'(SPRACR2) for further details about Host interface Controller applications.
External Connections
This is tested on TI Internal validation platform hence no connection needed on Control card. This has been tested with F2838x EMIF interface with emif_ex8_8bit_asram_hic_adc example Analog channel A7 has been used as Analog Input to Sample
Watch Variables
numDMAInterrupts