Hi,
I'm using a Hercules tms470MF06607 board.
I need to exchange data with an external board through SPI (CLK, SIMO,SOMI,SS) and manage an interrupt from GIOA[4].
I've used hlacogen to setup the project with what I need.
Now I'm looking at spi.h which has a lot of functions, but no documentation about how to use it.
Which one do I have to use?
If I choose for example
/** @fn uint32 spiTransmitData(spiBASE_t *spi, spiDAT1_t *dataconfig_t, uint32 blocksize, uint32 short *srcbuff)
* @brief Transmits Data using polling method
* @param[in] spi - Spi module base address
* @param[in] dataconfig_t - Spi DAT1 register configuration
* @param[in] blocksize - number of data
* @param[in] srcbuff - Pointer to the source data ( 16 bit).
*
* @return flag register value.
*
* This function transmits blocksize number of data from source buffer using polling method.
*/
uint32 spiTransmitData(spiBASE_t *spi, spiDAT1_t *dataconfig_t, uint32 blocksize, uint16 * srcbuff)
I need to know the explanation of each field that belongs to spiDAT1_t which is a structure of this type
typedef struct spiDAT1RegConfig
{
uint32 CS_HOLD;
uint32 WDEL;
uint32 DFSEL;
uint32 CSNR;
}spiDAT1_t;
Is there any basic example about using SPI?
that means: bring low chip select, read/write some bytes through spi, bring up cs.
Another question is how and where the function that manages external interrupt is placed. I've connected the pin GIOA[4]. But how can I enable/disable interrupt handling? or clear the interrupt register once I've managed it from the function (and how can I setup the function? that means declare it and set it?)
Thanks