1 Reply Latest reply on Jul 31, 2018 3:53 AM by ShifangZ_26

    after add LCD show code in main, the PD machine is repeat restarted, using CYPD2122-24

      您好,

       

      目前项目使用CYPD2122-24芯片,项目描述如前所述(用一个按键切充电头的输出电压,并显示电压值 PDO等参数)。

      At present, the project uses CYPD2122-24 chip, and the project description is as mentioned before.

       

       

        1.  我用notebook参考代码,发现去掉bootloader后,可以运行但不能触发source充电头电压的切换。不知为何?目前代码空间有限,希望能去掉这个bootloader。

        1. I used the notebook reference code to find that after bootloader was removed, it could run but could not trigger the switching of the source charging head voltage. I don't know why? At present, the code space is limited, hoping to remove this bootloader.

       

        2.  在while(1)代码里添加电压值获取和显示代码((通过IIC总线驱动 TFT屏))后,CYPD2122一直在重复启动。电压值在5V, 0V, 5V, 0V....间变化。代码如下。

       

        2. after adding show code into the main function(through the IIC bus driver TFT screen), CYPD2122 is repeat restarted. The code is as follows.

       

      main()

      {

      .....

      ......

         while(1) {

              type_c_state_machine();

              pe_state_machine();  

              cbl_discovery();

       

               //

               showpd();

         }

      }

       

      void showpd(void)

      {

        getpdo();  //get pdo, voltage..... 

        drawfont(....); //show voltage

      drawfont(....);  // show pdo parameters

      drawfont(....); //show current

      ...

      }

       

       

      估计是显示代码刷屏时间长影响了PD machine,那这个pd machine能否放高优先级中断里处理的吗?还是有其他途径可解决冲突问题?

       

       

       

       

       

      谢谢!