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.

Keyfob关于P0端口的配置,设置P0_1=0,debug时,IAR报错,Warning:Possible Idata stack overflow detected

Other Parts Discussed in Thread: CC2530

你好,我们在用 keyfob 调试时,发现如标题所示问题:无法配置 P0_1为低电平,

//*gjy
  P0SEL |= BV(0);    // Configure Port 0  p0.0 as Peripheral
  P0SEL &= ~ BV(1);// Configure Port 0  p0.1 as GPIO
  //P0DIR &= ~ BV(0); // Port 0 pins P0.0 as input
  P0DIR |= BV(1);//Port 0 pins P0.1 as output
  //P0_1 = 0;  // Tell Ap I'm Ok

 

  • 堆栈溢出问题 ,可以通过Project > Options > General Options > Stack/Heap 修改

  • 谢谢Susan,可能我没描述清楚,当我设置 P0_1 = 1; 就不会有堆栈溢出问题,即 修改 stack/heap size 解决不了目前的问题,而且报错时,查看sp并没有溢出;进一步测试发现,溢出报错时,系统一直停在rf中断中,

  • 你好,,,我在IAR进行调试的时候,也遇到调试到端口就出现IAR Possible IDATA stack overflow detected,这种错误,和你一样。请问能提供解决的方法吗

  • 那是因为P0.1跟keyfob里面的按键有冲突了。你可以search all files “P0.1”, 然后发现它跟其他#define有关系,在hal_board_cfg.h,hal_key.h 和hal_key.c 里面都有,所以要comment掉这些文件里面的某些code。我上传了修改后的这几个文件。希望能帮到你

    hal_board_cfg.h
  • 我调试CC2530,写裸机代码的时候,也遇到过这样的问题。后来发现是系统时钟配置的问题。CC2530默认是16MHz RC内部晶振作为时钟源,系统时钟速度CLKSPD是16MHz。如果把高速时钟源改成外部32MHz晶振,那么在用CCDebugger调试的时候,系统时钟速度CLKSPD必须设置为32MHz。否则调试的时候就会出这个问题。下面是TI的User guide上的英文说明: Note also that the debugger cannot be used with a divided system clock. When running the debugger, the value of CLKCONCMD.CLKSPD should be set to 000 when CLKCONCMD.OSC = 0 or to 001 when CLKCONCMD.OSC = 1.