Other Parts Discussed in Thread: TMS320C6657, CC3100, CC3120, CC31XXEMUBOOST, , CC3100SDK,
Tool/software: Code Composer Studio
Hi, Tim
My Host is TMS320C6657,via UART to 3120MOD.
I use the latest SDK.
I have done the following:
1. According to SWRU455.pdf, we added "#define SL_IF_TYPE_UART" to user.h.
2. We modified the cc_pal.c:
Fd_t spi_Open(char *ifName,
unsigned long flags)
{
CSL_GpioHandle hGpio;
Uint8 pinNum = 15;
hGpio = CSL_GPIO_open(0);
CSL_GPIO_setPinDirOutput(hGpio,pinNum);
(void)platform_delay(50);
hGpio = CSL_GPIO_open(0);
CSL_GPIO_setOutputData(hGpio,pinNum);
return (1);
}
int spi_Close(Fd_t fd)
{
CSL_GpioHandle hGpio;
Uint8 pinNum = 15;
hGpio = CSL_GPIO_open(0);
CSL_GPIO_setPinDirOutput(hGpio,pinNum);
(void)platform_delay(50);
hGpio = CSL_GPIO_open(0);
CSL_GPIO_clearOutputData(hGpio,pinNum);
return (0);
}
int spi_Read(Fd_t fd,
unsigned char *pBuff,
int len)
{
int i=0;
uint8_t buf1[1];
while(1)
{
if (platform_uart_read(&buf1[0], 100) == Platform_EOK)
{
pBuff[i]=buf1[0];
i++;
}
else
{
if(i!=0)
break;
}
}
return (i);
}
int spi_Write(Fd_t fd,
unsigned char *pBuff,
int len)
{
int i=0,write_size = 0;
write_size = len;
for(i=0;i<len;i++)
{
platform_uart_write(pBuff[i]);
}
return (write_size);
}
3. In main.c:
EVM_init();
platform_uart_init();
platform_uart_set_baudrate(115200);
RetVal = sl_Start(0,0,0);
4. In main.c ,we watched: RetVal =1
Please help us with an analysis. Where is the fault?
Best Regards,
Thanks!
