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.

CC2530在zstack 2.5.1a中如何配置才能控制P1.4 P1.5这两个管脚

Other Parts Discussed in Thread: CC2530, Z-STACK

在项目中使用zstack 2.5.1a版本,CC2530作为终端,需要用到很多IO口,然后发现P1.4 P1.5这两个管脚无法控制,P1.4一直输出低电平,P1.51时高时低,别的都可以正常使用,都是一样的配置,然后屏蔽了macTaskInit后就正常配置了,想知道是不是不开放这两个管脚还是要怎样才能配置。

  • P1.4是LED3用走,P1.5被LCD用走,你可以去hal_board_cfg.h里面把LED3的管腳改掉,應該就可以正常使用P1.4,然後預編譯HAL_LCD=FALSE應該就可以正常使用P1.5
  • 请看C:\Texas Instruments\Z-Stack Mesh 1.0.0\Components\hal\target\CC2530EB中的hal_board_cfg.h 已经被使用了,你需要在里面把现有的使用更改掉。
  • /**************************************************************************************************
     *                                          CONSTANTS
     **************************************************************************************************/
    /*
      LCD pins
    
      //control
      P0.0 - LCD_MODE
      P1.1 - LCD_FLASH_RESET
      P1.2 - LCD_CS
    
      //spi
      P1.5 - CLK
      P1.6 - MOSI
      P1.7 - MISO
    */