cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6

AnCi_2234676
New Contributor II

I am trying to write a DFU application. I am calling Cy_DFU_ExecuteApp(1), but my App0 keeps restarting in a loop.

I have built a simple project that a simple project that reproduces the issue. At the end of the App1 build, both build outputs get merged into one. Then I program the merged output to my psoc 6. Then, in debug without programming, I change the value of switchToApp1 to 1 to call  Cy_DFU_ExecuteApp(1), but I get back in App0.

What am I doing wrong?

Thanks

0 Likes
1 Solution
VenkataD_41
Moderator
Moderator

Hi,

You have missed the following function in main.c of CM0+ core:

/*******************************************************************************

* Function Name: Cy_OnResetUser

********************************************************************************

*

* Summary:

*  This function is called at the start of Reset_Handler(). It is a weak

*  function that may be redefined by user code.

*  The DFU SDK requires this function to call Cy_DFU_OnResetApp0() in app#0

*  core0.

*

* Parameters:

*  None

*

* Return:

*  None

*

*******************************************************************************/

void Cy_OnResetUser(void)

{

    Cy_DFU_OnResetApp0();

}

Please include this in your applicaion and check once. Also, please refer code examples on DFU for PSoC 6 in PSoC Creator.

Thanks

Ganesh

View solution in original post

0 Likes
1 Reply
VenkataD_41
Moderator
Moderator

Hi,

You have missed the following function in main.c of CM0+ core:

/*******************************************************************************

* Function Name: Cy_OnResetUser

********************************************************************************

*

* Summary:

*  This function is called at the start of Reset_Handler(). It is a weak

*  function that may be redefined by user code.

*  The DFU SDK requires this function to call Cy_DFU_OnResetApp0() in app#0

*  core0.

*

* Parameters:

*  None

*

* Return:

*  None

*

*******************************************************************************/

void Cy_OnResetUser(void)

{

    Cy_DFU_OnResetApp0();

}

Please include this in your applicaion and check once. Also, please refer code examples on DFU for PSoC 6 in PSoC Creator.

Thanks

Ganesh

View solution in original post

0 Likes
Top labels