Mehmet Fide

AW32 and Unexpected Reset Problem

Discussion created by Mehmet Fide on Nov 20, 2007
Latest reply on Nov 21, 2007 by Mehmet Fide
Hi,
 
I have a simple program written in C for AW32. If I allocate 256 bytes for RX and TX buffers, the program reset yourself at the beginning of init_System() function. If I allocate 128 bytes for each, the program works expected. What may cause MCU to reset? I didn't take any warnings or errors when compiling. In the PRM file, I defined STACKSIZE as 0x1FF and using 64bit floating-point support of the compiler. If I remove the line "SOPT = 0;" in init_System() function, it resets a few functions later. I don't use COP, and reset pin of the MCU is stable. I doubt violating some RAM boundary but I don't know how I can check it.
 
Code:
unsigned char RX_Buff[256], TX_Buff[256];void init_System(void){  DisableInterrupts;      SOPT = 0;  // <---------- reset here  // Sets trimming for fbus = 18.432Mhz  ICGTRM = 127;  ...}void main(void){  init_System();  ...  ...}

 
Thanks.

Outcomes