Part Number:SECDEVTOOL-OMAPL138C6748
Tool/software: Code Composer Studio
Dear Friends,
I would like to initialize our AFE5809EVM using our OMAP L138 LCDK. In order to initialize AFE5809EVM , the following two registries of AFE5809EVM should be set via SPI.
Register 0x16 = 0x01
Register 0x04 = 0x18
The OMAP L138LCDK Starterware has an example project, namely, "spi+c674x_omapl138_lcdk". This example clearly demonstrates how we can send and receive commands via the SPI module of the OMAP L138LCDK. I also know how to connect the SPI of OMAP L138 LCDK to the SPI of AFE5809EVM.
Question: I don't know how to write in CCS that send these register values. Here is a snapshot of the C code used to transmit and receive:
/* ** Enables SPI Transmit and Receive interrupt. ** Deasserts Chip Select line. */ static void SpiTransfer(void) { p_tx = &tx_data[0]; p_rx = &rx_data[0]; SPIIntEnable(SOC_SPI_1_REGS, (SPI_RECV_INT | SPI_TRANSMIT_INT)); while(flag); flag = 1; /* Deasserts the CS pin(line) */ SPIDat1Config(SOC_SPI_1_REGS, SPI_DATA_FORMAT0, 0x4); }
How can I write in my SPI code: find register number "0x16" and set its value to "0x01"?
Thank you