Navigation

    Freqchip开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Recent
    1. Home
    2. pupilcool
    P
    • Continue chat with pupilcool
    • Start new chat with pupilcool
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    pupilcool

    @pupilcool

    0
    Reputation
    11
    Posts
    1878
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    pupilcool Follow

    Posts made by pupilcool

    • RE: SPI的DC与通讯速率有关

      一般在DC值需要改变时,可以加一个延时,如下
      void LCD_DriverWriteCmd(uint8_t cmd)
      {
      if(dc_value==DC_DATA)
      {
      cpu_delay(10); //for 24Mhz. mask this, lower speed ,need this
      LCD_DC_CMD; //change DC value
      dc_value = DC_CMD; //record current DC value.
      }
      ssp_put_byte_x(ssp1,cmd);
      }

      posted in FR801xH
      P
      pupilcool
    • RE: 遥控器开发

      遥控器开发,主要有广播内容,绑定加密,三个profile,device_info, battery,hid。 以及键盘扫描 ,如果有需要语音功能的话,需要知道机顶盒的语音压缩格式。
      这里有一个基于8010H SDK的 示例,

      posted in FR801xH
      P
      pupilcool
    • RE: gap_security_pairing_req

      这个函数是向 从机发起绑定。 gap_security_pairing_req()调用后,会先进行绑定操作,绑定之后会进行加密操作,加密成功后,底层会上传GAP_SEC_EVT_MASTER_ENCRYPT 的回调事件。

      如果要扫描对端的service,可以在上面的回调事件之后需要使用gatt_discovery_all_peer_svc()函数或gatt_discovery_peer_svc()来扫描对端的service。

      posted in FR801xH
      P
      pupilcool
    • RE: 请问LED2的电压可以调整么?

      @zhouzhigang LED2相当于一个只能用于输出的GPIO,驱动能力有限,最大12mA。LDO脚可以当做VBAT 给其他设备供电。 驱动能力120mA

      posted in FR801xH
      P
      pupilcool
    • RE: pwm输出

      这个可以的。801xH的芯片有两种pwm,一个是数字模块的pwm,精度是cpu的运行频率,12M,24M,48M。 如果是48M的cpu时钟的话,pwm的输出精度是48M HZ。 具体的参考代码如下:
      system_set_port_mux(GPIO_PORT_D,GPIO_BIT_4,PORTD4_FUNC_PWM4);
      system_set_port_mux(GPIO_PORT_D,GPIO_BIT_5,PORTD5_FUNC_PWM5);
      pwm_init(PWM_CHANNEL_4,32768,50);
      pwm_init(PWM_CHANNEL_5,32768,50);
      pwm_start(PWM_CHANNEL_4);
      pwm_start(PWM_CHANNEL_5);
      数字模块的pwm,在启动sleep后,会停止运行。

      另一种是pmu的pwm模块,这个模块在启动sleep后,依然能运行,它的时钟精度是sleep低速时钟的精度,即最大32KHz。参考代码如下:
      pmu_pwm_init();
      pmu_set_pin_to_PMU(GPIO_PORT_D, BIT(4)|BIT(5));
      pmu_set_pin_dir(GPIO_PORT_D, BIT(4)|BIT(5),GPIO_DIR_OUT);
      pmu_set_port_mux(GPIO_PORT_D,GPIO_BIT_4,PMU_PORT_MUX_PWM);
      pmu_set_port_mux(GPIO_PORT_D,GPIO_BIT_5,PMU_PORT_MUX_PWM);
      pmu_pwm_set_param(GPIO_PORT_D,GPIO_BIT_4,1,1);
      pmu_pwm_set_param(GPIO_PORT_D,GPIO_BIT_5,1,1);
      pmu_pwm_start(GPIO_PORT_D,GPIO_BIT_4,true,0);
      pmu_pwm_start(GPIO_PORT_D,GPIO_BIT_5,true,0);
      两种pwm的示例代码都能在 driver_demos这个工程里的demo_pwm() 和demo_pmu_pwm() 找到。

      posted in FR801xH
      P
      pupilcool