cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

cypress工程师 你们好!

   

   我们在使用你们的CYBL11573加入OTA功能时,发现一个很奇怪的问题:我们在快速的给芯片上电和断电的过程中会出现芯片永久死机的情况,除非重新烧录程序,否则永远不能恢复正常,好像放在芯片内的flash程序已经被破坏了一样!

   

一下是在main中为OTA增加的代码:通过一个按键来进入OTA模式,如果去掉这部分代码,就不会出现上面的问题了。   

   

int main()
{
    CyGlobalIntEnable;

    #if !defined(__ARMCC_VERSION)
        InitializeBootloaderSRAM();
    #endif
  /* Checks if Self Project Image is updated and Runs for the First time */
    AfterImageUpdate();  
    CyBle_Start(AppCallBack);           
    Button_Init();
    Led_Init();
      
    if((~(Port1_Pins_Read()) & 0x1f) == VOLDOWN_BUTTON_MASK)
    {
        CyDelay(3000u); //3s
        if((~(Port1_Pins_Read()) & 0x1f) == VOLDOWN_BUTTON_MASK)
        {
            Bootloadable_SetActiveApplication(0);
            Bootloadable_Load();
            CySoftwareReset();
        }
    }

   

。。。。。。。。。。。。。。。

   

}  

   

以上问题, 帮忙分析一下原因  谢谢!

0 Likes
Reply
1 Solution
Esteemed Contributor II

Generally speaking is the flash programming always sensitive to power losses: programming consists of a sequence of (row-wise) erase and a new programming. Even a low-power detect will not help, since a program cycle often cannot be interrupted. A solution can be to detect a power loss on the primary side of the power supply and keeping the PSoC supply voltage stable until the current program row cycle has finished.

   

 

   

Bob

View solution in original post

0 Likes
Reply
6 Replies
Anonymous
Not applicable

还分析什么啊,官方都要停产的东西了

0 Likes
Reply
New Contributor

我使用11573 使用Gesture组件 和你出现类似的情况,什么都不干,初始化同样反复死机

0 Likes
Reply
Anonymous
Not applicable

你好  你们最后怎么解决的?

0 Likes
Reply
Esteemed Contributor II

Forum language is English. It would be very kind when you translate your post for us. So not everyone needs to translate it for himself.

   

论坛语言是英语。 这将是非常友好,当你翻译您的帖子为我们。 所以不是每个人都需要为自己翻译。

   

Bob

0 Likes
Reply
Employee

Translate the query first:

   

We have added the OTA function in CYBL11573. While power on and power off the chip quickly, chip crashed. Only download the FW again can recover it. We suspect the Flash has crashed. But delete the OTA function can solve the issue.

   

Hi Cgh_818_2099696

   

Have you check the difference between the flash data in normal and abnormal situation? If yes, what's the result ?

   

Which type of OTA do you use: Fixed stack or Upgradable stack OTA?

   

Regards

   

Jenson

0 Likes
Reply
Esteemed Contributor II

Generally speaking is the flash programming always sensitive to power losses: programming consists of a sequence of (row-wise) erase and a new programming. Even a low-power detect will not help, since a program cycle often cannot be interrupted. A solution can be to detect a power loss on the primary side of the power supply and keeping the PSoC supply voltage stable until the current program row cycle has finished.

   

 

   

Bob

View solution in original post

0 Likes
Reply