Hi all:
I used TMS320F2812 in a Photovoltaic inverter. When I used my computer USB TO RS485,send one command: 01 03 00 00 00 26 C4 10(standard Modbus protocol) to two different 2812. I set two 2812 in the same address:01 follow standard Modbus protocol. After run 40 minutes,Structure unit a -x become 0. The code as below:
header file name:ASP_Para_Init.h
Defined structure:
struct ASP_Para{
int a;
……
Int x;
};
extern struct ASP_Para ASP_SYS;
extern struct ASP_Para ASP_500KTL,ASP_630KTL,ASP_100K,ASP_150K;
extern struct ASP_Para ASP_50K,ASP_30K,ASP_250K;
ASP_Para_Init.c code:
#include "ASP_Para_Init.h"
struct ASP_Para ASP_SYS;
struct ASP_Para ASP_500KTL={
27500
……
9867
}
void Init_ASP_MODEL(int model)
{
switch (model)
case 14001:
ASP_SYS = ASP_500KTL;
break;
case 12004:
ASP_SYS = ASP_500K;
break;
default:
break;
}
}
Why the a-x become 0 after run few minutes, please help check the code ,thanks.