Error in dual bootloader when setting active application

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

When calling Bootloadable_SetActiveApplication(AppNo) an error is returned. I attached an example project tht uses the bootloadable for both applications.

Bob

0 Likes
1 Solution
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

Please call CySetTemp() before Bootloadable_SetActiveApplication(AppNo). CySetTemp() function needs to be called once before executing series of Flash or EEPROM writing functions. For more details, please refer to System Reference Guide.

            Status = Bootloadable_SetActiveApplication(AppNo);

            sprintf(PrintBuf,"SetActiveApp returned %d\n\r",Status);

            UART_PutString(PrintBuf);

           

            if (CYRET_SUCCESS != CySetTemp())

            {

                sprintf(PrintBuf,"Error  in CySetTemp \n\r");

                UART_PutString(PrintBuf);

  

            }

            Status = Bootloadable_SetActiveApplication(AppNo);

            sprintf(PrintBuf,"SetActiveApp returned %d\n\r",Status);

            UART_PutString(PrintBuf);

pastedImage_1.png

View solution in original post

0 Likes
3 Replies
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

Please call CySetTemp() before Bootloadable_SetActiveApplication(AppNo). CySetTemp() function needs to be called once before executing series of Flash or EEPROM writing functions. For more details, please refer to System Reference Guide.

            Status = Bootloadable_SetActiveApplication(AppNo);

            sprintf(PrintBuf,"SetActiveApp returned %d\n\r",Status);

            UART_PutString(PrintBuf);

           

            if (CYRET_SUCCESS != CySetTemp())

            {

                sprintf(PrintBuf,"Error  in CySetTemp \n\r");

                UART_PutString(PrintBuf);

  

            }

            Status = Bootloadable_SetActiveApplication(AppNo);

            sprintf(PrintBuf,"SetActiveApp returned %d\n\r",Status);

            UART_PutString(PrintBuf);

pastedImage_1.png

0 Likes

Well, I didn't call a flash write function, but the bootloadable did. Wouldn't it be better and cleaner to put the required call to CySetTemp() into the component's responsibility?

Bob

0 Likes

We have forwarded your query to our product development team, who will evaluate your query. Thank you for your interest in Cypress products.

0 Likes