Hello,
I recently got the ice v2 board. I can load the bin file for the i2c example, but when I modify the example code to just change the string outputted to the led display, the code does not work. When I was debugging I discovered the code is getting AM335X_BOARD_TYPE_ICE == boardType. The code then hangs on the task_sleep() function. Anyway to get the board type to equal ICE v2?
Also, I'm getting this warning when I build:
Product 'SYS/BIOS' v6.33.5.46 is not currently installed. A compatible version 6.40.2.27 will be used during build.
Thanks for your time,
Rachel Smith
/*
* ======== taskFxn ========
*/
Void taskFxn(UArg a0, UArg a1)
{
unsigned int RunLed = 0;
unsigned char led_val = 0xff;
char t_str[8];
System_printf("enter taskFxn()\n");
// printf("in taskFxn \n");
UARTPutString(uartInstance,"\nTI Industrial SDK Version - ");
UARTPutString(uartInstance,IND_SDK_VERSION);
UARTPutString(uartInstance,"\n\rDevice name \t: ");
UARTPutString(uartInstance,UTILsGetDevName());
UARTPutString(uartInstance,"\n\rChip Revision \t: ");
UARTPutString(uartInstance,UTILsGetChipRevision());
sprintf(t_str,"%d",UTILsGetArmClockRate());
UARTPutString(uartInstance,"\n\rARM Clock rate \t: ");
UARTPutString(uartInstance,t_str);
UARTPutString(uartInstance,"\n\rSYS/BIOS LED Sample application running on ");
if(AM335X_BOARD_TYPE_ICE == boardType)
{
UARTPutString(uartInstance,"ICE \n\r");
}else if(AM335X_BOARD_TYPE_IDK == boardType)
{
UARTPutString(uartInstance,"IDK \n\r");
}
else if(AM335X_BOARD_TYPE_ICE_V2 == boardType)
{
char *lcd_str1 = IND_SDK_VERSION;
char lcd_str2[]={"aaa aaa aaa"};
UARTPutString(uartInstance,"ICE V2\n\r");
OLEDInit();
OLEDShowString(1,(unsigned char *)lcd_str1,0,0);
OLEDShowString(1,(unsigned char *)lcd_str2,1,0);
OLEDDeactivateScroll();
OLEDContinuousScroll(0x01,0x01,Max_Column,0x00,0x00,0x01,0x06,0x01);
}
LEDInit();
LEDDIGOUTSetVal(led_val);
Task_sleep(2000); //2000
led_val = 0;
LEDDIGOUTSetVal(led_val);
Task_sleep(1000); //1000
if(AM335X_BOARD_TYPE_ICE_V2 == boardType)
{
LEDGPIOSetVal(0,16 ,0);
LEDGPIOSetVal(0,17 ,0);
LEDGPIOSetVal(0,19 ,0);
LEDGPIOSetVal(0,20 ,0);
LEDGPIOSetVal(1,30 ,0);
LEDGPIOSetVal(3,9 ,0);
}
else
{
LEDGPIOSetVal(0,0 ,0);
LEDGPIOSetVal(0,1 ,0);
LEDGPIOSetVal(0,12 ,0);
LEDGPIOSetVal(0,13 ,0);
LEDGPIOSetVal(0,16 ,0);
LEDGPIOSetVal(0,17 ,0);
LEDGPIOSetVal(0, 0,1);
LEDGPIOSetVal(0, 1,1);
LEDGPIOSetVal(0, 12,1);
LEDGPIOSetVal(0, 13,1);
LEDGPIOSetVal(0, 16,1);
LEDGPIOSetVal(0, 17,1);
}
while(1)
{
LEDDIGOUTOff(led_val);
led_val = (led_val+1)%9;
LEDDIGOUTOn(led_val);
Task_sleep(300);
if (RunLed > 0)
{
if(AM335X_BOARD_TYPE_ICE_V2 != boardType)
{
LEDDriveACT0(1);
LEDDriveACT1(0);
}
LEDDriveRun(1);
LEDDriveError(0);
}
else
{
if(AM335X_BOARD_TYPE_ICE_V2 != boardType)
{
LEDDriveACT1(1);
LEDDriveACT0(0);
}
LEDDriveError(1);
LEDDriveRun(0);
}
RunLed ^= 1;
}
}
/*
* ======== main ========
*/
Void main()
{
Task_Handle task;
Error_Block eb;
System_printf("enter main() \n");
MMUInit(applMmuEntries);
//led_init();
Error_init(&eb);
task = Task_create(taskFxn, NULL, &eb);
if (task == NULL) {
System_printf("Task_create() failed!\n");
BIOS_exit(0);
}
boardType = UTILsGetBoardType();
if(AM335X_BOARD_TYPE_ICE == boardType)
{
uartInstance = 5;
}else if(AM335X_BOARD_TYPE_IDK == boardType)
{
uartInstance = 3;
}else if( AM335X_BOARD_TYPE_ICE_V2 == boardType)
{
uartInstance = 3;
PinMuxConfig(icev2Mux);
}
UartOpen(uartInstance,NULL);
BIOS_start(); /* enable interrupts and start SYS/BIOS */
}