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.

TMS320F28027: Number conversion and operating cycle issue

Part Number: TMS320F28027
Other Parts Discussed in Thread: C2000WARE

Hi team,

Here're few questions from the customer may need your help:

1) Multiplication is required in the program, but the result of the multiplication is beyond the range of the original variable. How to convert it? 

volatile uint16_t inv_VbusInst;
volatile uint16_t inv_VbusAvg;

Above are the two variables in the structure Inv_var. 

if(inv_var.inv_VbusInst>15){
inv_var.inv_VbusAvg =(uint16_t)( ( ( (uint32_t)inv_var.inv_VbusInst-10 ) *62 ) >>8);

}

The calculated statements are as follows: 

inv_var.inv_VbusAvg=(inv_var.inv_VbusInst-10 )*62>>8;

When inv_var.inv_VbusInst=2000, the (inv_var.inv_VbusInst-10 )*6 result is greater than the maximum value of uint16_t data of 65536. Is the result of the multiplication automatically of the UINT16_t type, or is it left unchanged? 

2) (UINT32_t)inv_var.inv_VbusInst

Because inv_var.inv_VbusInst was the UINT16_t type. How many instruction cycles does this take in the calculation? 

3) During debug it's found the number of breakpoints cannot exceed two. Is it possible to set multiple breakpoints? Is there a runtime hint in debug? (the customer want to see when the code executes from one location to another) 

4) What are the _IQmpy(a,B), IQsin(a), _IQ(float F) instruction cycles respectively for IQ? 

Could you help check this case? Thanks.

Best Regards,

Cherry