HI,
I am using the TWRMCF51CN with CW10 and I am trying use the SPI0 port to read SPI device but I can't start driver. when I am debugging the spifd become null.
This is the code:
int sendData2(char *data){
FILE_PTR spifd;
spifd = fopen("spi0:", (pointer)(SPI_DEVICE_MASTER_MODE));
if(spifd == NULL){ //<- before fopen the spifd is NULL
printf("error opening CS Driver");
}
}
and this is the modified vars in user_config.h
#define BSPCFG_ENABLE_ADC 0 /* <- Change to 0 NOTE: Shares wires with I2C1, SPI0 */
#define BSPCFG_ENABLE_SPI0 1 /* <- Change to 1 NOTE: Shares wires with I2C1, ADC */
I trying a lot configurations, but I have the same error.
Please giveme help.
Regards.
Gabriel