Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

tse_mac code PROBLEM

hi:

I encounter a problem about a piece of code,as follows:

------------------------------------------------

dat = IORD_ALTERA_TSEMAC_CMD_CONFIG(TSE_MAC_BASE);

if( (dat & 0x03) != 0 )

printf("WARN: RX/TX not disabled after reset... missing PHY clock? CMD_CONFIG=0x%08x\n", dat);

else

{printf("OK,CMD_CONFIG\n");

// printf("Hello from Nios II!\n");

}

printf("Hello from Nios II!\n");

-----in NiosII console,it can print :OK,CMD_CONFIG

but,can not print "Hello from Nios II!",seems that the code is not running down.

I suspect if maybe the reason of timer,so I add a timer(10us)in SOPC,and set the "sys_clk_timer" and "timerstamp_timer" in NiosII BSP,but after running the code ,there is nothing to print in NIOSII console,if I add none to "sys_clk_timer" and "timerstamp_timer",then it can only print "OK,CMD_CONFIG",and cannot print "Hello from Nios II!" .

I donnot understand the reason ,and suspect that what is missed to set in quartusII or niosII SBT.
No RepliesBe the first to reply