Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CCS/TMS320F28335: hardware resets

$
0
0

Part Number:TMS320F28335

Tool/software: Code Composer Studio

Hello

I'm a new f28335 user, so after running some examples, I tried to use my hardware for data processing, as the code below.

 int i,j,h,x, bins=16;
    float histograma[16],ff,aux[16],a,b,delta,pdf_i1[16],sum=0;
    float S[]={-1.0433,-1.1248,-1.2165,-1.2980,-1.4169,-1.5324,-1.6581,-1.7939,-1.9434,-2.0928,-2.2491,-2.3985,-2.5378,-2.6804,-2.8129,-2.9522,-3.0812,-3.2137,-3.3665,-3.5296,-3.6722,-3.7945,-3.9100,-4.0085,-4.1172,-4.2055,-4.2768,-4.3312,-4.3957,-4.4569,-4.4976,-4.5452,-4.6131,-4.6708,-4.7286,-4.7761,-4.8203,-4.8577,-4.8814,-4.8848,-4.8678,-4.8712,-4.8543,-4.8339,-4.8237,-4.8033,-4.8237,-4.8271,-4.8407,-4.8509,-4.8644,-4.8780,-4.8780,-4.8848,-4.8780,-4.8577,-4.8271,-4.7897,-4.7456,-4.7184,-4.7048,-4.6776,-4.6505,-4.6437,-4.6335,-4.6233,-4.6063,-4.5757,-4.5384,-4.5010,-4.4603,-4.4093,-4.3618,-4.3040,-4.2497,-4.2021,-4.1410,-4.0798,-4.0119,-3.9440,-3.8862,-3.8115,-3.7606,-3.6892,-3.6111,-3.5296,-3.4447,-3.3462,-3.2511,-3.1526,-3.0405,-2.9148,-2.7857,-2.6635,-2.5310,-2.4053,-2.2728,-2.1472,-2.0079,-1.8788,-1.7464,-1.6139,-1.4678,-1.3150,-1.1757,-1.0569,-0.9346,-0.8089,-0.6764,-0.5576,-0.4455,-0.3436,-0.2281,-0.1364,-0.0379,0.0606,0.1659,0.2814,0.3935,0.5090,0.6143,0.7196,0.8181,0.8928,0.9641,1.0456,1.1272,1.2155,1.3038,1.4057,1.5212,1.6400,1.7725,1.9220,2.0714,2.2243,2.3839,2.5266,2.6658,2.7949,2.9341,3.0632,3.2093,3.3553,3.5082,3.6542,3.7765,3.8818,3.9939,4.1026,4.1909,4.2588,4.3234,4.3913,4.4422,4.4966,4.5441,4.5985,4.6596,4.7208,4.7649,4.8091,4.8464,4.8736,4.8804,4.8668,4.8634,4.8532,4.8430,4.8260,4.8159,4.8227,4.8294,4.8396,4.8498,4.8736,4.8838,4.8906,4.8940,4.8872,4.8702,4.8396,4.8091,4.7683,4.7411,4.7140,4.7004,4.6698,4.6494,4.6460,4.6358,4.6155,4.5849,4.5475,4.5102,4.4558,4.4083,4.3505,4.3200,4.2622,4.2079,4.1535,4.0856,4.0346,3.9633,3.8852,3.8274,3.7561,3.6950,3.6135,3.5387,3.4470,3.3587,3.2534,3.1685,3.0462,2.9307,2.7983,2.6726,2.5367,2.3975,2.2820,2.1529,2.0239,1.8880,1.7589,1.6298,1.4872,1.3411,1.2019,1.0796,0.9607,0.8249,0.6992,0.5837,0.4648,0.3595,0.2440,0.1489,0.0572,-0.0379,-0.1432,-0.2587,-0.3707,-0.4692,-0.5847,-0.6866,-0.7783,-0.8599,-0.9380,-1.0093};
int main(void)
{

    x=1;
    for(i=0;i<bins;i++)
        {
        histograma[i]=0;
        aux[i]=histograma[i];
        }
    for (x=1;x<=5;x++)
    {


   if (x==2)
  {
       float S2[]={-1.0976,-1.1791,-1.2708,-1.3592,-1.4780,-1.6003,-1.7260,-1.8686,-2.0215,-2.1743,-2.3238,-2.4732,-2.6193,-2.7654,-2.9114,-3.0439,-3.1797,-3.3258,-3.4786,-3.6281,-3.7572,-3.8692,-3.9745,-4.0764,-4.1817,-4.2531,-4.3176,-4.3753,-4.4399,-4.4874,-4.5350,-4.5825,-4.6573,-4.7048,-4.7592,-4.7999,-4.8509,-4.8746,-4.8950,-4.8814,-4.8712,-4.8577,-4.8509,-4.8373,-4.8169,-4.8169,-4.8237,-4.8407,-4.8543,-4.8611,-4.8848,-4.8950,-4.8950,-4.8848,-4.8712,-4.8441,-4.8101,-4.7659,-4.7320,-4.7014,-4.6776,-4.6573,-4.6403,-4.6267,-4.6199,-4.6131,-4.5859,-4.5588,-4.5214,-4.4738,-4.4365,-4.3787,-4.3380,-4.2836,-4.2225,-4.1580,-4.1070,-4.0391,-3.9813,-3.9100,-3.8353,-3.7775,-3.7164,-3.6383,-3.5636,-3.4752,-3.3801,-3.2714,-3.1797,-3.0609,-2.9454,-2.8095,-2.6906,-2.5616,-2.4291,-2.2898,-2.1642,-2.0385,-1.9026,-1.7600,-1.6377,-1.4882,-1.3490,-1.2063,-1.0738,-0.9584,-0.8361,-0.7070,-0.5881,-0.4760,-0.3707,-0.2655,-0.1568,-0.0583,0.0267,0.1319,0.2440,0.3561,0.4648,0.5803,0.6822,0.7773,0.8656,0.9403,1.0049,1.0966,1.1849,1.2732,1.3649,1.4770,1.6027,1.7351,1.8778,2.0340,2.1869,2.3499,2.5028,2.6420,2.7847,2.9240,3.0632,3.1991,3.3315,3.4810,3.6304,3.7731,3.8784,3.9803,4.0856,4.1807,4.2588,4.3234,4.3913,4.4456,4.4966,4.5441,4.5917,4.6358,4.7004,4.7513,4.7955,4.8396,4.8736,4.8906,4.8940,4.8736,4.8600,4.8600,4.8396,4.8057,4.8023,4.8091,4.8193,4.8260,4.8396,4.8532,4.8702,4.8668,4.8736,4.8566,4.8362,4.7989,4.7649,4.7242,4.6868,4.6562,4.6392,4.6121,4.5883,4.5781,4.5747,4.5475,4.5068,4.4728,4.4354,4.3879,4.3437,4.2758,4.2282,4.1705,4.1094,4.0448,3.9871,3.9226,3.8580,3.7765,3.7154,3.6372,3.5931,3.4946,3.4063,3.3146,3.2229,3.1210,3.0157,2.8968,2.7745,2.6420,2.5130,2.3805,2.2480,2.1190,1.9899,1.8574,1.7317,1.6061,1.4668,1.3276,1.1815,1.0388,0.9268,0.7977,0.6822,0.5565,0.4410,0.3323,0.2305,0.1252,0.0301,-0.0651,-0.1602,-0.2790,-0.3843,-0.5032,-0.6085,-0.7172,-0.8157,-0.9074,-0.9719,-1.0535,-1.1248};
       for(i=0;i<=250;i++)
       {
           S[i]=S2[i];
       }
  }
   if(x==3)
   {
        float S2[]={-1.2131,-1.3014,-1.3897,-1.4984,-1.6241,-1.7566,-1.8890,-2.0419,-2.2015,-2.3612,-2.5174,-2.6567,-2.8027,-2.9352,-3.0778,-3.2103,-3.3462,-3.4854,-3.6315,-3.7673,-3.8862,-3.9847,-4.0934,-4.1817,-4.2599,-4.3278,-4.3889,-4.4433,-4.4908,-4.5452,-4.5859,-4.6301,-4.6946,-4.7456,-4.7829,-4.8305,-4.8644,-4.8950,-4.8916,-4.8712,-4.8644,-4.8441,-4.8339,-4.8101,-4.8033,-4.8135,-4.8101,-4.8237,-4.8407,-4.8475,-4.8678,-4.8712,-4.8780,-4.8644,-4.8373,-4.8135,-4.7727,-4.7286,-4.6946,-4.6742,-4.6573,-4.6199,-4.6131,-4.6029,-4.5893,-4.5655,-4.5452,-4.5010,-4.4670,-4.4229,-4.3685,-4.3210,-4.2700,-4.2123,-4.1614,-4.1002,-4.0323,-3.9643,-3.9032,-3.8285,-3.7538,-3.6892,-3.6281,-3.5432,-3.4583,-3.3733,-3.2748,-3.1729,-3.0676,-2.9556,-2.8299,-2.6974,-2.5683,-2.4359,-2.2966,-2.1608,-2.0385,-1.9094,-1.7634,-1.6343,-1.5086,-1.3626,-1.2165,-1.0772,-0.9550,-0.8361,-0.7104,-0.5881,-0.4692,-0.3606,-0.2553,-0.1602,-0.0583,0.0334,0.1319,0.2338,0.3459,0.4580,0.5701,0.6720,0.7875,0.8894,0.9675,1.0388,1.1204,1.2053,1.2970,1.3853,1.4804,1.6061,1.7351,1.8676,2.0205,2.1665,2.3126,2.4926,2.6352,2.7813,2.9240,3.0564,3.1923,3.3315,3.4674,3.6135,3.7527,3.8716,3.9735,4.0754,4.1739,4.2486,4.3267,4.3913,4.4456,4.5034,4.5475,4.5917,4.6392,4.6936,4.7445,4.7921,4.8362,4.8668,4.8974,4.8974,4.8974,4.8770,4.8702,4.8498,4.8328,4.8159,4.8227,4.8294,4.8430,4.8464,4.8668,4.8906,4.9008,4.8940,4.8940,4.8702,4.8362,4.8057,4.7683,4.7208,4.7004,4.6766,4.6562,4.6324,4.6223,4.6121,4.5883,4.5543,4.5204,4.4796,4.4354,4.3811,4.3369,4.2826,4.2418,4.1739,4.1162,4.0584,3.9905,3.9090,3.8444,3.7697,3.7018,3.6338,3.5523,3.4572,3.3723,3.2704,3.1719,3.0666,2.9545,2.8356,2.7032,2.5707,2.4450,2.2888,2.1631,2.0340,1.9118,1.7657,1.6400,1.5178,1.3785,1.2324,1.0966,0.9607,0.8520,0.7264,0.6075,0.4852,0.3765,0.2644,0.1659,0.0674,-0.0277,-0.1194,-0.2077,-0.3266,-0.4353,-0.5304,-0.6425,-0.7546,-0.8463,-0.9346,-1.0093,-1.0908,-1.1723};
        for(i=0;i<=250;i++)
        {
            S[i]=S2[i];
        }
   }
   if(x==4)
   {
        float S2[]={-1.2607,-1.3456,-1.4475,-1.5596,-1.6852,-1.8245,-1.9739,-2.1234,-2.2796,-2.4291,-2.5887,-2.7416,-2.8842,-3.0337,-3.1729,-3.3088,-3.4379,-3.5737,-3.7232,-3.8421,-3.9576,-4.0595,-4.1546,-4.2395,-4.3142,-4.3584,-4.4331,-4.4772,-4.5350,-4.5757,-4.6233,-4.6776,-4.7320,-4.7761,-4.8203,-4.8577,-4.8882,-4.9018,-4.8916,-4.8746,-4.8712,-4.8577,-4.8373,-4.8169,-4.8169,-4.8169,-4.8339,-4.8441,-4.8577,-4.8678,-4.8848,-4.8916,-4.8712,-4.8746,-4.8373,-4.7999,-4.7659,-4.7252,-4.6912,-4.6708,-4.6403,-4.6233,-4.5995,-4.5927,-4.5859,-4.5520,-4.5180,-4.4908,-4.4433,-4.3991,-4.3482,-4.3006,-4.2361,-4.1919,-4.1172,-4.0459,-3.9779,-3.9168,-3.8489,-3.7843,-3.7096,-3.6451,-3.5669,-3.4888,-3.3869,-3.2986,-3.1899,-3.0880,-2.9759,-2.8435,-2.7178,-2.5921,-2.4563,-2.3204,-2.1845,-2.0589,-1.9230,-1.7905,-1.6547,-1.5324,-1.3965,-1.2539,-1.1078,-0.9787,-0.8565,-0.7376,-0.6153,-0.5032,-0.3843,-0.2790,-0.1805,-0.0854,0.0097,0.0980,0.1999,0.3086,0.4207,0.5260,0.6380,0.7501,0.8554,0.9369,1.0185,1.0898,1.1747,1.2630,1.3615,1.4566,1.5653,1.6944,1.8269,1.9763,2.1393,2.2854,2.4518,2.6149,2.7711,2.9070,3.0496,3.1889,3.3180,3.4470,3.5897,3.7256,3.8512,3.9633,4.0618,4.1535,4.2452,4.3234,4.3845,4.4422,4.4932,4.5407,4.5815,4.6290,4.6664,4.7242,4.7751,4.8193,4.8600,4.8974,4.9110,4.9042,4.8940,4.8770,4.8566,4.8396,4.8227,4.8125,4.8057,4.8227,4.8328,4.8430,4.8532,4.8736,4.8804,4.8736,4.8634,4.8396,4.8091,4.7649,4.7140,4.6766,4.6528,4.6189,4.5849,4.5713,4.5509,4.5339,4.5136,4.4864,4.4456,4.4015,4.3539,4.3064,4.2486,4.1909,4.1433,4.0720,4.0109,3.9463,3.8716,3.8105,3.7289,3.6576,3.5863,3.5116,3.4300,3.3281,3.2330,3.1379,3.0326,2.9307,2.8119,2.6794,2.5435,2.4077,2.2786,2.1359,2.0069,1.8778,1.7419,1.6129,1.4804,1.3513,1.2189,1.0762,0.9335,0.8113,0.7060,0.5871,0.4614,0.3493,0.2406,0.1455,0.0436,-0.0515,-0.1466,-0.2383,-0.3402,-0.4591,-0.5678,-0.6764,-0.7885,-0.8972,-0.9855,-1.0603,-1.1316,-1.2097,-1.3048};
        for(i=0;i<=250;i++)
        {
            S[i]=S2[i];
        }
   }
   if(x==5)
   {
        float S2[]={-1.3965,-1.4916,-1.6003,-1.7192,-1.8517,-2.0011,-2.1540,-2.3170,-2.4732,-2.6363,-2.7823,-2.9352,-3.0676,-3.2171,-3.3428,-3.4752,-3.6009,-3.7368,-3.8658,-3.9813,-4.0798,-4.1715,-4.2565,-4.3346,-4.3991,-4.4433,-4.5010,-4.5520,-4.5893,-4.6199,-4.6640,-4.7184,-4.7693,-4.8169,-4.8475,-4.8882,-4.9086,-4.9086,-4.8848,-4.8746,-4.8509,-4.8441,-4.8271,-4.8067,-4.7897,-4.8135,-4.8237,-4.8373,-4.8373,-4.8577,-4.8712,-4.8644,-4.8611,-4.8373,-4.8101,-4.7727,-4.7218,-4.6912,-4.6505,-4.6233,-4.5995,-4.5859,-4.5655,-4.5588,-4.5350,-4.5112,-4.4704,-4.4263,-4.3923,-4.3346,-4.2870,-4.2293,-4.1749,-4.1138,-4.0527,-3.9779,-3.9134,-3.8387,-3.7741,-3.6926,-3.6213,-3.5500,-3.4684,-3.3801,-3.2918,-3.1865,-3.0880,-2.9793,-2.8639,-2.7280,-2.5955,-2.4631,-2.3306,-2.1879,-2.0521,-1.9162,-1.7905,-1.6479,-1.5154,-1.3863,-1.2539,-1.1112,-0.9719,-0.8463,-0.7274,-0.6119,-0.4930,-0.3741,-0.2722,-0.1703,-0.0786,0.0267,0.1116,0.2067,0.3052,0.4105,0.5260,0.6380,0.7467,0.8588,0.9607,1.0456,1.1204,1.2053,1.2868,1.3887,1.4770,1.5789,1.6944,1.8235,1.9695,2.1190,2.2786,2.4348,2.6013,2.7609,2.9036,3.0496,3.1889,3.3315,3.4504,3.5795,3.7052,3.8444,3.9599,4.0652,4.1535,4.2384,4.3234,4.3879,4.4422,4.4898,4.5441,4.5951,4.6290,4.6732,4.7208,4.7581,4.8125,4.8532,4.8906,4.9110,4.9246,4.9144,4.8872,4.8736,4.8600,4.8362,4.8294,4.8193,4.8294,4.8430,4.8532,4.8668,4.8838,4.8974,4.8940,4.8906,4.8736,4.8498,4.8057,4.7615,4.7309,4.6868,4.6698,4.6460,4.6256,4.5985,4.5917,4.5611,4.5373,4.4830,4.4490,4.4083,4.3539,4.3030,4.2554,4.2011,4.1331,4.0686,4.0075,3.9327,3.8546,3.7867,3.7120,3.6338,3.5659,3.4776,3.3961,3.2874,3.2025,3.0938,2.9885,2.8696,2.7371,2.6047,2.4654,2.3499,2.1971,2.0612,1.9254,1.7997,1.6570,1.5280,1.3989,1.2596,1.1238,0.9845,0.8622,0.7433,0.6211,0.5090,0.3867,0.2746,0.1863,0.0810,-0.0141,-0.1092,-0.1941,-0.2926,-0.3979,-0.5168,-0.6119,-0.7172,-0.8327,-0.9380,-1.0229,-1.0976,-1.1825,-1.2573,-1.3524};
        for(i=0;i<=250;i++)
        {
            S[i]=S2[i];
        }
   }
    for(i=0;i<bins;i++)
    {
     aux[i]=0;
    }
    a=S[0];
    b=a;
    for(i=1;i<=250;i++) 
    {
        if (a<=S[i])
        {
            a=S[i];
        }
        if(b>=S[i])
        {
            b=S[i];
        }
    }
    delta = (a-b)/bins;
//------------------------------------------------------------------------------------------------------------------------------------------------
    for(i=0;i<=250;i++)
    {   if (S[i]>b+bins*delta)
    {
        S[i]=b+bins*delta-(delta/10);
    }
        for(j=0;j<bins;j++)
        {
            if((b+j*delta)<=S[i] && (b+(j+1)*delta)>=S[i])
                {
                aux[j]++;
                }
        }
    }
//--------------------------------------------------------------------------------------------------------------------------------------------------
for(h=0;h<bins;h++) { histograma[h]+=aux[h]; } } for(h=0;h<bins;h++) { sum=sum+histograma[h]; } for(h=0;h<bins;h++) { pdf_i1[h]=histograma[h]/sum; } }

There are no error alerts, and the code runs ok for x[0 3], but when x assumes the '4' value,  the hardware resets during the 21th interation of the 
highlighted 'for'.

Anyone knows what could I do to solve this problem ?


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>