This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
__interrupt void USSLIB_HAL_TIMER_RXEN_INT(void)
{
switch(__even_in_range(HARDWAREWREG16(USSSWLIB_HAL_RXEN_TIMER_BASE_ADDRESS + OFS_TAxIV),
TAIV__TAIFG))
{
case TAIV__NONE: break; // No interrupt
case TAIV__TACCR1: // CCR1, Enables RXEN
// Enable RxEN, RxEN will be turned Off after USS acquisition
USSSWLIB_HAL_AFE_RXEN_PORT |= (USSSWLIB_HAL_AFE_RXEN_PIN);
// Disable Timer
HARDWAREWREG16(USSSWLIB_HAL_RXEN_TIMER_BASE_ADDRESS + OFS_TAxCTL) &= ~(MC_3 | TAIFG);
break;
case TAIV__TACCR2: // CCR2, start ASQ, restart timer to trigger RxEN
// Wait until USS module is in READY state
while((UUPSCTL & UPSTATE_3) != UPSTATE_3);
其次,您这边有没有修改USS参数?
硬件电路板使用的是EVM吗? 还是在自己做的板子? 如果使用的是晶体振荡器的话,这里需要改大到4000左右
按照上面修改后,SIGLE_TONE,MULTI_TONE都会总是在重启。偶尔SIGLE_TONE单步调试能够有数据出来。看门狗是关闭的了。每次停止下来都是在// Enter iteration loop这个循环中一直跑,。
USS_message_code commonConfigureMultiTone(USS_SW_Library_configuration *config)
{
.............
pPGCycles = _IQ12int(iq12pPGCycles);
// Enter iteration loop
for(i=0;i<pPGCycles;i++)
{
// calculate iq12f base on current iteration value
float fIncreased = (_IQ18toF(iq18FIncrease) * (float)i);
iq10FIncreased = _IQ10(f1Freq) + _IQ10(fIncreased);
// calculate value of B in iq23 format
//
// B = 2*pi*f(t)*t
//
// B = fIncreased*(i/fSinInc);
iq30Btemp = _IQ30div(i,fSinInc);
// Maximum number of pulses 40
iq23B = _IQ17mpy(iq10FIncreased,iq30Btemp);